Oct-07-2022, 08:32 PM
The following code generates an error when I try to interpret it with python.
I need version 0.18. I upgraded scikit-learn to 1.1.2 and got the same error when I tried to interpret it.
I should emphasize that I am only running this code snippet. It is part of a larger program, but I am just working it this piece now.
I cannot upgrade scikit-learn to version 0.18. That is impossible.
I used the command
python 3.10.4.
I suspect it has to do with a specific version of scikit-learn.
Respectfully,
Led_Zepplin
svm_c = GridSearchCV( cv=TimeSeriesSplit(gap=0, max_train_size=None, n_splits=5, test_size=None), estimator=SGDClassifier(n_jobs=-1, random_stat=21), n_jobs=-1, param_grid={"alpha": [0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000]}, return_train_score=True, scoring="f1_macro", )The error is:
TypeError Traceback (most recent call last) Input In [187], in <cell line: 1>() 1 svm_c = GridSearchCV( 2 cv=TimeSeriesSplit(gap=0, max_train_size=None, n_splits=5, test_size=None), ----> 3 estimator=SGDClassifier(n_jobs=-1, random_stat=21), 4 n_jobs=-1, 5 param_grid={"alpha": [0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000]}, 6 return_train_score=True, 7 scoring="f1_macro", 8 ) TypeError: SGDClassifier.__init__() got an unexpected keyword argument 'random_stat'I am not sure why. I googled the error, and it claimed that scikit-learn was the problem. I have version 1.1.1. It says that
I need version 0.18. I upgraded scikit-learn to 1.1.2 and got the same error when I tried to interpret it.
I should emphasize that I am only running this code snippet. It is part of a larger program, but I am just working it this piece now.
I cannot upgrade scikit-learn to version 0.18. That is impossible.
I used the command
pip install scikit-learn==0.18 --force upgradeand all it did was give a lot of errors. Why is this error that I discussed above happening? I am using
python 3.10.4.
I suspect it has to do with a specific version of scikit-learn.
Respectfully,
Led_Zepplin