diff options
author | Christoph Helma <helma@in-silico.ch> | 2021-02-12 19:54:07 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2021-02-12 19:54:07 +0100 |
commit | a29eb3e38414cd252850c9c4fb356f8b2bef6fb4 (patch) | |
tree | a957d9ac455e7345c51f3ab6075698f552c497d1 /bin/crossvalidation.rb | |
parent | 158e9a7ecbc467c3db77c354f203b1176b0fc3f2 (diff) |
model.rb refactored, mp2d models updated
Diffstat (limited to 'bin/crossvalidation.rb')
-rwxr-xr-x | bin/crossvalidation.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/crossvalidation.rb b/bin/crossvalidation.rb new file mode 100755 index 0000000..b7cfdd7 --- /dev/null +++ b/bin/crossvalidation.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby +require_relative "../lib/lazar" +dir = ARGV[0] +dependent_variable_type = File.read(File.join(dir, "dependent-variable-type")).chomp +independent_variable_type = File.read(File.join(dir, "independent-variable-type")).chomp +if dependent_variable_type == "binary" and independent_variable_type == "binary" + model = TanimotoClassificationModel.new dir +elsif dependent_variable_type == "binary" and independent_variable_type == "numeric" + model = CosineClassificationModel.new dir +elsif dependent_variable_type == "numeric" and independent_variable_type == "binary" + model = TanimotoRegressionModel.new dir +elsif dependent_variable_type == "numeric" and independent_variable_type == "numeric" + model = CosineRegressionModel.new dir +end +model.crossvalidation |