Added warmStart to Train function definition

This commit is contained in:
Rishabh Garg
2021-03-17 18:51:00 +05:30
parent fd43668cda
commit e5935d4eb0
2 changed files with 16 additions and 8 deletions
@@ -179,7 +179,8 @@ class RandomForest
const double minimumGainSplit = 1e-7,
const size_t maximumDepth = 0,
DimensionSelectionType dimensionSelector =
DimensionSelectionType());
DimensionSelectionType(),
bool warmStart = false);
/**
* Train the random forest on the given labeled training data with the given
@@ -211,7 +212,8 @@ class RandomForest
const double minimumGainSplit = 1e-7,
const size_t maximumDepth = 0,
DimensionSelectionType dimensionSelector =
DimensionSelectionType());
DimensionSelectionType(),
bool warmStart = false);
/**
* Train the random forest on the given weighted labeled training data with
@@ -241,7 +243,8 @@ class RandomForest
const double minimumGainSplit = 1e-7,
const size_t maximumDepth = 0,
DimensionSelectionType dimensionSelector =
DimensionSelectionType());
DimensionSelectionType(),
bool warmStart = false);
/**
* Train the random forest on the given weighted labeled training data with
@@ -274,7 +277,8 @@ class RandomForest
const double minimumGainSplit = 1e-7,
const size_t maximumDepth = 0,
DimensionSelectionType dimensionSelector =
DimensionSelectionType());
DimensionSelectionType(),
bool warmStart = false);
/**
* Predict the class of the given point. If the random forest has not been
@@ -160,7 +160,8 @@ double RandomForest<
const size_t minimumLeafSize,
const double minimumGainSplit,
const size_t maximumDepth,
DimensionSelectionType dimensionSelector)
DimensionSelectionType dimensionSelector,
bool warmStart)
{
// Pass off to Train().
data::DatasetInfo info; // Ignored by Train().
@@ -192,7 +193,8 @@ double RandomForest<
const size_t minimumLeafSize,
const double minimumGainSplit,
const size_t maximumDepth,
DimensionSelectionType dimensionSelector)
DimensionSelectionType dimensionSelector,
bool warmStart)
{
// Pass off to Train().
arma::rowvec weights; // Ignored by Train().
@@ -223,7 +225,8 @@ double RandomForest<
const size_t minimumLeafSize,
const double minimumGainSplit,
const size_t maximumDepth,
DimensionSelectionType dimensionSelector)
DimensionSelectionType dimensionSelector,
bool warmStart)
{
// Pass off to Train().
data::DatasetInfo info; // Ignored by Train().
@@ -255,7 +258,8 @@ double RandomForest<
const size_t minimumLeafSize,
const double minimumGainSplit,
const size_t maximumDepth,
DimensionSelectionType dimensionSelector)
DimensionSelectionType dimensionSelector,
bool warmStart)
{
// Pass off to Train().
return Train<true, true, false>(dataset, datasetInfo, labels, numClasses, weights,