lib/rumale/ensemble/voting_regressor.rb
# Fit the model with given training data.
#
# @param x [Numo::DFloat] (shape: [n_samples, n_features]) The training data to be used for fitting the model.
# @param y [Numo::Int32] (shape: [n_samples]) The labels to be used for fitting the model.
# @return [VotingRegressor] The learned regressor itself.
Fit the model with given training data.
Fit the model with given training data .
def fit(x, y)
        x = check_convert_sample_array(x)
        y = check_convert_tvalue_array(y)
        check_sample_tvalue_size(x, y)
        @n_outputs = y.ndim > 1 ? y.shape[1] : 1
        @estimators.each_key { |name| @estimators[name].fit(x, y) }
        self
      end
def fit ( x , y ) x = check_convert_sample_array ( x ) y = check_convert_tvalue_array ( y ) check_sample_tvalue_size ( x , y ) @n_outputs = y . ndim > 1 ? y . shape [ 1 ] : 1 @estimators . each_key { | name | @estimators [ name ] . fit ( x , y ) } self end
Fit the model with given training data.
Fit the model with given training data .
The learned regressor itself.
The learned regressor itself .
VotingRegressor
x
[n_samples, n_features]) The training data to be used for fitting the model.
[ n_samples n_features ] ) The training data to be used for fitting the model .
y
[n_samples]) The labels to be used for fitting the model.
[ n_samples ] ) The labels to be used for fitting the model .