Class: CmdStan::MLE

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/cmdstan/mle.rb

Instance Method Summary collapse

Constructor Details

#initialize(output_file) ⇒ MLE

private TODO use runset for args



7
8
9
# File 'lib/cmdstan/mle.rb', line 7

def initialize(output_file)
  @output_file = output_file
end

Instance Method Details

#column_namesObject



18
19
20
# File 'lib/cmdstan/mle.rb', line 18

def column_names
  optimized_params.keys
end

#optimized_paramsObject



11
12
13
14
15
16
# File 'lib/cmdstan/mle.rb', line 11

def optimized_params
  CSV.foreach(@output_file.path, skip_lines: /^#/, headers: true, converters: :numeric) do |row|
    return row.to_h
  end
  raise "Bug detected"
end