0
$\begingroup$

My dataset has 3 fields ColumnX, ColumnA, Column B as below.

Column X, Column_A , Column_B

AA, 1 , KEYWORD1 KEYWORD2 KEYWORD3

AA, 2 , KEYWORD4 KEYWORD5 KEYWORD6

XX, 3 , KEYWORD3 KEYWORD7

XX, 4, KEYWORD6 KEYWORD8

YY, 5, KEYWORD9

I removed the stop words in Column_B and kept the keywords.

So here Can I train a model which can classify the data with Column_X and Column_B and given an input from user which matches any keyword in Column B , returns Column_A

Sample output:

user gives an input : KEYWORD9.

my output should show ColumnX: YY and ColumnA: 5

I know it can be done with basic python but I want to use ML here

$\endgroup$
0
$\begingroup$

Try an LSTM Encoder-decoder model. The encoder takes Column_B as input and Decoder gives Column X, Column_A as output. Or create a two machine learning models one for each column prediction.

| improve this answer | |
$\endgroup$
0
$\begingroup$
  • column A seems to be a unique index independent from the features in column B, I don't understand why you want to predict it? If it's really unique it's impossible to predict for any new instance.

The standard way is to split column B into as many columns as there are possible keywords, then the value for each instance is 1 if it has this keyword, 0 otherwise. From that you can train any supervised model, for instance decision trees or SVM, in order to predict column X.

If you really want to predict column A for some reason, you can do the same process with an independent model or try to learn it jointly with column X.

| improve this answer | |
$\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.