April 2019
Intermediate to advanced
426 pages
11h 13m
English
A support vector classifier (SVC) is a concept of a support vector machine (SVM) that uses support vectors for classifying datasets.
The SVC class of the sklean.svm module implements the SVM classifier. Write a class named SVCModel and extend LogisticRegressionModel with the following code:
In [ ]: from sklearn.svm import SVC class SVCModel(LogisticRegressionModel): def get_model(self): return SVC(C=1000, gamma='auto')In [ ]: svc_model = SVCModel() svc_model.learn(df_input, y_direction, start_date='2018', end_date='2019', lookback_period=100)
Here, we are overriding the get_model() method to return the SVC class of ...
Read now
Unlock full access