Can someone please let me know, if this is the correct way to calculate the cross-validated precision of my classifier? I divided my dataset into xtrain and ytrain for training data and xtest & ytest for the test set.
Building the model:
RFC = RandomForestClassifier(n_estimators=100)
Fitting it to training set:
RFC.fit(xtrain, ytrain)
This is the part I am unsure about:
scores = cross_val_score(RFC, xtest, ytest, cv = 10, scoring='precision')
Using the code above, would "scores" give me the precision on my model which was trained on the Training data? I am very afraid that I used to wrong code and that I am fitting the model to xtest, because my recall and precision score for my test data is HIGHER than the scores for my training data which I couldn't figure out why!