diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-02-23 12:14:04 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-02-23 12:14:04 +0100 |
commit | e57856a3c2cd10df207e722301c24a022e9fd802 (patch) | |
tree | 8d66572b851affa4cc963ceb779992c073a06e95 /lib | |
parent | 84b787bf6d99f6b8cce56df2bc45a8b93ada4d64 (diff) |
extend limit to 512 from 255, plus minor fix
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/ot_predictions.rb | 3 | ||||
-rwxr-xr-x | lib/validation_db.rb | 20 |
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/ot_predictions.rb b/lib/ot_predictions.rb index 116b4db..eb80205 100755 --- a/lib/ot_predictions.rb +++ b/lib/ot_predictions.rb @@ -158,7 +158,8 @@ module Lib else v = dataset.data_entries[compound][feature] end - raise "no array" unless v.is_a?(Array) + return nil if v==nil + raise "no array "+v.class.to_s+" : '"+v.to_s+"'" unless v.is_a?(Array) if v.size>1 v.uniq! raise "not yet implemented: multiple non-equal values "+compound.to_s+" "+v.inspect if v.size>1 diff --git a/lib/validation_db.rb b/lib/validation_db.rb index 25f1d66..d12f5ce 100755 --- a/lib/validation_db.rb +++ b/lib/validation_db.rb @@ -58,14 +58,14 @@ module Lib include DataMapper::Resource property :id, Serial - property :validation_type, String, :length => 255 - property :model_uri, String, :length => 255 - property :algorithm_uri, String, :length => 255 - property :training_dataset_uri, String, :length => 255 - property :test_target_dataset_uri, String, :length => 255 - property :test_dataset_uri, String, :length => 255 - property :prediction_dataset_uri, String, :length => 255 - property :prediction_feature, String, :length => 255 + property :validation_type, String, :length => 512 + property :model_uri, String, :length => 512 + property :algorithm_uri, String, :length => 512 + property :training_dataset_uri, String, :length => 512 + property :test_target_dataset_uri, String, :length => 512 + property :test_dataset_uri, String, :length => 512 + property :prediction_dataset_uri, String, :length => 512 + property :prediction_feature, String, :length => 512 property :created_at, DateTime property :num_instances, Integer property :num_without_class, Integer @@ -121,8 +121,8 @@ module Lib include DataMapper::Resource property :id, Serial - property :algorithm_uri, String, :length => 255 - property :dataset_uri, String, :length => 255 + property :algorithm_uri, String, :length => 512 + property :dataset_uri, String, :length => 512 property :created_at, DateTime property :num_folds, Integer, :default => 10 property :random_seed, Integer, :default => 1 |