Skip to content

Commit 5eed6d6

Browse files
committed
Fixed nTrees and 'Unknown' issues
nTrees parameter was not getting passed to Random Forest. I also changed MDSBuilder to use the last input raster instead of "Unknown" for the PARC template & folder, to prevent it from throwing an error.
1 parent a9bcf7c commit 5eed6d6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

init.py

+1
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ def __init__(self):
514514
self.abbrev = 'rf'
515515
self.port_map.update({'Seed':('seed', utils.get_seed, True), # This is a BRT specific port
516516
'mTry': ('mtry', None, False), # This is a Random Forest specific port
517+
'nTrees': ('ntree', None, False), # MMF 02/22/2016 - nTrees was not getting passed
517518
'nodesize': ('nodeS', None, False), # This is a Random Forest specific port
518519
'replace': ('sampR', utils.R_boolean, False), # This is a Random Forest specific port
519520
'maxnodes': ('maxN', None, False), # This is a Random Forest specific port

pySAHM/MDSBuilder.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,10 @@ def constructEmptyMDS(self):
238238
self.parc_template = inputs_header[5]
239239
parc_workspace = inputs_header[6]
240240
else:
241-
self.parc_template = "Unknown"
242-
parc_workspace = "Unknown"
243-
241+
## self.parc_template = "Unknown" #MMF 02/22/2016 - I usually "pre-PARC" my data, and this
242+
## parc_workspace = "Unknown" #causes problems. SAHM doesn't know what to do w/ the unknowns.
243+
self.parc_template = temp_raster
244+
parc_workspace = temp_raster
244245

245246
secondRow = [original_field_data, field_data_template, ""] + ["1" for elem in self.inputs]
246247
thirdRow = [self.parc_template, parc_workspace, ""] + self.inputs

0 commit comments

Comments
 (0)