Here we will see how different estimators composed of dimensionality reduction and a support vector machine perform.
Testing methods to reduce dimensionality with pipelines
Getting ready
Load the iris dataset and some dimensionality reduction libraries. This is a big step for this particular recipe:
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
from sklearn.model_selection import GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn.svm import SVC, LinearSVC
from sklearn.decomposition import PCA, NMF, TruncatedSVD
from sklearn.manifold import Isomap
%matplotlib inline