[ 
https://issues.apache.org/jira/browse/IGNITE-15024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Saurabh Chhajed updated IGNITE-15024:
-------------------------------------
    Description: 
Currently, Catboost inference code in Ignite ML doesn't support Categorical 
features, Float features only. This limits the ability to use this feature for 
a wide variety of models and cat boost being the model primarily being 
optimized for categorical features, and widely used for those. We can add 
support for categorical features for both regression and classification models 
with small changes. I would be glad to contribute the same. 

 

Original Issue on which this feature was added - 
https://issues.apache.org/jira/browse/IGNITE-13714

Below is the code in CatBoostClassificationModel.java which needs to be updated 
to reflect categorical features support, I already have a code patch written, 
can update it after proper test cases and testing.
{code:java}
try {
 double predict = model.predict(floatInput, model.getFeatureNames())
 .get(0, 0);
 // use formula based on 
https://github.com/catboost/benchmarks/blob/61d62512f751325a14dd885bb71f8c2dabf7e24b/quality_benchmarks/catboost_experiment.py#L77
 return Math.pow(1 + Math.exp(-predict), -1);
} catch (CatBoostError e) {{code}

  was:
Currently Catboost inference code in Ignite ML doesn't support Categorical 
features, Float features only. We can add support for categorical features for 
both regression and classification models with small changes. I would be glad 
to contribute the same. 

 

Original Issue on which this feature was added - 
https://issues.apache.org/jira/browse/IGNITE-13714

Below is the code in CatBoostClassificationModel.java which needs to be updated 
to reflect categorical features support, I already have code patch written, can 
update after proper test cases and testing.
{code:java}
try {
 double predict = model.predict(floatInput, model.getFeatureNames())
 .get(0, 0);
 // use formula based on 
https://github.com/catboost/benchmarks/blob/61d62512f751325a14dd885bb71f8c2dabf7e24b/quality_benchmarks/catboost_experiment.py#L77
 return Math.pow(1 + Math.exp(-predict), -1);
} catch (CatBoostError e) {{code}


> Add Categorical Features Support for Catboost Inference
> -------------------------------------------------------
>
>                 Key: IGNITE-15024
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15024
>             Project: Ignite
>          Issue Type: Improvement
>          Components: ml
>            Reporter: Saurabh Chhajed
>            Priority: Major
>              Labels: newbie
>
> Currently, Catboost inference code in Ignite ML doesn't support Categorical 
> features, Float features only. This limits the ability to use this feature 
> for a wide variety of models and cat boost being the model primarily being 
> optimized for categorical features, and widely used for those. We can add 
> support for categorical features for both regression and classification 
> models with small changes. I would be glad to contribute the same. 
>  
> Original Issue on which this feature was added - 
> https://issues.apache.org/jira/browse/IGNITE-13714
> Below is the code in CatBoostClassificationModel.java which needs to be 
> updated to reflect categorical features support, I already have a code patch 
> written, can update it after proper test cases and testing.
> {code:java}
> try {
>  double predict = model.predict(floatInput, model.getFeatureNames())
>  .get(0, 0);
>  // use formula based on 
> https://github.com/catboost/benchmarks/blob/61d62512f751325a14dd885bb71f8c2dabf7e24b/quality_benchmarks/catboost_experiment.py#L77
>  return Math.pow(1 + Math.exp(-predict), -1);
> } catch (CatBoostError e) {{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to