From 81e29f66dc94244e359e199bd098db555c9d7548 Mon Sep 17 00:00:00 2001 From: WANG Zhiwei <48282751+statwangz@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:54:54 +0800 Subject: [PATCH] Move softImpute code to others folder --- .Rbuildignore | 1 + DESCRIPTION | 3 +-- NAMESPACE | 3 --- man/softImputeCrossVal.Rd | 31 ------------------------------- man/softImputeCrossValSparse.Rd | 31 ------------------------------- {R => others}/softImputeCV.R | 0 6 files changed, 2 insertions(+), 67 deletions(-) delete mode 100644 man/softImputeCrossVal.Rd delete mode 100644 man/softImputeCrossValSparse.Rd rename {R => others}/softImputeCV.R (100%) diff --git a/.Rbuildignore b/.Rbuildignore index 9ce5453..bf845ce 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,4 @@ ^pkgdown$ ^codecov\.yml$ ^\.github$ +^others$ diff --git a/DESCRIPTION b/DESCRIPTION index bce9811..5b98635 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -13,8 +13,7 @@ Imports: dplyr, Matrix, methods, - rpart, - softImpute + rpart Depends: R (>= 2.10), LazyData: true diff --git a/NAMESPACE b/NAMESPACE index 5520b42..86c4a8a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,14 +8,11 @@ export(getELBO) export(getImportance) export(initSF) export(predictFX) -export(softImputeCrossVal) -export(softImputeCrossValSparse) export(updateMFAIR) exportClasses(MFAIR) exportClasses(MFAIRSingleFactor) exportMethods(predict) import(Matrix) -import(softImpute) importFrom(dplyr,left_join) importFrom(methods,new) importFrom(rpart,rpart) diff --git a/man/softImputeCrossVal.Rd b/man/softImputeCrossVal.Rd deleted file mode 100644 index 6d43a02..0000000 --- a/man/softImputeCrossVal.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/softImputeCV.R -\name{softImputeCrossVal} -\alias{softImputeCrossVal} -\title{Cross-validation for softImpute.} -\usage{ -softImputeCrossVal( - Y, - rank_max = NULL, - lambda_range = NULL, - nfold = 10, - para_length = 100 -) -} -\arguments{ -\item{Y}{A matrix. The main data matrix of N samples and M features.} - -\item{rank_max}{An integer. The maximum rank allowed.} - -\item{lambda_range}{A vector containing the minimal and maximal value of the parameter lambda.} - -\item{nfold}{An integer. The total number of validation sets.} - -\item{para_length}{An integer. The total number of parameter lambda.} -} -\value{ -A list containing the cross-validation results. -} -\description{ -Cross-validation for softImpute. -} diff --git a/man/softImputeCrossValSparse.Rd b/man/softImputeCrossValSparse.Rd deleted file mode 100644 index a6a53cf..0000000 --- a/man/softImputeCrossValSparse.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/softImputeCV.R -\name{softImputeCrossValSparse} -\alias{softImputeCrossValSparse} -\title{Sparse version of cross-validation for softImpute.} -\usage{ -softImputeCrossValSparse( - Y, - rank_max = NULL, - lambda_range = NULL, - nfold = 10, - para_length = 100 -) -} -\arguments{ -\item{Y}{A Matrix::dgCMatrix. The main data matrix of N samples and M features.} - -\item{rank_max}{An integer. The maximum rank allowed.} - -\item{lambda_range}{A vector containing the minimal and maximal value of the parameter lambda.} - -\item{nfold}{An integer. The total number of validation sets.} - -\item{para_length}{An integer. The total number of parameter lambda.} -} -\value{ -A list containing the cross-validation results. -} -\description{ -Sparse version of cross-validation for softImpute. -} diff --git a/R/softImputeCV.R b/others/softImputeCV.R similarity index 100% rename from R/softImputeCV.R rename to others/softImputeCV.R