Now I have a different use-case to predict Work Hours based on Marital-Status and Relationship Status so my training data is now two dimension.
DataFrame total of
24420 rows * 2 columns of shape -->
DataFrame is been passed to
TfidfVectorizer.fit_transform() function it turns to shape -->
(2, 3) Not sure why!
And while training
mnb.fit(x_train_tf, y_train) it returns an error
ValueError: Found input variables with inconsistent numbers of samples: [2, 24420]
You could see the initial
DataFrame shape of
24420*2 it transposed to
All code is up here.
fit_transform()the shape changes to
(2,3)what happened to
(24420,2)data? What does this denotes?
Why does the
ValueError: Found input variables with inconsistent numbers of samples [2, 24420]occurs?
DataFrameshape changed to
What is wrong with the implementation?