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

Loss functions for daal4py GBT model and other models

tcs_hormazd
Beginner
2,725 Views

Hello,

 

Where can we find documentation about which specific loss functions we can pass to daal4py models (such as the  Gradient Boosted Regression model)?

0 Kudos
1 Solution
JaideepK_Intel
Employee
2,675 Views
0 Kudos
6 Replies
JaideepK_Intel
Employee
2,676 Views

Hi,

Thank you for posting in Intel Communities.

For Regression Gradient Boosted Trees the loss function is squared and for Classification Gradient Boosted Trees loss function is crossEntropy. Please go through below documentation:

  1. https://oneapi-src.github.io/oneDAL/daal/algorithms/gradient_boosted_trees/gradient-boosted-trees-regression.html
  2. https://oneapi-src.github.io/oneDAL/daal/algorithms/gradient_boosted_trees/gradient-boosted-trees-classification.html
  3. https://intelpython.github.io/daal4py/algorithms.html#gradient-boosted-regression
  4. https://github.com/intel/scikit-learn-intelex/tree/master/examples/daal4py

 

Thanks,

Jaideep

 

0 Kudos
tcs_hormazd
Beginner
2,638 Views

Thank you, Jaideep. Does the Regression Gradient Boosted Tree accept any loss function for the loss function parameter other than the default 'squared' loss?

0 Kudos
JaideepK_Intel
Employee
2,620 Views

Hi,

We recommend you to use scikit-learn-intelex package instead of daal4py.

Intel(R) Extension for Scikit-learn contains scikit-learn patching functionality that was originally available in daal4py package.

please go through below link:

https://github.com/intel/scikit-learn-intelex


daal4py Gradient Bossting Classification model creation from XGBoost example:

https://github.com/intel/scikit-learn-intelex/blob/master/examples/daal4py/gbt_cls_model_create_from_xgboost_batch.py


sorry to inform that in daal4py for Regression Gradient Boosted Trees model and for Classification Gradient Boosted Trees models support only one loss function i.e squared and crossEntropy.


Thanks,

Jaideep



0 Kudos
JaideepK_Intel
Employee
2,593 Views

Hi,


If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!


Thanks,

Jaideep


0 Kudos
tcs_hormazd
Beginner
2,582 Views

Hi Jaideep,

 

Thank you for your help with my query. Sorry for the delay. I have accepted one of the replies as a solution.

 

Best,

 

Hormazd

0 Kudos
JaideepK_Intel
Employee
2,575 Views

Hi,


Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Have a great day ahead.


Thanks,

Jaideep


0 Kudos
Reply