0

If I have several columns in the table, and I need to apply two of my models to this table so that one is, for example, for cats, the other, for example, for dogs. In the table there is a column with the symbols: 1 - dog, 2 - cat. The name of this column is: Type. Other values are not important. How can I implement the transition to the appropriate model?

  • I'd suggest to split dataframe into 2 by that Type column and train a model separately on each dataframe. If you want to build a tree-based model (e.g. Desicion Tree, LightGBM), if the split by Type is "important" such model would split the data by itself – vital_dml Feb 04 '19 at 15:04
  • I believe it will depend on your models. You can always filter your data and apply your model(s) to the filtered subset of your dataset. In general this question is not very clear. I'd suggest you to read [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) and edit the question correspondingly. – MaxU - stand with Ukraine Feb 04 '19 at 15:27
  • How do I implement the division of one table into two by value in one of the columns? – Никита Пермяков Feb 04 '19 at 18:13

0 Answers0