Class: Stan::FitResult
- Inherits:
-
Object
- Object
- Stan::FitResult
- Defined in:
- lib/stan/fit_result.rb
Instance Attribute Summary collapse
-
#data_rows ⇒ Object
readonly
Returns the value of attribute data_rows.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(original_output) ⇒ FitResult
constructor
A new instance of FitResult.
- #parameters ⇒ Object
Constructor Details
#initialize(original_output) ⇒ FitResult
Returns a new instance of FitResult.
5 6 7 8 9 10 11 |
# File 'lib/stan/fit_result.rb', line 5 def initialize(original_output) @rows = Array(original_output.split("\n")) @headers = rows[38].to_s.split(",") # In L39 there is the header column @data_rows = rows[43..].map { |r| r.split(",") } # From L44 on there is the raw data! define_histograms! end |
Instance Attribute Details
#data_rows ⇒ Object (readonly)
Returns the value of attribute data_rows.
3 4 5 |
# File 'lib/stan/fit_result.rb', line 3 def data_rows @data_rows end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/stan/fit_result.rb', line 3 def headers @headers end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
3 4 5 |
# File 'lib/stan/fit_result.rb', line 3 def rows @rows end |
Instance Method Details
#parameters ⇒ Object
13 14 15 |
# File 'lib/stan/fit_result.rb', line 13 def parameters headers[7..] end |