After introducing the breast cancer dataset, we can analyze the code that will allow us to classify the input data line by line. In the first part of the code, we import the libraries we will use later:
from sklearn import linear_model, datasets, preprocessingfrom sklearn.cross_validation import train_test_splitfrom sklearn.pipeline import Pipelinefrom sklearn.neural_network import BernoulliRBMfrom pandas_ml import ConfusionMatriximport numpy as npimport pandas as pd
For now, let's limit ourselves to import; we will deepen them at the time of use. To start, we have to import the dataset; we will do so using the sklearn.datasets package:
BC = datasets.load_breast_cancer()
This command loads and returns the breast cancer