I need to evaluate the ML model on another dataset but i don't know what it fully means. I have an idea but i am not sure. Let's say we have:
- X_train, X_test, y_train, y_test split from X,Y for the first model
- X_train_2, X_test_2, y_train_2, y_test_2 split from X2, 2 for the 2nd model
After training both model with model.fit
, how do i test them on the other database? Is it:
from sklearn.svm import SVC
#training on the first model
svm.fit(X, Y)
#test on the 2nd model
y_pred = svm.predict(X_test_2)
#evaluate accuracy
print(accuracy_score(y_test, y_pred))
It seems simple but i am really confused, i would appreciate some explanations.