[mlpack] 20/35: Add warning for kernel_pca when --output_file is not specified.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Thu Sep 15 23:29:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit 46a7ffd26400022816a194bef0f09d3a511b9912
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Jul 13 17:03:40 2016 -0400
Add warning for kernel_pca when --output_file is not specified.
Also allow the user to not specify that option.
---
src/mlpack/methods/kernel_pca/kernel_pca_main.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp b/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
index bac03e5..ae1df30 100644
--- a/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
+++ b/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
@@ -153,6 +153,10 @@ int main(int argc, char** argv)
// Parse command line options.
CLI::ParseCommandLine(argc, argv);
+ if (!CLI::HasParam("output_file"))
+ Log::Warn << "--output_file is not specified; no output will be saved!"
+ << endl;
+
// Load input dataset.
mat dataset;
const string inputFile = CLI::GetParam<string>("input_file");
@@ -243,5 +247,6 @@ int main(int argc, char** argv)
// Save the output dataset.
const string outputFile = CLI::GetParam<string>("output_file");
- data::Save(outputFile, dataset, true); // Fatal on failure.
+ if (outputFile != "")
+ data::Save(outputFile, dataset, true); // Fatal on failure.
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list