Source code for evalml.demos.breast_cancer

import pandas as pd
from sklearn.datasets import load_breast_cancer as load_breast_cancer_sk


[docs]def load_breast_cancer(): """Load breast cancer dataset. Multiclass problem Returns: pd.DataFrame, pd.Series: X, y """ data = load_breast_cancer_sk() X = pd.DataFrame(data.data, columns=data.feature_names) y = pd.Series(data.target) y = y.map(lambda x: data["target_names"][x]) return X, y