diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-09-23 14:51:41 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-09-23 14:51:41 +0200 |
commit | d5bf97c2cb999539c56bf59aa1d7d3286745be84 (patch) | |
tree | 91d5ab3fd9641c7349d45356d43aef867e4bee92 /test/dataset.rb | |
parent | 259cd085e053193b4c166495ae1af35cfa94bcf6 (diff) |
validations fixed (all models were executed with default parameters)
Diffstat (limited to 'test/dataset.rb')
-rw-r--r-- | test/dataset.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/dataset.rb b/test/dataset.rb index 84be547..752073e 100644 --- a/test/dataset.rb +++ b/test/dataset.rb @@ -202,5 +202,15 @@ class DatasetTest < MiniTest::Test assert_equal 0.00323, d2.data_entries[5][0] end + def test_scaled_dataset + original_dataset = Dataset.from_csv_file File.join(DATA_DIR,"EPAFHM.mini.csv") + scaled_dataset = original_dataset.scale + scaled_dataset.data_entries.each_with_index do |row,i| + row.each_with_index do |value,j| + assert_equal original_dataset.data_entries[i][j].round(4), scaled_dataset.original_value(value,j).round(4) if value # ignore nils + end + end + end + end |