Optimal-Learning-Lab / LKT

12 stars 2 forks source link

computefeatures() expects $cor and $icor to already be generated #14

Open lukeEG opened 1 year ago

lukeEG commented 1 year ago

This makes computefeatures() unable to be used independently so good to fix this.

imrryr commented 1 year ago

its best to use the main LKT function and set nosolve==TRUE, then it outputs the matrix of features and components (1 pair or more)

modelob <- LKT(usefolds = unique(val$fold)[-i], data = val, interc=FALSE, components = c("Anon.Student.Id", "KC..Default.", "KC..Default.", "KC..Default."), features = c("intercept", "intercept", "linesuc$","linefail$"))

m1 = as.matrix(modelob$predictors[[2]]) colnames(m1) = modelob$predictors[[1]]

imrryr commented 1 year ago

It occurs to me that this gives the one-hot encodings for intercepts (since it outputs the actual matrix), this may not really be relevant for most cases