# Do models learn a test set after multiple predictions upon it?

In machine learning, when we train a model, such as

vect = CountVectorizer(min_df=5, ngram_range=(1,2)).fit(X_train)

X_train_vectorized = vect.transform(X_train)
model = LogisticRegression()
model.fit(X_train_vectorized, y_train)

predictions = model.predict(vect.transform(X_test))


and make predictions with a test set, does our model learn the test set after multiple predictions are made?

TL/DR: No.

The concept of prediction, here applied by your predict method, is to just try out the model on the test set. It does not imply any kind of adaptation to such set, thus your model doesn't directly learn anything from it.

You can generalize that to any other framework or discussion in data science as a whole - training and fitting are tasks performed on the train set, and they imply adapting to it, and actually learning its patterns. Predicting does not.