From 4464b69ddf82fcb6302c8595217e00238517fe5f Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 14 Sep 2015 13:40:11 +0200 Subject: training_dataset moved to base Model class --- lib/model.rb | 10 +++++----- 1 file 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 -- cgit v1.2.3