utils: raspberrypi: ctt: Fix namespace for sklearn NearestCentroid function
Starting in version 0.22, the NearestCentroid function is only available in the sklearn.neighbors namespace, when it was previously available in both the sklearn.neighbors.nearest_centroid and sklearn.neighbors namespaces. Use sklearn.neighbors as it works on all versions of sklearn. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e9288e2ee5
commit
a792512496
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ import imutils
|
||||||
import sys
|
import sys
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from sklearn import cluster as cluster
|
from sklearn import cluster as cluster
|
||||||
from sklearn.neighbors.nearest_centroid import NearestCentroid as get_centroids
|
from sklearn.neighbors import NearestCentroid as get_centroids
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This file contains some useful tools, the details of which aren't important to
|
This file contains some useful tools, the details of which aren't important to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue