Method: Experiment::Base#run!

Defined in:
lib/experiment/base.rb

#run!(cv) ⇒ Object

runs the whole experiment, called by the framework



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/experiment/base.rb', line 83

def run!(cv)
  @cvs = cv || 1
   @results = {}
  Notify.started @experiment
   split_up_data
  write_dir!
  @cvs.times do |cv_num|
    @bm = []
    @current_cv = cv_num
    File.open(@dir + "/raw-#{cv_num}.txt", "w") do |output|
      @ouptut_file = output
        run_the_experiment
    end
    array_merge @results, analyze_result!(@dir + "/raw-#{cv_num}.txt", @dir + "/analyzed-#{cv_num}.txt")
    write_performance!
    Notify.cv_done @experiment, cv_num
  end
  summarize_performance!
  summarize_results! @results
  specification!
  cleanup!
  Notify.completed @experiment
  puts File.read(@dir + "/summary.mmd") if @options.summary
end