Categorical data preprocessing for training a algorithm

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.

Topic python-3.x prediction preprocessing categorical-data machine-learning

Category Data Science


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

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.