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())))
def test_clusterer_visualizer(self): """ Test that is_clusterer works on visualizers """ model = ScoreVisualizer(KMeans()) self.assertTrue(is_clusterer(model))
def test_classifier_visualizer(self): """ Test that is_classifier works on visualizers """ model = ScoreVisualizer(RandomForestClassifier()) self.assertTrue(is_classifier(model))
def test_regressor_visualizer(self): """ Test that is_regressor works on visualizers """ model = ScoreVisualizer(LinearRegression()) self.assertTrue(is_regressor(model))