diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-09-14 13:40:11 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-09-14 13:40:11 +0200 |
commit | 4464b69ddf82fcb6302c8595217e00238517fe5f (patch) | |
tree | 97bb9e5113166db1cb8dad1dd59cceaf9291dd93 /lib/model.rb | |
parent | db9cb123b86be60b8dbc817fbdb79b1891dd8044 (diff) |
training_dataset moved to base Model class
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/model.rb b/lib/model.rb index 4aa8642..0155fc8 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -16,6 +16,10 @@ module OpenTox field :prediction_algorithm, type: String # prediction feature field :prediction_feature_id, type: BSON::ObjectId + + def training_dataset + Dataset.find(training_dataset_id) + end end class Lazar < Model @@ -24,7 +28,7 @@ module OpenTox field :neighbor_algorithm, type: String field :neighbor_algorithm_parameters, type: Hash - attr_accessor :prediction_dataset + #attr_accessor :prediction_dataset #attr_accessor :training_dataset # Create a lazar model from a training_dataset and a feature_dataset @@ -115,10 +119,6 @@ module OpenTox return prediction_dataset end - def training_dataset - Dataset.find(training_dataset_id) - end - end def training_activities |