ML functions
 
Loading...
Searching...
No Matches
ml::XGBoost Class Reference

A class for managing XGBoost models and making predictions. More...

#include <XGBoost.h>

Public Member Functions

 XGBoost (std::string pathToJSON)
 Construct a new XGBoost object.
 
void predict (VectorPtr &input, std::vector< float > &resultVector, int numInputs, int numFeatures)
 Make predictions using the XGBoost model.
 

Public Attributes

BoosterHandle booster
 Handle to the XGBoost booster.
 

Detailed Description

A class for managing XGBoost models and making predictions.

Constructor & Destructor Documentation

◆ XGBoost()

ml::XGBoost::XGBoost ( std::string pathToJSON)
inline

Construct a new XGBoost object.

Parameters
pathToJSONThe path to the JSON file containing the XGBoost model.

Member Function Documentation

◆ predict()

void ml::XGBoost::predict ( VectorPtr & input,
std::vector< float > & resultVector,
int numInputs,
int numFeatures )
inline

Make predictions using the XGBoost model.

Parameters
inputThe input vector containing the features.
resultVectorThe output vector to store the predictions.
numInputsThe number of input rows.
numFeaturesThe number of features per input row.

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