lib/rumale/linear_model/ridge.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::DFloat] (shape: [n_samples, n_outputs]) The target values to be used for fitting the model.
# @return [Ridge] 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)
        if @params[:solver] == 'svd' && enable_linalg?(warning: false)
          fit_svd(x, y)
        elsif @params[:solver] == 'lbfgs'
          fit_lbfgs(x, y)
        else
          fit_sgd(x, y)
        end
        self
      end
def fit ( x , y ) x = check_convert_sample_array ( x ) y = check_convert_tvalue_array ( y ) check_sample_tvalue_size ( x , y ) if @params [ :solver ] == 'svd' && enable_linalg? ( warning : false ) fit_svd ( x , y ) elsif @params [ :solver ] == 'lbfgs' fit_lbfgs ( x , y ) else fit_sgd ( x , y ) end self end
Fit the model with given training data.
Fit the model with given training data .
The learned regressor itself.
The learned regressor itself .
Ridge
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, n_outputs]) The target values to be used for fitting the model.
[ n_samples n_outputs ] ) The target values to be used for fitting the model .