You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ja...@apache.org on 2021/12/06 08:52:33 UTC

[systemds] 03/03: [MINOR] Update function signatures in unsupervised mapper

This is an automated email from the ASF dual-hosted git repository.

janardhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit f2d7641a95174f0265df416dc4ee6746e8c51116
Author: Janardhan Pulivarthi <ja...@apache.org>
AuthorDate: Mon Dec 6 07:43:55 2021 +0000

    [MINOR] Update function signatures in unsupervised mapper
---
 scripts/staging/sklearn/mappers/unsupervised.py |  6 ++++--
 scripts/staging/sklearn/run_tests.py            | 10 ++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/staging/sklearn/mappers/unsupervised.py b/scripts/staging/sklearn/mappers/unsupervised.py
index 5191f87..c269d2e 100644
--- a/scripts/staging/sklearn/mappers/unsupervised.py
+++ b/scripts/staging/sklearn/mappers/unsupervised.py
@@ -76,8 +76,10 @@ class GaussianMixtureMapper(Mapper):
         self.mapped_params = [
             self.params.get('n_components', 3),
             f'"{self.model_map.get(self.params.get("covariance_type", "VVV"))}"',
-            self.params.get('init_params', '"kmeans"'),
+            f'"{self.params.get("init_params", "kmeans")}"',
             self.params.get('max_iter', 100),
             self.params.get('reg_covar', 1e-6),
-            self.params.get('tol', 0.000001)
+            self.params.get('tol', 0.000001),
+            self.params.get('seed', -1),
+            self.params.get('verbose', 'FALSE')
         ]
diff --git a/scripts/staging/sklearn/run_tests.py b/scripts/staging/sklearn/run_tests.py
index 73e3d5b..5e1762d 100755
--- a/scripts/staging/sklearn/run_tests.py
+++ b/scripts/staging/sklearn/run_tests.py
@@ -71,16 +71,14 @@ if __name__ == '__main__':
         make_pipeline(Normalizer(), TweedieRegressor()),
         make_pipeline(StandardScaler(), LogisticRegression()),
         make_pipeline(Normalizer(), LogisticRegression()),
-        #TODO: Tests which use PCA or DBSCAN, trigger a NullPointerException during parsing for some reason
         make_pipeline(StandardScaler(), DBSCAN()),
         make_pipeline(Normalizer(), DBSCAN()),
-        # make_pipeline(SimpleImputer(strategy='mean'), DBSCAN()),
-        # make_pipeline(SimpleImputer(strategy='median'), DBSCAN()),
+        make_pipeline(SimpleImputer(strategy='mean'), DBSCAN()),
+        make_pipeline(SimpleImputer(strategy='median'), DBSCAN()),
         make_pipeline(PCA(), KMeans()),
         make_pipeline(PCA(), DBSCAN()),
-        # TODO: GaussianMixtureModel results in LanguageException -- ERROR: [line 0:0] -- Function get_sample_maps() is undefined.
-        # make_pipeline(StandardScaler(), GaussianMixture()),
-        # make_pipeline(Normalizer(), GaussianMixture())
+        make_pipeline(StandardScaler(), GaussianMixture()),
+        make_pipeline(Normalizer(), GaussianMixture())
     ]
 
     valid_results = []