Intel® oneAPI Data Analytics Library
Learn from community members on how to build compute-intensive applications that run efficiently on Intel® architecture.

getLogP and getLogTheta in multinomial_naive_bayes::Model return naked pointers

Graham_M_
Beginner
481 Views

In DAAL Beta Update 3, these two methods of daal::algorithms::multinomial_naive_bayes::Model:

data_management::NumericTable *getLogP() { return _logP.get(); }

data_management::NumericTable *getLogTheta() { return _logTheta.get(); }

are returning naked pointers where, _logP and _logTheta are shared pointers to numeric tables. This would appear to make it difficult to use these numeric tables in places where a SharedPtr<NumericTable> is required. Is there any way around this?
 

0 Kudos
1 Reply
Ilya_B_Intel
Employee
481 Views

Thank you Graham a lot for reviewing our Beta codes!

We already fixed that in our internal code branch (proper SharedPtr is returned now).

The quickest workaround on your side, could be in modification of multinomial_naive_bayes_model.h file and adding proper functions:

SharedPtr<data_management::NumericTable> getLogP_() { return _logP; }

 

0 Kudos
Reply