O'Reilly logo

Python Data Analysis by Ivan Idris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required