summaryrefslogtreecommitdiffstats
path: root/estimation-scripts/demo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'estimation-scripts/demo.rb')
-rw-r--r--estimation-scripts/demo.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/estimation-scripts/demo.rb b/estimation-scripts/demo.rb
new file mode 100644
index 0000000..9cf235b
--- /dev/null
+++ b/estimation-scripts/demo.rb
@@ -0,0 +1,18 @@
+require 'Sample'
+require 'Estimators'
+require 'EstimationResults'
+
+samples = Sample.parseFromFile(ARGV[0])
+
+est = WINXEstimator.new(ARGV[1].to_i)
+
+results = EstimationResults.new(est, samples)
+results.setMaxError(10.0)
+
+relErrors = results.getRelativeErrors
+
+relErrors.keys.sort.each do |x|
+ puts "#{x} #{relErrors[x]}"
+end
+
+#puts "RMSE: #{results.getRootMeanSquareErrorRelative}"