gtkfi / ArcSDM

Spatial Data Modeler 6 for ArcGIS Pro
32 stars 18 forks source link

Logistic Regression Error in updated version of ArcSDM too: 'logpol.tba does not exist' and 'too many unique values' #140

Open Tayyibriaz opened 3 years ago

Tayyibriaz commented 3 years ago

i am working on Arc-SDM and facing multiple errors

'logpol.tba does not exist' 'too many unique values' it is working with upto five rasters but more than 5 it showed different errors.

Executing: LogisticRegressionTool road;slope;stream;fault;geo;rain;pga f;f;f;f;f;f;f F:\LR_N\weight\road.dbf;F:\LR_N\weight\slope.dbf;F:\LR_N\weight\stream.dbf;F:\LR_N\weight\fault_CT.dbf;F:\LR_N\weight\geo_CT.dbf;F:\LR_N\weight\rain_CT.dbf;F:\LR_N\weight\pga_CT.dbf trainig -99 1 F:\LR_N\new\LR_logpol F:\LR_N\new\LR_coeff5 F:\LR_N\new\LR_pprb5 F:\LR_N\new\LR_std5 F:\LR_N\new\LR_conf5 Start Time: Sun Feb 14 10:25:51 2021 Running script LogisticRegressionTool... Checking environment... Input rasters: [u'road', u'slope', u'stream', u'fault', u'geo', u'rain', u'pga'] Evidence_types: [u'f', u'f', u'f', u'f', u'f', u'f', u'f'] Wts_Tables: [u'F:\LR_N\weight\road.dbf', u'F:\LR_N\weight\slope.dbf', u'F:\LR_N\weight\stream.dbf', u'F:\LR_N\weight\fault_CT.dbf', u'F:\LR_N\weight\geo_CT.dbf', u'F:\LR_N\weight\rain_CT.dbf', u'F:\LR_N\weight\pga_CT.dbf'] F:\LR_N\weight\road.dbf F:\LR_N\weight\slope.dbf F:\LR_N\weight\stream.dbf F:\LR_N\weight\fault_CT.dbf F:\LR_N\weight\geo_CT.dbf F:\LR_N\weight\rain_CT.dbf F:\LR_N\weight\pga_CT.dbf TrainPts: trainig MissingDataValue: -99

========== arcsdm values ========== ArcSDM 5.03-1 for ArcGis (Pro and Desktop)

Arcgis environment: Desktop (10.4.1) Workspace: F:\LR_N\new (FileSystem) Scratch workspace: F:\LR_N\new (FileSystem) Map Units: meter Mask: "study.shp" and it is FeatureLayer Warning: You should only use single value raster type masks! Mask size: 3112.83127151 Cell Size: 30

Training Sites: 1670

Unit Cell Area: 1.0km^2, Cells in area: 3112.83127151 Prior Probability: 0.536489 Training Set: F:\LR_N\trainig.shp Study Area Raster: F:\LR_N\study.shp Study Area Area: 3112.83127151km^2 Creating Generalized Class rasters. Input_Raster: road Output_Raster: F:\LR_N\new\road_G0 Temp_Raster: F:\LR_N\new\tmp_rst26 (6) Output_Raster: F:\LR_N\new\Lookup_tmp_27 (6) Input_Raster: slope Output_Raster: F:\LR_N\new\slope_G0 Temp_Raster: F:\LR_N\new\tmp_rst27 (8) Output_Raster: F:\LR_N\new\Lookup_tmp_28 (7) Input_Raster: stream Output_Raster: F:\LR_N\new\stream_G0 Temp_Raster: F:\LR_N\new\tmp_rst28 (6) Output_Raster: F:\LR_N\new\Lookup_tmp_29 (5) Input_Raster: fault Output_Raster: F:\LR_N\new\fault_G0 Temp_Raster: F:\LR_N\new\tmp_rst29 (6) Output_Raster: F:\LR_N\new\Lookup_tmp_30 (4) Input_Raster: geo Output_Raster: F:\LR_N\new\geo_G0 Temp_Raster: F:\LR_N\new\tmp_rst30 (15) Output_Raster: F:\LR_N\new\Lookup_tmp_31 (8) Input_Raster: rain Output_Raster: F:\LR_N\new\rain_G0 Temp_Raster: F:\LR_N\new\tmp_rst31 (7) Output_Raster: F:\LR_N\new\Lookup_tmp_32 (5) Input_Raster: pga Output_Raster: F:\LR_N\new\pga_G0 Temp_Raster: F:\LR_N\new\tmp_rst32 (7) Output_Raster: F:\LR_N\new\Lookup_tmp_33 (7) Combining...F:\LR_N\new\Lookup_tmp_27;F:\LR_N\new\Lookup_tmp_28;F:\LR_N\new\Lookup_tmp_29;F:\LR_N\new\Lookup_tmp_30;F:\LR_N\new\Lookup_tmp_31;F:\LR_N\new\Lookup_tmp_32;F:\LR_N\new\Lookup_tmp_33 Combine done succesfully. Writing Logistic Regression input files... Write a parameter file to the ArcView extension directory Running F:\LR_N\new\scratch\sdmlr.bat: Logistic regression output file F:\LR_N\new\scratch\logpol.tba does not exist. Error in case.dat or param.dat. GP ERRORS:

PYTHON ERRORS: Traceback Info: File "F:\LR_N\ArcSDM-master\Toolbox\arcsdm\logisticregression.py", line 481, in Execute raise Exception

Error Info: <type 'exceptions.Exception'>:

Traceback (most recent call last): File "", line 1576, in execute File "F:\LR_N\ArcSDM-master\Toolbox\arcsdm\logisticregression.py", line 481, in Execute raise Exception Exception

Failed to execute (LogisticRegressionTool). Failed at Sun Feb 14 10:28:21 2021 (Elapsed Time: 2 minutes 29 seconds)

tachyon-work commented 3 years ago

There are notes in the tool help which explicitly state that the LR tool doesn't work if you have more than 6000 unique conditions (it's not about whether you have 5 or 6 input maps, but how many unique combinations of values occur for the set of input maps being used in the analysis). This is a problem that is hard coded into the executable that the LR tool calls to run the analysis. LR needs recoding from scratch. The original source code for the SDMLR.exe executable has been lost by the original developers of ArcSDM and I don't have the time to redevelop it.