Commit 544a8fd9 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed Test_RF_Classifier.

parent ced08fea
Pipeline #3756 passed with stage
in 19 minutes and 5 seconds
......@@ -100,12 +100,12 @@ class Test_SID_Classifier(unittest.TestCase):
class Test_RF_Classifier(unittest.TestCase):
def test_classify(self):
RFC = RF_Classifier(cluster_centers, cluster_labels, CPUs=1)
RFC = RF_Classifier(cluster_centers, cluster_labels, CPUs=1, **dict(random_state=0))
cmap_sp = RFC.classify(test_gA, in_nodataVal=-9999, tiledims=(400, 200))
self.assertIsInstance(cmap_sp, np.ndarray)
self.assertEqual(cmap_sp.shape, (1010, 1010))
RFC = RF_Classifier(cluster_centers, cluster_labels, CPUs=None)
RFC = RF_Classifier(cluster_centers, cluster_labels, CPUs=None, **dict(random_state=0))
cmap_mp = RFC.classify(test_gA, in_nodataVal=-9999, tiledims=(400, 200))
self.assertIsInstance(cmap_mp, np.ndarray)
self.assertEqual(cmap_mp.shape, (1010, 1010))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment