Book Image

Python Data Analysis

By : Ivan Idris
Book Image

Python Data Analysis

By: Ivan Idris

Overview of this book

Table of Contents (22 chapters)
Python Data Analysis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Key Concepts
Online Resources
Index

Scikit-learn


The following are useful scikit-learn functions:

  • sklearn.cross_validation.train_test_split(*arrays, **options): This function splits arrays into random train and test sets

  • sklearn.metrics.accuracy_score(y_true, y_pred, normalize=True, sample_weight=None): This function returns the accuracy classification score

  • sklearn.metrics.euclidean_distances (X, Y=None, Y_norm_squared=None, squared=False): This function computes the distance matrix for the input data