Gauging the amount of electricity a plant can produce using SVMs

Support Vector Machines (SVMs) have gained popularity over the years. These very powerful models use kernel tricks to model even the most complicated relationships between the dependent and independent variables.

In this recipe, using artificially generated data, we will show the real power of SVMs.

Getting ready

To execute this recipe, you will need pandas, NumPy, Scikit, and Matplotlib. No other prerequisites are required.

How to do it…

In this recipe, we will test SVM for regression with four different kernels (the regression_svm.py file):

import sys sys.path.append('..') # the rest of the imports import helper as hlp import pandas as pd import numpy as np import sklearn.svm as sv ...

Get Practical Data Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.