X_train,X_test,Y_train,Y_test = train_test_split(T,Yout,test_size = 0.20)
clf.fit(X_train,Y_train)
I need to train the model using 3 arguments ie,clf.fit(X_train,X_train[3], Y_train)
.but it shows error fit (X.shape[0], y.shape[0])). Want to make training as dependent on X_train[3].
Suggest if there are any other commands in python for training(ie apart from fit and train_test_split).
If you want to train a model using multiple features, Here's an example below:
FEATURES_ARR = ['feature1', 'feature2', 'feature3']
lrModel = LinearRegression(normalize=True)
lrModel.fit(X_train[FEATURES_ARR], Y_train)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With