Method: Rumale::ModelSelection::GridSearchCV#predict

Defined in:
lib/rumale/model_selection/grid_search_cv.rb

#predict(x) ⇒ Numo::NArray

Call the predict method of learned estimator with the best parameter.

Parameters:

  • x (Numo::DFloat)

    (shape: [n_samples, n_features]) The samples to obtain prediction result.

Returns:

  • (Numo::NArray)

    Predicted results.



122
123
124
125
# File 'lib/rumale/model_selection/grid_search_cv.rb', line 122

def predict(x)
  check_sample_array(x)
  @best_estimator.predict(x)
end