[GRASS-SVN] r70265 - grass-addons/grass7/raster/r.learn.ml
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 5 09:16:20 PST 2017
Author: spawley
Date: 2017-01-05 09:16:20 -0800 (Thu, 05 Jan 2017)
New Revision: 70265
Modified:
grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
Log:
'fixed issue with r.learn.ml option to not predict raster - causes problem with scripting'
Modified: grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
===================================================================
--- grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py 2017-01-05 13:50:54 UTC (rev 70264)
+++ grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py 2017-01-05 17:16:20 UTC (rev 70265)
@@ -1497,16 +1497,16 @@
if model_save != '':
joblib.dump(learn_m, model_save)
- if modelonly is True:
- grass.fatal("Model built and now exiting")
"""
Prediction on the rest of the GRASS rasters in the imagery group
----------------------------------------------------------------
"""
+ if modelonly is not True:
+ learn_m.predict(maplist, output, probability, rowincr)
+ else:
+ grass.message("Model built and now exiting")
- learn_m.predict(maplist, output, probability, rowincr)
-
if __name__ == "__main__":
options, flags = grass.parser()
atexit.register(cleanup)
More information about the grass-commit
mailing list