From ff544e28189598292dd1437a09714a0017a0ee5e Mon Sep 17 00:00:00 2001 From: Abhishek Jana Date: Sat, 13 Jul 2019 22:57:54 -0500 Subject: [PATCH 1/2] changed cv from 5 to 3 --- examples/compose/plot_compare_reduction.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/compose/plot_compare_reduction.py b/examples/compose/plot_compare_reduction.py index 515c260b58181..fc636f88d16f5 100755 --- a/examples/compose/plot_compare_reduction.py +++ b/examples/compose/plot_compare_reduction.py @@ -29,7 +29,6 @@ # Authors: Robert McGibbon, Joel Nothman, Guillaume Lemaitre - import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import load_digits @@ -41,6 +40,7 @@ print(__doc__) + pipe = Pipeline([ # the reduce_dim stage is populated by the param_grid ('reduce_dim', 'passthrough'), @@ -63,7 +63,7 @@ ] reducer_labels = ['PCA', 'NMF', 'KBest(chi2)'] -grid = GridSearchCV(pipe, cv=5, n_jobs=1, param_grid=param_grid) +grid = GridSearchCV(pipe, cv=3, n_jobs=1, param_grid=param_grid) digits = load_digits() grid.fit(digits.data, digits.target) @@ -113,7 +113,7 @@ memory=memory) # This time, a cached pipeline will be used within the grid search -grid = GridSearchCV(cached_pipe, cv=5, n_jobs=1, param_grid=param_grid) +grid = GridSearchCV(cached_pipe, cv=3, n_jobs=1, param_grid=param_grid) digits = load_digits() grid.fit(digits.data, digits.target) @@ -128,3 +128,4 @@ # estimator data, leading to save processing time. Therefore, the use of # caching the pipeline using ``memory`` is highly beneficial when fitting # a transformer is costly. + From f79bcb83df8935b00ac401ea9091a585c4d05fa7 Mon Sep 17 00:00:00 2001 From: Abhishek Jana Date: Sat, 13 Jul 2019 23:00:57 -0500 Subject: [PATCH 2/2] changed cv from 5 to 3 --- examples/compose/plot_compare_reduction.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/compose/plot_compare_reduction.py b/examples/compose/plot_compare_reduction.py index fc636f88d16f5..d10f1e9d305a2 100755 --- a/examples/compose/plot_compare_reduction.py +++ b/examples/compose/plot_compare_reduction.py @@ -29,6 +29,7 @@ # Authors: Robert McGibbon, Joel Nothman, Guillaume Lemaitre + import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import load_digits @@ -40,7 +41,6 @@ print(__doc__) - pipe = Pipeline([ # the reduce_dim stage is populated by the param_grid ('reduce_dim', 'passthrough'), @@ -128,4 +128,3 @@ # estimator data, leading to save processing time. Therefore, the use of # caching the pipeline using ``memory`` is highly beneficial when fitting # a transformer is costly. -