To find the accuracy score, we execute model.score(X_train, y_train) for training set. and model.score(X_val, y_val) for validation set. Now, in my case, test data is a separate csv file. I have applied models on my training and test data. I know the score of training data but could not find the score on test data.
Below is my code:
model_dt = make_pipeline(
SimpleImputer(strategy="mean"),
DecisionTreeClassifier(random_state=42)
)
model_dt.fit(X_train, y_train)
acc_train = model_dt.score(X_train, y_train)
acc_val = model_dt.score(X_val, y_val)
print("reg model", acc_train, acc_val)
predictions_dt_reg = model_dt.predict(test)
**Note: After the above step I want to calculate the score on my test data **