[mlpack-git] master: Update documentation, and fail on invalid algorithm. (aee90c3)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Jun 25 20:37:22 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/15c86b861642ee25deb1659a81b50b894ef707e2...f9a6cd53619e4024a8e052b9ddb296af3f7d7dc7
>---------------------------------------------------------------
commit aee90c3f59e0a8d60e2ed1dace487faf0e7c54a1
Author: Ryan Curtin <ryan at ratml.org>
Date: Thu Jun 25 20:36:36 2015 -0400
Update documentation, and fail on invalid algorithm.
>---------------------------------------------------------------
aee90c3f59e0a8d60e2ed1dace487faf0e7c54a1
src/mlpack/methods/cf/cf_main.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/mlpack/methods/cf/cf_main.cpp b/src/mlpack/methods/cf/cf_main.cpp
index 46728d3..cdb6717 100644
--- a/src/mlpack/methods/cf/cf_main.cpp
+++ b/src/mlpack/methods/cf/cf_main.cpp
@@ -39,7 +39,12 @@ PROGRAM_INFO("Collaborating Filtering", "This program performs collaborative "
"The following optimization algorithms can be used with --algorithm (-a) "
"parameter: "
"\n"
- "RegSVD -- Regularized SVD using a SGD optimizer ");
+ "'RegSVD' -- Regularized SVD using a SGD optimizer\n"
+ "'NMF' -- Non-negative matrix factorization with alternating least squares "
+ "update rules\n"
+ "'BatchSVD' -- SVD batch learning\n"
+ "'SVDIncompleteIncremental' -- SVD incomplete incremental learning\n"
+ "'SVDCompleteIncremental' -- SVD complete incremental learning\n");
// Parameters for program.
PARAM_STRING_REQ("input_file", "Input dataset to perform CF on.", "i");
@@ -126,6 +131,10 @@ int main(int argc, char** argv)
CR(SparseSVDCompleteIncrementalFactorizer());
else if(algo == "RegSVD")
CR(RegularizedSVD<>());
+ else
+ Log::Fatal << "Invalid decomposition algorithm. Choices are 'NMF', "
+ << "'SVDBatch', 'SVDIncompleteIncremental', 'SVDCompleteIncremental', "
+ << " and 'RegSVD'." << endl;
const string outputFile = CLI::GetParam<string>("output_file");
data::Save(outputFile, recommendations);
More information about the mlpack-git
mailing list