diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-06-02 12:10:11 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-06-02 12:10:11 +0200 |
commit | 32c6fae5eba64293efd25bb7db177f1964ee2625 (patch) | |
tree | 0089a16f46ef8f9cdfb6fdcf64d936c56d71345d /example.rb | |
parent | 01dbc229e6a3483bd18d028f5cab3483c10ca43c (diff) |
replacing datamapper with activerecord for validation objects
Diffstat (limited to 'example.rb')
-rw-r--r-- | example.rb | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -51,6 +51,12 @@ class Example def self.prepare_example_resources @@summary = "" + #delete validations + log "delete validations" + ActiveRecord::Base.logger = Logger.new("/dev/null") + ActiveRecord::Migrator.migrate('db/migrate', 0 ) + ActiveRecord::Migrator.migrate('db/migrate', 1 ) + #delete_all(@@config[:services]["opentox-dataset"]) log OpenTox::RestClientWrapper.delete @@config[:services]["opentox-dataset"] @@ -60,7 +66,6 @@ class Example data_uri = OpenTox::RestClientWrapper.post(@@config[:services]["opentox-dataset"],{:content_type => @@file_type},data).chomp("\n") log "train-test-validation" - Lib::Validation.auto_migrate! #delete_all(@@config[:services]["opentox-model"]) OpenTox::RestClientWrapper.delete @@config[:services]["opentox-model"] @@ -73,7 +78,6 @@ class Example v.validate_algorithm( @@alg_params ) log "crossvalidation" - Lib::Crossvalidation.auto_migrate! cv = Validation::Crossvalidation.new({ :dataset_uri => data_uri, :algorithm_uri => @@alg, :num_folds => 5, :stratified => false }) cv.create_cv_datasets( URI.decode(@@feature) ) cv.perform_cv( @@alg_params ) |