diff options
author | davor <vorgrimmlerdavid@gmx.de> | 2012-03-05 12:16:42 +0100 |
---|---|---|
committer | davor <vorgrimmlerdavid@gmx.de> | 2012-03-05 12:16:42 +0100 |
commit | 89a2f2e8f572c1e0a1ef479a6572322da1e0a6b9 (patch) | |
tree | 2f5b200423b12aa34ba2f51723b61b92b6bdfb13 | |
parent | 98bf7a075d298058ad4f44ce3a821e355f99ea7c (diff) |
Set all feature types as numeric for rfe results.
-rw-r--r-- | feature_selection.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/feature_selection.rb b/feature_selection.rb index d375a0e..556ccf8 100644 --- a/feature_selection.rb +++ b/feature_selection.rb @@ -70,7 +70,15 @@ post '/feature_selection/rfe/?' do task = OpenTox::Task.create("Recursive Feature Elimination", url_for('/feature_selection',:full)) do |task| r_result_file = OpenTox::Algorithm::FeatureSelection.rfe( { :ds_csv_file => tf_ds.path, :prediction_feature => prediction_feature, :fds_csv_file => tf_fds.path, :del_missing => del_missing } ) - r_result_uri = OpenTox::Dataset.create_from_csv_file(r_result_file).uri + + parser = OpenTox::Parser::Spreadsheets.new + ds = OpenTox::Dataset.new + ds.save + parser.dataset = ds + ds = parser.load_csv(File.open(r_result_file).read,false,true) + ds.save + r_result_uri = ds.uri + #r_result_uri = OpenTox::Dataset.create_from_csv_file(r_result_file).uri begin tf_ds.close!; tf_fds.close! File.unlink(r_result_file) |