Class: Stamina::Command::Score
- Inherits:
-
Object
- Object
- Stamina::Command::Score
- Includes:
- Robustness
- Defined in:
- lib/stamina-induction/stamina/command/score.rb
Overview
Scores the labelling of a sample by an automaton
SYNOPSIS
#{program_name} #{command_name} sample.adl automaton.adl
OPTIONS #summarized_options
Instance Method Summary collapse
-
#execute(args) ⇒ Object
Command execution.
Instance Method Details
#execute(args) ⇒ Object
Command execution
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/stamina-induction/stamina/command/score.rb', line 21 def execute(args) raise Quickl::Help unless args.size == 2 sample = Stamina::ADL::parse_sample_file assert_readable_file(args.first) automaton = Stamina::ADL::parse_automaton_file assert_readable_file(args.last) classified_as = automaton.signature(sample) reference = sample.signature scoring = Scoring.scoring(classified_as, reference) puts scoring.to_s end |