Platform Error

Course Name: Introduction to Machine Learning for Trading, Section No: 7, Unit No: 11, Unit type: Exercise

An error occured while running the code:

At line: 12, in from sklearn.svm import svc ImportError: cannot import name 'svc' from 'sklearn.svm' (/usr/local/lib/python3.9/site-packages/sklearn/svm/__init__.py)

Hi Ivan,



You need to use 'SVC' instead of 'svc' as Python is a case-sensitive language.

The code will look like this:

 

from sklearn.svm import SVC

Hope this helps.



Thanks