Boolean features #436
-
Hi, I am wondering if there is a way to include Boolean features (i,e, x) in PySR. For example, assume there are 5 categorical features and 2 continuous features, in total 7 features. Is it acceptable to one-hot encode the categorical features and concatenate them with continuous features, and then pass a combination of one-hot and continuous features to PySR? Thank you so much |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @AKHCE, There is no one-fits-all solution, it will really depend on your problem and what you want. At the end of the day, all calculations will be done using continuous scalars. But indeed you can map categorical/boolean problems into that space without much issue, so boolean problems and categorical problems are totally doable. There are two things to consider:
Categorical mappings would definitely work if the equation makes sense. For example, for months, you might choose January=1, February=2, and so on. But you could also create a mapping to "phases" of the year by turning it into two features:
Cheers, |
Beta Was this translation helpful? Give feedback.
Hi @AKHCE,
There is no one-fits-all solution, it will really depend on your problem and what you want. At the end of the day, all calculations will be done using continuous scalars. But indeed you can map categorical/boolean problems into that space without much issue, so boolean problems and categorical problems are totally doable.
There are two things to consider:
Categorical mappings would definitely work if the equation makes sense…