Skip to content

chap09-9.4 将电影评论分类器转换为网络应用:代码编译不过 #128

Description

@fgghhsha123

[2020-09-20 17:08:04,956] ERROR in app: Exception on /thanks [POST]
Traceback (most recent call last):
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "E:\机器学习\python-machine-learning-book-2nd-edition-master\code\ch09\movieclassifier\app.py", line 73, in feedback
train(review, y)
File "E:\机器学习\python-machine-learning-book-2nd-edition-master\code\ch09\movieclassifier\app.py", line 30, in train
clf.partial_fit(X, [y])

File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\linear_model_stochastic_gradient.py", line 680, in partial_fit
self._validate_params(for_partial_fit=True)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\linear_model_stochastic_gradient.py", line 128, in _validate_params
if not isinstance(self.early_stopping, bool):
AttributeError: 'SGDClassifier' object has no attribute 'early_stopping'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions