Merge pull request #5189 from GaelVaroquaux/pr_4779
Pr 4779: Implemented parallelised version of mean_shift and test function
This commit is contained in:
commit
0bf75367c9
|
|
@ -46,13 +46,14 @@ def test_mean_shift():
|
|||
n_clusters_ = len(labels_unique)
|
||||
assert_equal(n_clusters_, n_clusters)
|
||||
|
||||
|
||||
def test_parallel():
|
||||
ms1 = MeanShift(n_jobs=-1)
|
||||
ms1 = MeanShift(n_jobs=2)
|
||||
ms1.fit(X)
|
||||
|
||||
|
||||
ms2 = MeanShift()
|
||||
ms2.fit(X)
|
||||
|
||||
|
||||
assert_array_equal(ms1.cluster_centers_,ms2.cluster_centers_)
|
||||
assert_array_equal(ms1.labels_,ms2.labels_)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue