summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-06-02 19:01:18 +0200
committerChristoph Helma <helma@in-silico.ch>2016-06-02 19:01:18 +0200
commit128fd36b2531756c15a93776871e80eb44e524f1 (patch)
treeead8f7b83c825d0df8c857866b8d5686d7082927 /test
parenteec5bddbd35c9ecee8021128508d8718bccb4fe3 (diff)
proteomics regression validation
Diffstat (limited to 'test')
-rw-r--r--test/nanoparticles.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/nanoparticles.rb b/test/nanoparticles.rb
index 227f7db..e5d1973 100644
--- a/test/nanoparticles.rb
+++ b/test/nanoparticles.rb
@@ -54,7 +54,7 @@ class NanoparticleTest < MiniTest::Test
#feature = Feature.find_or_create_by(name: "Net cell association", category: "TOX", unit: "mL/ug(Mg)")
feature = Feature.find_or_create_by(name: "Log2 transformed", category: "TOX")
- model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_weighted_average", :neighbor_algorithm => "physchem_neighbors", :neighbor_algorithm_parameters => {:min_sim => 0.5}})
+ model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_weighted_average", :feature_selection_algorithm => :correlation_filter, :neighbor_algorithm => "physchem_neighbors", :neighbor_algorithm_parameters => {:min_sim => 0.5}})
cv = RegressionCrossValidation.create model
p cv.rmse
p cv.r_squared
@@ -67,7 +67,7 @@ class NanoparticleTest < MiniTest::Test
training_dataset = Dataset.find_or_create_by(:name => "Protein Corona Fingerprinting Predicts the Cellular Interaction of Gold and Silver Nanoparticles")
feature = Feature.find_or_create_by(name: "Log2 transformed", category: "TOX")
- model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_physchem_regression", :neighbor_algorithm => "physchem_neighbors", :neighbor_algorithm_parameters => {:min_sim => 0.5}})
+ model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_physchem_regression", :feature_selection_algorithm => :correlation_filter, :neighbor_algorithm => "physchem_neighbors", :neighbor_algorithm_parameters => {:min_sim => 0.5}})
cv = RegressionCrossValidation.create model
p cv.rmse
p cv.r_squared