From 3efc0d09ed94d103c78b0259a24b14d9dbe34992 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 23 Mar 2023 01:30:27 -0700 Subject: [PATCH] cleanup after revert --- .../dtrees/forest/df_train_dense_default_impl.i | 9 ++++----- cpp/daal/src/externals/service_rng.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpp/daal/src/algorithms/dtrees/forest/df_train_dense_default_impl.i b/cpp/daal/src/algorithms/dtrees/forest/df_train_dense_default_impl.i index 3505ee2f45b..bbfeaed2d2f 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/df_train_dense_default_impl.i +++ b/cpp/daal/src/algorithms/dtrees/forest/df_train_dense_default_impl.i @@ -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 rng; rng.drawKFromBufferWithoutReplacement(nGen, _aFeatureIdx.get(), _aFeatureIdx.get() + nGen, _engineImpl->getState(), n); @@ -1088,7 +1087,7 @@ bool TrainBatchTaskBase::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 */ @@ -1143,7 +1142,7 @@ bool TrainBatchTaskBase::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)) @@ -1166,7 +1165,7 @@ bool TrainBatchTaskBase::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; diff --git a/cpp/daal/src/externals/service_rng.h b/cpp/daal/src/externals/service_rng.h index 0856079121b..453889a9244 100644 --- a/cpp/daal/src/externals/service_rng.h +++ b/cpp/daal/src/externals/service_rng.h @@ -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"