v2.0.0
Loading...
Searching...
No Matches
ml_pipeline.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef ML_PIPELINE_H
36#define ML_PIPELINE_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "ml_global.h"
43#include "ml_model.h"
44#include "ml_scaler.h"
45
46//=============================================================================================================
47// DEFINE NAMESPACE MLLIB
48//=============================================================================================================
49
50namespace MLLIB{
51
52//=============================================================================================================
57{
58public:
59 //=========================================================================================================
63 MlPipeline();
64
65 //=========================================================================================================
71 void setScaler(const MlScaler& scaler);
72
73 //=========================================================================================================
79 void setModel(MlModel::SPtr model);
80
81 //=========================================================================================================
87 void fitScaler(const MlTensor& X);
88
89 //=========================================================================================================
96 MlTensor predict(const MlTensor& X) const;
97
98private:
99 MlScaler m_scaler;
100 MlModel::SPtr m_model;
101 bool m_hasScaler = false;
102};
103
104} // namespace MLLIB
105
106#endif // ML_PIPELINE_H
MlModel pure-abstract base class declaration.
MlScaler class declaration.
ml library export/import macros.
#define MLSHARED_EXPORT
Definition ml_global.h:55
constexpr int X
Machine learning (models, pipelines, ONNX Runtime integration).
QSharedPointer< MlModel > SPtr
Definition ml_model.h:66
void fitScaler(const MlTensor &X)
MlTensor predict(const MlTensor &X) const
void setScaler(const MlScaler &scaler)
void setModel(MlModel::SPtr model)
Feature scaler (StandardScaler or MinMaxScaler).
Definition ml_scaler.h:62
N-dimensional tensor with contiguous row-major (C-order) float32 storage.
Definition ml_tensor.h:79