August 2018
Intermediate to advanced
522 pages
12h 45m
English
scikit-learn provides some built-in datasets that can be used for prototyping purposes because they don't require very long training processes and offer different levels of complexity. They're all available in the sklearn.datasets package and have a common structure: the data instance variable contains the whole input set X while the target contains the labels for classification or target values for regression. For example, considering the Boston house pricing dataset (used for regression), we have the following:
from sklearn.datasets import load_bostonboston = load_boston()X = boston.dataY = boston.targetprint(X.shape)(506, 13)print(Y.shape)(506,)
In this case, we have 506 samples with 13 features and a single target ...
Read now
Unlock full access