<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hi Sandeep,
<div><br>
</div>
<div>Firstly, we always welcome contributions. In this case the difficulty depends on if you only want inference support or if you’d also like to train models.</div>
<div><br>
</div>
<div>To add pure inferencing support (similar to our ONNX, OCI and XGBoost external model support) the Tribuo bits would be relatively simple as you don’t need to interact with the provenance system much. You’d subclass org.tribuo.interop.ExternalModel and
 implement the necessary methods to get things out of the Tribuo representation and into the appropriate LightGBM one. It would be pretty similar to the existing org.tribuo.common.xgboost.XGBoostExternalModel. However it looks like the LightGBM Java interface
 is autogenerated and very low level (<a href="https://central.sonatype.com/artifact/com.microsoft.ml.lightgbm/lightgbmlib/3.3.510">https://central.sonatype.com/artifact/com.microsoft.ml.lightgbm/lightgbmlib/3.3.510</a>), so it would need a fair amount of work
 to get that C-like API into something that’s easy to use from Java. The SWIG wrapper is basically passing around raw pointers so it needs actual objects and methods built on top of that. Microsoft built a lot of that for their SynapseML API to LightGBM (<a href="https://github.com/microsoft/SynapseML/tree/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm">https://github.com/microsoft/SynapseML/tree/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm</a>),
 but that is for Apache Spark integration and I don’t think it would be reusable outside of Spark & Scala (and we don’t want Scala in Tribuo’s builds it adds too much complexity). Alternatively you could look at Amazon’s DJL which has a LightGBM interface (<a href="https://github.com/deepjavalibrary/djl/tree/master/engines/ml/lightgbm">https://github.com/deepjavalibrary/djl/tree/master/engines/ml/lightgbm</a>),
 but as that’s focused on deep learning I don’t know if it would give you the necessary control over the incoming feature representation. DJL’s wrapper is less than 1000 lines though, so it probably isn’t too hard to make an equivalent for Tribuo.</div>
<div><br>
</div>
<div>Basically on the Tribuo side you’d need to write LightGBMExternalModel (e.g.
<a href="https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostExternalModel.java">
https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostExternalModel.java</a>), a short protobuf definition for serialization (e.g.
<a href="https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/resources/protos/tribuo-xgboost.proto#L54">
https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/resources/protos/tribuo-xgboost.proto#L54</a>), then some kind of output converter mechanism if you wanted it to work for both classification & regression (<a href="https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostOutputConverter.java">https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostOutputConverter.java</a>),
 or just make it only do regression. Then you’d need to map from Tribuo’s internal representation of a sparse vector/matrix of feature values to the internal representation LightGBM wants (which shouldn’t be too bad as it supports CSR and Tribuo’s representation
 is basically that with more objects, e.g. <a href="https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostTrainer.java#L711">
https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostTrainer.java#L711</a>), write a mapping from LightGBM’s output to Tribuo’s output (which if it’s an array is easy, otherwise will require some unpicking),
 and then the glue to stick that to the SWIG wrapper Microsoft provide. That glue is the worst part as the SWIG isn’t very well documented, but it would be pretty similar to the glue DJL have here - <a href="https://github.com/deepjavalibrary/djl/blob/master/engines/ml/lightgbm/src/main/java/ai/djl/ml/lightgbm/jni/JniUtils.java">https://github.com/deepjavalibrary/djl/blob/master/engines/ml/lightgbm/src/main/java/ai/djl/ml/lightgbm/jni/JniUtils.java</a>.</div>
<div><br>
</div>
<div>Training support would add more complexity on the Tribuo side, though it would be pretty similar to the rest of our XGBoost wrapper so you could base it off that. The main difficulty would still be in getting the LightGBM wrapper up from JNI as now you’ve
 got to pass parameters and configuration across as well, so it’ll be quite a bit more effort.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Adam<br>
<div>
<div>--<br>
Adam Pocock<br>
Principal Member of Technical Staff<br>
Machine Learning Research Group<br>
Oracle Labs, Burlington, MA</div>
</div>
<div><br>
<blockquote type="cite">
<div>On 16 Jun 2023, at 12:23, Sikka, Sandeep <sandeep.sikka@staples.com> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thanks Adam for the feedback. In your opinion, how difficult would it be for one or more experienced Java Engineers to implement support for wrapping the LightGBM Java API in Tribuo?
 Assume no prior experience working in the Tribuo codebase. I am wondering if we take it on for our needs and contribute the developments back to Tribuo, how much time/effort will that take.<o:p></o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Sandeep.<span class="Apple-converted-space"> </span><o:p></o:p></div>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0in 0in;">
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span style="font-size: 12pt;">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;">Adam Pocock <adam.pocock@oracle.com><br>
<b>Date:<span class="Apple-converted-space"> </span></b>Friday, June 16, 2023 at 11:25 AM<br>
<b>To:<span class="Apple-converted-space"> </span></b>"Sikka, Sandeep" <sandeep.sikka@staples.com><br>
<b>Cc:<span class="Apple-converted-space"> </span></b>"Parthasarathy, Bharadwaj" <bharadwaj.parthasarathy@staples.com>, "tribuo-devel@oss.oracle.com" <tribuo-devel@oss.oracle.com>, "Kumar, Navdeep" <navdeep.kumar@staples.com>, Jack Sullivan <jack.t.sullivan@oracle.com><br>
<b>Subject:<span class="Apple-converted-space"> </span></b>Re: [EXT]:Re: [External] : Re: Tribuo Non Numerical Features Support<o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
</div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Hi Sandeep,<span class="Apple-converted-space"> </span><o:p></o:p></div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Tribuo doesn’t support inference for LightGBM models, aside from those which have been exported in ONNX format. You’d have to look at how the ONNX format model expects the categorical
 inputs to be passed in, I’m not sure if ONNX’s TreeEnsembleRegressor (<a href="https://urldefense.com/v3/__https://github.com/onnx/onnx/blob/main/docs/Operators-ml.md*aionnxmltreeensembleregressor__;Iw!!ACWV5N9M2RV99hQ!NqMIzH8F7USIbjeG7iyv2eQ2TKagOulH5hFoK7SAtnilTSkPEh4ZzfTlmypE7r5ljs9cF2l_u7aMjD0knPgubeY58A$" style="color: blue; text-decoration: underline;">https://github.com/onnx/onnx/blob/main/docs/Operators-ml.md#aionnxmltreeensembleregressor</a>)
 supports special treatment of categorical inputs so it might not be possible. It looks like there is support for LightGBM in things like JPMML, but JPMML is AGPL licensed and so we can’t use it in Tribuo. We haven’t looked at directly wrapping the LightGBM
 Java API, as we already had XGBoost support for tree ensembles.<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thanks,<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Adam<o:p></o:p></div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">--<br>
Adam Pocock<br>
Principal Member of Technical Staff<br>
Machine Learning Research Group<br>
Oracle Labs, Burlington, MA<o:p></o:p></div>
</div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><br>
<br>
<o:p></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">On 16 Jun 2023, at 11:08, Sikka, Sandeep <sandeep.sikka@staples.com> wrote:<o:p></o:p></div>
</div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Hi Adam<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thank you for the quick response. We are looking to score (perform inference) on a<span class="apple-converted-space"> </span><a href="https://urldefense.com/v3/__https:/lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMRegressor.html__;!!ACWV5N9M2RV99hQ!MaIMJSbVSuFi4H4SnXBIfhxdZCWgg2GBNhEefwQDhe4vef4HJeHRLEbwfLxphLQ8iFNWOqXkTwp7VTblc7Jy9qPBBw$" style="color: blue; text-decoration: underline;">LGBMRegressor</a><span class="apple-converted-space"> </span>trained
 externally with the categorical features applied using the categorical_features parameter:<span class="apple-converted-space"> </span><a href="https://urldefense.com/v3/__https:/lightgbm.readthedocs.io/en/latest/Advanced-Topics.html*categorical-feature-support__;Iw!!ACWV5N9M2RV99hQ!MaIMJSbVSuFi4H4SnXBIfhxdZCWgg2GBNhEefwQDhe4vef4HJeHRLEbwfLxphLQ8iFNWOqXkTwp7VTblc7LbplBZGQ$" style="color: blue; text-decoration: underline;">https://lightgbm.readthedocs.io/en/latest/Advanced-Topics.html#categorical-feature-support</a>.
 This uses a technique different from OHE:<span class="apple-converted-space"> </span><a href="https://urldefense.com/v3/__https:/lightgbm.readthedocs.io/en/latest/Features.html*optimal-split-for-categorical-features__;Iw!!ACWV5N9M2RV99hQ!MaIMJSbVSuFi4H4SnXBIfhxdZCWgg2GBNhEefwQDhe4vef4HJeHRLEbwfLxphLQ8iFNWOqXkTwp7VTblc7L6i0QwjQ$" style="color: blue; text-decoration: underline;">https://lightgbm.readthedocs.io/en/latest/Features.html#optimal-split-for-categorical-features</a>.
 Do you have any thoughts on how we can achieve inference in Tribuo (we train the model in Python scikit-learn pipelines)?<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thanks<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Sandeep.<span class="apple-converted-space"> </span><o:p></o:p></div>
</div>
<div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-color: currentcolor; border-image: none;">
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span style="font-size: 12pt;">From:<span class="apple-converted-space"> </span></span></b><span style="font-size: 12pt;">Adam Pocock <<a href="mailto:adam.pocock@oracle.com" style="color: blue; text-decoration: underline;">adam.pocock@oracle.com</a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Friday, June 16, 2023 at 9:34 AM<br>
<b>To:<span class="apple-converted-space"> </span></b>"Sikka, Sandeep" <<a href="mailto:sandeep.sikka@staples.com" style="color: blue; text-decoration: underline;">sandeep.sikka@staples.com</a>>, "Parthasarathy, Bharadwaj" <<a href="mailto:bharadwaj.parthasarathy@staples.com" style="color: blue; text-decoration: underline;">bharadwaj.parthasarathy@staples.com</a>><br>
<b>Cc:<span class="apple-converted-space"> </span></b>"<a href="mailto:tribuo-devel@oss.oracle.com" style="color: blue; text-decoration: underline;">tribuo-devel@oss.oracle.com</a>" <<a href="mailto:tribuo-devel@oss.oracle.com" style="color: blue; text-decoration: underline;">tribuo-devel@oss.oracle.com</a>>,
 "Kumar, Navdeep" <<a href="mailto:navdeep.kumar@staples.com" style="color: blue; text-decoration: underline;">navdeep.kumar@staples.com</a>>, Jack Sullivan <<a href="mailto:jack.t.sullivan@oracle.com" style="color: blue; text-decoration: underline;">jack.t.sullivan@oracle.com</a>><br>
<b>Subject:<span class="apple-converted-space"> </span></b>[EXT]:Re: [External] : Re: Tribuo Non Numerical Features Support</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Hi Sandeep, Bharad,<span class="apple-converted-space"> </span><o:p></o:p></div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">The Tribuo mailing list is monitored, but I can’t see the email you sent to the list in the moderator console nor the archives, did you get a bounceback from the mailserver? It may
 be configured only to accept emails from people who have joined the mailing list. Anyway, the Tribuo development team have their email addresses listed in the pom file visible on Github.<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">As to the question of feature support, in Tribuo all features are converted to numerical values during the data loading step. Categoricals can be encoded as one hot features or directly
 as doubles by choosing an index, and ordinals can be encoded as doubles. Very few ML algorithms directly support categorical variables without one hot-encoding or vectorization, I think of the popular ones the only kind that do are trees. Tribuo’s tree package
 doesn’t currently have specializations for categoricals though there is enough information in the feature domain to support that if we do add the algorithmic support. In tree algorithms ordinals are naturally supported as the splits don’t care about the distance
 between any feature values, only their relative ordering (or at least all the splitting algorithms we have in Tribuo are of that kind). You can see how to perform featurization into doubles in a number of ways in the Columnar Data (<a href="https://urldefense.com/v3/__https:/tribuo.org/learn/4.3/tutorials/columnar-tribuo-v4.html__;!!ACWV5N9M2RV99hQ!MaIMJSbVSuFi4H4SnXBIfhxdZCWgg2GBNhEefwQDhe4vef4HJeHRLEbwfLxphLQ8iFNWOqXkTwp7VTblc7J1rg3Sxg$" style="color: blue; text-decoration: underline;">https://tribuo.org/learn/4.3/tutorials/columnar-tribuo-v4.html</a>)
 and Document Classification (<a href="https://urldefense.com/v3/__https:/tribuo.org/learn/4.3/tutorials/document-classification-tribuo-v4.html__;!!ACWV5N9M2RV99hQ!MaIMJSbVSuFi4H4SnXBIfhxdZCWgg2GBNhEefwQDhe4vef4HJeHRLEbwfLxphLQ8iFNWOqXkTwp7VTblc7LtOLJzVw$" style="color: blue; text-decoration: underline;">https://tribuo.org/learn/4.3/tutorials/document-classification-tribuo-v4.html</a>)
 tutorials.<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thanks,<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Adam<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">--<br>
Adam Pocock<br>
Principal Member of Technical Staff<br>
Machine Learning Research Group<br>
Oracle Labs, Burlington, MA<o:p></o:p></div>
</div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><br>
<br>
<br>
<o:p></o:p></div>
</div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">On 16 Jun 2023, at 00:13, Sikka, Sandeep <<a href="mailto:sandeep.sikka@staples.com" style="color: blue; text-decoration: underline;">sandeep.sikka@staples.com</a>> wrote:<o:p></o:p></div>
</div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
<div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Adding a few individual emails on the project from Github. The devel email list doesn’t appear to have any activity.<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thanks<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span style="font-size: 14pt; font-family: Arial, sans-serif; color: rgb(203, 0, 10);">Sandeep Sikka</span></b><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: rgb(100, 100, 100);">Distinguished Engineer</span></b><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: rgb(100, 100, 100);">500 Staples Dr., Framingham MA</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: rgb(100, 100, 100);">508.253.7977</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10.5pt; font-family: Arial, sans-serif;"><a href="mailto:sandeep.sikka@staples.com" style="color: blue; text-decoration: underline;">sandeep.sikka@staples.com</a></span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 18pt;">
<span style="font-size: 3pt; font-family: Arial, sans-serif; color: rgb(100, 100, 100);"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><sub><span style="font-family: Arial, sans-serif; color: rgb(100, 100, 100);"><image001.png></span></sub><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 3pt; font-family: Arial, sans-serif; color: rgb(100, 100, 100);"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><a name="_Hlk3999959"><span style="font-family: Arial, sans-serif; color: rgb(100, 100, 100);"><image002.png><image003.png> <image004.png> <image005.png></span></a><span></span><o:p></o:p></div>
</div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-color: currentcolor; border-image: none;">
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span style="font-size: 12pt;">From:<span class="apple-converted-space"> </span></span></b><span style="font-size: 12pt;">"Parthasarathy, Bharadwaj" <<a href="mailto:bharadwaj.parthasarathy@staples.com" style="color: blue; text-decoration: underline;">bharadwaj.parthasarathy@staples.com</a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Thursday, June 15, 2023 at 2:46 PM<br>
<b>To:<span class="apple-converted-space"> </span></b>"<a href="mailto:tribuo-devel@oss.oracle.com" style="color: blue; text-decoration: underline;">tribuo-devel@oss.oracle.com</a>" <<a href="mailto:tribuo-devel@oss.oracle.com" style="color: blue; text-decoration: underline;">tribuo-devel@oss.oracle.com</a>><br>
<b>Cc:<span class="apple-converted-space"> </span></b>"Sikka, Sandeep" <<a href="mailto:Sandeep.Sikka@Staples.com" style="color: blue; text-decoration: underline;">Sandeep.Sikka@Staples.com</a>>, "Kumar, Navdeep" <<a href="mailto:navdeep.kumar@staples.com" style="color: blue; text-decoration: underline;">navdeep.kumar@staples.com</a>><br>
<b>Subject:<span class="apple-converted-space"> </span></b>Tribuo Non Numerical Features Support</span><o:p></o:p></div>
</div>
</div>
</div>
<div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">Hi,</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">This is Bharadwaj from one of Staples' Engineering teams. We are exploring Tribuo java framework for one of our use cases. We
 are trying to use Tribuo for runtime inferencing with a regressor model.</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">We have non numerical features that we are trying to integrate with Tribuo. However, all the classes or samples for regressor
 points us to passing feature values as only double. Feature names as String and Feature Values as Double is what we see.</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">Does Tribuo support non numerical features<span class="apple-converted-space"> </span><u>(categorical and ordinal features)</u><span class="apple-converted-space"> </span>such
 as String, Boolean etc or is it strictly only double values? How can we train and infer supervised models that consume categorical and ordinal features?</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;"> </span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">I am not sure if we are missing something here, it would be helpful if you can provide your inputs.</span><o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Regards,<o:p></o:p></div>
</div>
</div>
<div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Bharad</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>