philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OneHotEncoder Class Reference

#include <Encoder.h>

Inheritance diagram for OneHotEncoder:
Transformer Predictor

Public Member Functions

 OneHotEncoder ()
 
void fit (const Matrix< double > &X, const Matrix< double > &y) override
 
Matrix< double > transform (const Matrix< double > &in) override
 
- Public Member Functions inherited from Transformer
Matrix< double > predict (const Matrix< double > &in) override
 
virtual void fit (const Matrix< double > &X, const Matrix< double > &y)=0
 
virtual Matrix< double > predict (const Matrix< double > &)=0
 
virtual Matrix< double > transform (const Matrix< double > &)=0
 

Private Attributes

Matrix< int > unique_values
 

Constructor & Destructor Documentation

◆ OneHotEncoder()

OneHotEncoder::OneHotEncoder ( )
inline

Member Function Documentation

◆ fit()

void OneHotEncoder::fit ( const Matrix< double > &  X,
const Matrix< double > &  y 
)
inlineoverridevirtual

Implements training algorithm

Parameters
Xarray-like with the shape: [n_samples, n_features]
yarray-like with shape: [n_samples, 1]
Returns
this

Implements Predictor.

◆ transform()

Matrix< double > OneHotEncoder::transform ( const Matrix< double > &  in)
inlineoverridevirtual

Implements Predictor.

Member Data Documentation

◆ unique_values

Matrix<int> OneHotEncoder::unique_values
private

The documentation for this class was generated from the following file: