vocalpy / hybrid-vocal-classifier

a Python machine learning library for animal vocalizations and bioacoustics
http://hybrid-vocal-classifier.readthedocs.io
BSD 3-Clause "New" or "Revised" License
23 stars 8 forks source link

pass weight to neighbors as a keyword argument #109

Closed NickleDave closed 3 years ago

NickleDave commented 3 years ago

getting the following when running knn model: FutureWarning: Pass weights=distance as keyword args. From version 1.0 (renaming of 0.25) passing these as positional arguments will result in an error

from this line I think: https://github.com/NickleDave/hybrid-vocal-classifier/blob/c474c6efc045a8bffb405d4927169542e6ab842f/src/hvc/select.py#L427

                        clf = neighbors.KNeighborsClassifier(model_dict['hyperparameters']['k'],
                                                             'distance')