Method: Rumale::Preprocessing::LabelEncoder#fit_transform
- Defined in:
- lib/rumale/preprocessing/label_encoder.rb
#fit_transform(x) ⇒ Numo::Int32
Fit label-encoder to labels, then return encoded labels.
53 54 55 56 57 |
# File 'lib/rumale/preprocessing/label_encoder.rb', line 53 def fit_transform(x, _y = nil) x = x.to_a if x.is_a?(Numo::NArray) check_params_type(Array, x: x) fit(x).transform(x) end |