Skip to content

Commit

Permalink
update readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
johny-c committed Nov 4, 2018
1 parent 8edf64e commit de5290c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ Here is a minimal use case:
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split
from sklearn.datasets import load_iris
from matplotlib import pyplot as plt
from pylmnn import LargeMarginNearestNeighbor as LMNN
from pylmnn.plots import plot_comparison
# Load a data set
Expand All @@ -85,10 +83,6 @@ Here is a minimal use case:
lmnn_acc = knn.score(lmnn.transform(X_test), y_test)
print('LMNN accuracy on test set of {} points: {:.4f}'.format(X_test.shape[0], lmnn_acc))
# Draw a comparison plot of the test data before and after applying the learned transformation
plot_comparison(lmnn.components_, X_test, y_test, dim_pref=3)
plt.show()
You can check the examples directory for a demonstration of how to use the
code with different datasets and how to estimate good hyperparameters with Bayesian Optimisation.

Expand Down

0 comments on commit de5290c

Please sign in to comment.