I have been working on an NLP problem (text classification).
I first preprocessed the text, then trained a model on that data (After Tfidf)
X_train, X_test, y_train, y_test = train_test_split(ref_red, uniqueOutput...)
clf = LogisticRegression(C = 0.9, penalty = 'l1', solver = 'liblinear') # Grid Search
clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
print(accuracy_score(y_pred, y_test))
Now, I want to try and test the model on a single datapoint (ML inference). How do pass a single datapt to predict function?
Please let me know.