October 2018
Intermediate to advanced
252 pages
6h 49m
English
Following is the full code listing of the recipe Classification for breast cancer:
import pandas as pdfrom sklearn.preprocessing import LabelEncoder, StandardScalerfrom sklearn.model_selection import train_test_splitfrom sklearn.model_selection import GridSearchCVfrom keras.wrappers.scikit_learn import KerasClassifierfrom keras.models import Sequential, load_modelfrom keras.layers import Densefrom sklearn.metrics import confusion_matrixdataset = pd.read_csv('/deeplearning/google/kaggle/breast-cancer/data.csv')# get dataset detailsprint(dataset.head(5))print(dataset.columns.values)print(dataset.info())print(dataset.describe())# data cleansingX = dataset.iloc[:, 2:32]print(X.info())print(type(X))y = dataset.iloc[:, 1]print ...