Class: EvocCLI::Experiment

Inherits:
Thor
  • Object
show all
Defined in:
lib/evoc_cli/experiment.rb

Instance Method Summary collapse

Instance Method Details

#algorithmsObject

execute_scenarios

input: csv of queries from #create_queries output: query_id, algorithm, average_precision



68
# File 'lib/evoc_cli/experiment.rb', line 68

method_option :algorithms, type: :array, default: ['tarmaq0','rose','co_change'], desc: "Which algorithms to use"

#execute_scenariosObject



83
84
85
86
87
88
89
90
91
# File 'lib/evoc_cli/experiment.rb', line 83

def execute_scenarios
  if !options[:permutation].nil?
    STDERR.puts "Permutation option has been set, but the option is currently disabled and will have no effect"
  end
  #MemoryProfiler.start('execute_scenarios',30)
  e = Evoc::Experiment.new(options)
  e.execute_scenarios
  #MemoryProfiler.stop
end

#generate_queriesObject



56
57
58
59
60
61
# File 'lib/evoc_cli/experiment.rb', line 56

def generate_queries
  #MemoryProfiler.start('create_queries',30)
  e = Evoc::Experiment.new(options)
  e.generate_queries
  #MemoryProfiler.stop
end

#sample_transactionsObject



33
34
35
36
37
# File 'lib/evoc_cli/experiment.rb', line 33

def sample_transactions
  e = Evoc::Experiment.new(options)
  STDOUT.puts 'tx_id'
  STDOUT.puts e.sample_transactions
end

#seedObject

generate_queries



22
# File 'lib/evoc_cli/experiment.rb', line 22

method_option :seed, type: :numeric, default: 42, desc: "Seed to use when initializing random number generator"