0
$\begingroup$

I have a training dataset where values of "Output" col is dependent on three columns (which are categorical [No ordering]).

Inp1    Inp2        Inp3               Output
A,B,C   AI,UI,JI    Apple,Bat,Dog      Animals
L,M,N   LI,DO,LI    Lawn, Moon, Noon   Noun
X,Y,Z   LI,AI,UI    Xmas,Yemen,Zombie  Extras

So, based on this training data, I need a ML Algorithm to predict any incoming data row such that if it is Similar to training rows highest similar output aassigned.

The rows can go on increasing (hence get_dummies is creating a lot of columns, using those is not feasible), also the there's no ordering as per priority. Which encoding for Inp columns Categorical data will be needed for a ML model to work. Please suggest a better way to model the same.

$\endgroup$
2
  • $\begingroup$ Not clear what you are asking. Can you supply a sample incoming data row and demonstrate why it might be similar or not similar to what you have shown? $\endgroup$ Apr 29, 2022 at 21:15
  • $\begingroup$ The dataset similarity is not clearly known, training dataset would therefore be modelled such that incoming rows would predict the class based on training data. I wanted to know a better way to encode this type of categorical data and apply a ML model. $\endgroup$
    – spd
    Apr 30, 2022 at 4:12

1 Answer 1

0
$\begingroup$

You can try using other encoder like Mean Encoder, Ordered Label Encoder, Weight Of Evidence Encoder, Propbability Ratio Encoder, Binary Encoder

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.