Skip to content

Commit

Permalink
fix one-algorithm build and spicific prediction case after probabilit…
Browse files Browse the repository at this point in the history
…y feature (#177)
  • Loading branch information
ShvetsKS authored Nov 3, 2019
1 parent 520798d commit 970c25b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ Status PredictClassificationTask<algorithmFPType, cpu>::predictByBlocksOfTrees(
DAAL_CHECK_BLOCK_STATUS(resBD);
WriteOnlyRows<algorithmFPType, cpu> probBD(_prob, 0, 1);
DAAL_CHECK_BLOCK_STATUS(probBD);
algorithmFPType* const probBDPtr = probBD.get();

const size_t nThreads = daal::threader_get_threads_number();
daal::SafeStatus safeStat;
Expand All @@ -671,9 +672,9 @@ Status PredictClassificationTask<algorithmFPType, cpu>::predictByBlocksOfTrees(
ReadRows<algorithmFPType, cpu> xBD(const_cast<NumericTable*>(_data), iStartRow, nRowsToProcess);
DAAL_CHECK_BLOCK_STATUS_THR(xBD);
algorithmFPType* res = resBD.get() + iStartRow;
algorithmFPType* prob = probBD.get() + iStartRow * _nClasses;
algorithmFPType* prob = probBDPtr + iStartRow * _nClasses;

if(prob != nullptr)
if(probBDPtr != nullptr)
{
if(nRowsToProcess < 2 * nThreads || cpu == __avx512_mic__)
{
Expand Down
2 changes: 1 addition & 1 deletion makefile.lst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ coordinate_descent += optimization_solver/coordinate_descent objective_function
objective_function += objective_function/inner objective_function/cross_entropy_loss objective_function/cross_entropy_loss/inner objective_function/logistic_loss objective_function/logistic_loss/inner objective_function/mse objective_function/mse/inner
decision_tree += decision_tree/inner regression classifier
dtrees/gbt += dtrees dtrees/gbt/classification dtrees/gbt/classification/inner dtrees/gbt/regression engines classifier regression objective_function
dtrees/forest += dtrees dtrees/regression dtrees/forest/classification dtrees/forest/classification/inner dtrees/forest/regression engines classifier regression distributions
dtrees/forest += dtrees dtrees/regression dtrees/forest/classification dtrees/forest/classification/inner dtrees/forest/regression engines classifier classifier/inner regression distributions
linear_regression += linear_model regression
lasso_regression += linear_model regression optimization_solver objective_function engines
ridge_regression += linear_model regression
Expand Down

0 comments on commit 970c25b

Please sign in to comment.