philsupertramp/game-math
Loading...
Searching...
No Matches
Encoder.h
Go to the documentation of this file.
1#include "../Predictor.h"
2
3
5{
7
8public:
10 : Transformer() { }
11
12 void fit(const Matrix<double>& X, [[maybe_unused]] const Matrix<double>& y) override { unique_values = unique(X, 0); }
13
14 Matrix<double> transform(const Matrix<double>& in) override { return in; }
15};
Definition: Matrix.h:42
Definition: Encoder.h:5
Matrix< int > unique_values
Definition: Encoder.h:6
Matrix< double > transform(const Matrix< double > &in) override
Definition: Encoder.h:14
void fit(const Matrix< double > &X, const Matrix< double > &y) override
Definition: Encoder.h:12
OneHotEncoder()
Definition: Encoder.h:9
Definition: Predictor.h:30
Matrix< T > unique(const Matrix< T > &in, int axis=0)
Definition: matrix_utils.h:466