示例#1
0
 def test_visualizer_is_estimator(self):
     """
     Assert that a Visualizer is an estimator
     """
     self.assertTrue(is_estimator(Visualizer))
     self.assertTrue(is_estimator(Visualizer()))
     self.assertTrue(is_estimator(ScoreVisualizer))
     self.assertTrue(is_estimator(ScoreVisualizer(LinearRegression())))
     self.assertTrue(is_estimator(ModelVisualizer))
     self.assertTrue(is_estimator(ModelVisualizer(LogisticRegression())))
示例#2
0
 def test_clusterer_visualizer(self):
     """
     Test that is_clusterer works on visualizers
     """
     model = ScoreVisualizer(KMeans())
     self.assertTrue(is_clusterer(model))
示例#3
0
 def test_classifier_visualizer(self):
     """
     Test that is_classifier works on visualizers
     """
     model = ScoreVisualizer(RandomForestClassifier())
     self.assertTrue(is_classifier(model))
示例#4
0
 def test_regressor_visualizer(self):
     """
     Test that is_regressor works on visualizers
     """
     model = ScoreVisualizer(LinearRegression())
     self.assertTrue(is_regressor(model))