[scikit-learn] KNeighborsClassifier and metric='precomputed'

2017-01-02 Thread Pedro Pazzini
Hi all! I'm trying to use a KNeighborsClassifier with precomputed metric. In it's predict method (http://scikit-learn.org/stable/modules/generated/sklearn .neighbors.KNeighborsClassifier.html#sklearn.neighbors.KNeighborsClassifier.predict) it says the input should be: "(n_query, n_indexed) if met

Re: [scikit-learn] KNeighborsClassifier and metric='precomputed'

2017-01-02 Thread Joel Nothman
n_indexed means the number of samples in the X passed to fit. It needs to be able to compare each prediction sample with each training sample. On 3 January 2017 at 07:44, Pedro Pazzini wrote: > Hi all! > > I'm trying to use a KNeighborsClassifier with precomputed metric. In it's > predict method