Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
matloff committed Aug 12, 2020
1 parent 0a645ad commit 756e632
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -43,6 +43,7 @@ export(knnest,preprocessx,meany, vary,loclin,predict.knn,nlshc,
xyDataframeToMatrix,dummiesToInt,
imgTo2D,imgFilesToMatrix,imgFileToVector,augMatrix,
stdErrPred,
dimRed,dimRedNewX,reduceComps,
knnRec,anovaRec,mfRec,predictMany,
fineTuning,fineTuningPar,getNamedArgs,partTrnTst,makeOutdf,
krsFit,krsFitImg,diagNeural,
Expand Down
9 changes: 9 additions & 0 deletions R/DimRed.R
Expand Up @@ -6,6 +6,15 @@

# no centering/scaling is done; user may do separately

# example

# tg <- ToothGrowth
# tg$supp <- as.numeric(tg$supp)
# tg <- as.matrix(tg)
# tgsvd <- dimRed(tg,method='svd',2) # 2 PCs out of a possible 3
# newx <- c(8.8,1,0.5)
# dimRedNewX(tgsvd,newx)

dimRed <- function(dat,method='prcomp',nComps)
{
compSizes <- NULL # eigenvalues etc.
Expand Down

0 comments on commit 756e632

Please sign in to comment.