ISLP#

ISLP#

ISLP is a Python library to accompany Introduction to Statistical Learning with applications in Python. See the statistical learning homepage for more details.

Functions#

ISLP.confusion_table(predicted_labels, true_labels, labels=None)#

Return a data frame version of confusion matrix with rows given by predicted label and columns the truth.

Parameters:
predicted_labels: array-like

These will form rows of confusion matrix.

true_labels: array-like

These will form columns of confusion matrix.

ISLP.load_data(dataset)#

Load dataset from ISLP package.

Choices are: [‘Bikeshare’, ‘BrainCancer’, ‘Caravan’, ‘Carseats’, ‘College’, ‘Credit’, ‘Default’, ‘Hitters’, ‘Khan’, ‘NCI60’, ‘NYSE’, ‘OJ’, ‘Publication’, ‘Smarket’, ‘Wage’, ‘Wage’, ‘Weekly’]

Parameters:
dataset: str
Returns:
data: array-like or dict

Either a pd.DataFrame representing the dataset or a dictionary containing different parts of the dataset.