I have a set of code that when I run in a python interpreter (3.8.4) everything works fine. However, when I try to run via command line, I end up receiving an error. the error in full is
AttributeError: This 'SelfTrainingClassifier' has no attribute 'predict_proba'
this is strange as when I go through the documentation, selfTrianingClassifier does have predcit_proba. I don’t know why this is erroring like this.
st_pipeline = Pipeline(
[
("vect", CountVectorizer(**vectorizer_params)),
("tfidf", TfidfTransformer()),
("clf", SelfTrainingClassifier(SGDClassifier(**sdg_params), verbose=True)),
]
)
data = pd.read_excel("C:/data/sampledata.xlsx")
X_train_kd, X_test_kd, y_train_kd, y_test_kd = train_test_split(data ["tags"], data [label],train_size=0.3)
st_pipeline .fit(X_train, y_train)
y_pred = st_pipeline.predict_proba(X_test)
tried changing the script, looking online at the error. I don’t understand why it is crashing.