Method: LSModel.modelOutput

Defined in:
lib/lsmodel.rb

.modelOutput(model, model_coeffs, inputs) ⇒ Object



141
142
143
144
145
146
147
148
149
150
151
# File 'lib/lsmodel.rb', line 141

def LSModel.modelOutput(model, model_coeffs, inputs)
  inputs.collect!{|input| input.collect {|inn| inn.to_f}}
  input = Matrix.rows(inputs)
  model = convertModelInputString(model)
  # Create the modelling Matrix
  rows  = []
  (0...input.row_size).each {|i| rows << eval(model) }
  model_matrix = Matrix.rows(rows)
  #test pp model_matrix
  modelOutput = model_matrix * model_coeffs
end