Skip to content

Commit

Permalink
cleanup after revert
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuber21 committed Mar 23, 2023
1 parent 7e2c9c4 commit 3efc0d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,7 @@ protected:
void chooseFeatures()
{
const size_t n = nFeatures();
const size_t nGen = _nFeaturesPerNode;
// const size_t nGen = (!_par.memorySavingMode && !_maxLeafNodes && !_useConstFeatures) ? n : _nFeaturesPerNode;
const size_t nGen = (!_par.memorySavingMode && !_maxLeafNodes && !_useConstFeatures) ? n : _nFeaturesPerNode;
*_numElems += n;
RNGs<IndexType, cpu> rng;
rng.drawKFromBufferWithoutReplacement(nGen, _aFeatureIdx.get(), _aFeatureIdx.get() + nGen, _engineImpl->getState(), n);
Expand Down Expand Up @@ -1088,7 +1087,7 @@ bool TrainBatchTaskBase<algorithmFPType, BinIndexType, DataHelper, cpu>::findBes
algorithmFPType totalWeights)
{
/* counter of the number of visited features, we visit _nFeaturesPerNode
* depending on _par.useConstFeatures constant features can be skipped
* depending on _useConstFeatures, constant features can be skipped
*/
size_t nVisitedFeature = 0;
/* total number of features */
Expand Down Expand Up @@ -1143,7 +1142,7 @@ bool TrainBatchTaskBase<algorithmFPType, BinIndexType, DataHelper, cpu>::findBes
const bool bUseIndexedFeatures =
(!_par.memorySavingMode) && (algorithmFPType(n) > qMax * algorithmFPType(_helper.indexedFeatures().numIndices(iFeature)));

if (false && !_maxLeafNodes && !_useConstFeatures && !_par.memorySavingMode)
if (!_maxLeafNodes && !_useConstFeatures && !_par.memorySavingMode)
{
if (_aConstFeatureIdx[maxFeatures + iFeature] > 0) continue; //selected feature is known constant feature
if (!_helper.hasDiffFeatureValues(iFeature, aIdx, n))
Expand All @@ -1166,7 +1165,7 @@ bool TrainBatchTaskBase<algorithmFPType, BinIndexType, DataHelper, cpu>::findBes
{
split.featureUnordered = _featHelper.isUnordered(iFeature);
//index of best feature value in the array of sorted feature values
const int64_t idxFeatureValue =
const int idxFeatureValue =
_helper.findBestSplitForFeatureSorted(featureBuf(0), iFeature, aIdx, n, _par.minObservationsInLeafNode, curImpurity, split,
_minWeightLeaf, totalWeights, _binIndex + _data->getNumberOfRows() * iFeature);
if (idxFeatureValue < 0) continue;
Expand Down
1 change: 0 additions & 1 deletion cpp/daal/src/externals/service_rng.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#define __SERVICE_RNG_H__

#include "services/daal_defines.h"
#include "src/services/service_defines.h"
#include "src/externals/service_memory.h"
#include "src/externals/service_rng_mkl.h"

Expand Down

0 comments on commit 3efc0d0

Please sign in to comment.