[GRASS-SVN] r71161 - grass-addons/grass7/raster/r.learn.ml

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 2 15:50:11 PDT 2017


Author: spawley
Date: 2017-06-02 15:50:11 -0700 (Fri, 02 Jun 2017)
New Revision: 71161

Modified:
   grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
Log:
r.learn.ml fixed issue with calibration of probabilties

Modified: grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
===================================================================
--- grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py	2017-06-02 08:24:45 UTC (rev 71160)
+++ grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py	2017-06-02 22:50:11 UTC (rev 71161)
@@ -885,9 +885,9 @@
 
         # recalibrate probabilities if classes have been balanced
         if balance is True:
-            if any(param_grid) is True:
+            if any(param_grid) is True and nested_cv is True:
                 clf = clf.best_estimator_
-            clf = CalibratedClassifierCV(clf, cv=outer)
+            clf = CalibratedClassifierCV(clf, cv=20)
             clf.fit(X, y)
 
         # predict classification/regression raster



More information about the grass-commit mailing list