-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing][saga] Fix definition of Multiple regression points/grids…
… alg Fixes #21146
- Loading branch information
1 parent
56e465c
commit 4f8e231
Showing
22 changed files
with
302 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
python/plugins/processing/tests/testdata/custom/saga/points_regression.cpg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UTF-8 |
Binary file added
BIN
+290 Bytes
python/plugins/processing/tests/testdata/custom/saga/points_regression.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions
1
python/plugins/processing/tests/testdata/custom/saga/points_regression.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] |
1 change: 1 addition & 0 deletions
1
python/plugins/processing/tests/testdata/custom/saga/points_regression.qpj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] |
Binary file added
BIN
+268 Bytes
python/plugins/processing/tests/testdata/custom/saga/points_regression.shp
Binary file not shown.
Binary file added
BIN
+148 Bytes
python/plugins/processing/tests/testdata/custom/saga/points_regression.shx
Binary file not shown.
Binary file added
BIN
+708 Bytes
...plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.dbf
Binary file not shown.
51 changes: 51 additions & 0 deletions
51
...lugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.mtab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<SAGA_METADATA> | ||
<HISTORY saga-version="2.3.1"> | ||
<MODULE library="statistics_regression" id="1" name="Multiple Regression Analysis (Points and Predictor Grids)"> | ||
<OPTION type="grid_system" id="PARAMETERS_GRID_SYSTEM" name="Grid system"> | ||
<CELLSIZE>0.0001</CELLSIZE> | ||
<XMIN>18.666347944200002</XMIN> | ||
<XMAX>18.7035479442</XMAX> | ||
<YMIN>45.7767514376</YMIN> | ||
<YMAX>45.8116514376</YMAX> | ||
</OPTION> | ||
<OPTION type="table_field" id="ATTRIBUTE" name="Dependent Variable" index="1">rvalue_1</OPTION> | ||
<OPTION type="choice" id="RESAMPLING" name="Resampling" index="3">B-Spline Interpolation</OPTION> | ||
<OPTION type="boolean" id="COORD_X" name="Include X Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="COORD_Y" name="Include Y Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="INTERCEPT" name="Intercept">TRUE</OPTION> | ||
<OPTION type="choice" id="METHOD" name="Method" index="3">stepwise</OPTION> | ||
<OPTION type="double" id="P_VALUE" name="Significance Level">5.000000</OPTION> | ||
<OPTION type="choice" id="CROSSVAL" name="Cross Validation" index="0">none</OPTION> | ||
<OPTION type="choice" id="RESIDUAL_COR" name="Residual Interpolation" index="0">Multleve B-Spline Interpolation</OPTION> | ||
<INPUT_LIST type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<dem type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd</FILE> | ||
</dem> | ||
</INPUT_LIST> | ||
<INPUT type="shapes" id="POINTS" name="Points"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp</FILE> | ||
</INPUT> | ||
<OUTPUT type="table" id="INFO_COEFF" name="Details: Coefficients">MLRA Coefficients</OUTPUT> | ||
</MODULE> | ||
</HISTORY> | ||
<SOURCE> | ||
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.dbf</FILE> | ||
<DATABASE> | ||
<FIELDS> | ||
<FIELD TYPE="INTEGER">VAR_ID</FIELD> | ||
<FIELD TYPE="STRING">VAR_NAME</FIELD> | ||
<FIELD TYPE="DOUBLE">REGCOEFF</FIELD> | ||
<FIELD TYPE="DOUBLE">R</FIELD> | ||
<FIELD TYPE="DOUBLE">R2</FIELD> | ||
<FIELD TYPE="DOUBLE">R2_ADJ</FIELD> | ||
<FIELD TYPE="DOUBLE">STD_ERROR</FIELD> | ||
<FIELD TYPE="DOUBLE">T</FIELD> | ||
<FIELD TYPE="DOUBLE">SIG</FIELD> | ||
<FIELD TYPE="DOUBLE">P</FIELD> | ||
</FIELDS> | ||
</DATABASE> | ||
<PROJECTION></PROJECTION> | ||
</SOURCE> | ||
<DESCRIPTION></DESCRIPTION> | ||
</SAGA_METADATA> |
1 change: 1 addition & 0 deletions
1
...plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] |
Binary file added
BIN
+607 Bytes
...lugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.dbf
Binary file not shown.
43 changes: 43 additions & 0 deletions
43
...ugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.mtab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<SAGA_METADATA> | ||
<HISTORY saga-version="2.3.1"> | ||
<MODULE library="statistics_regression" id="1" name="Multiple Regression Analysis (Points and Predictor Grids)"> | ||
<OPTION type="grid_system" id="PARAMETERS_GRID_SYSTEM" name="Grid system"> | ||
<CELLSIZE>0.0001</CELLSIZE> | ||
<XMIN>18.666347944200002</XMIN> | ||
<XMAX>18.7035479442</XMAX> | ||
<YMIN>45.7767514376</YMIN> | ||
<YMAX>45.8116514376</YMAX> | ||
</OPTION> | ||
<OPTION type="table_field" id="ATTRIBUTE" name="Dependent Variable" index="1">rvalue_1</OPTION> | ||
<OPTION type="choice" id="RESAMPLING" name="Resampling" index="3">B-Spline Interpolation</OPTION> | ||
<OPTION type="boolean" id="COORD_X" name="Include X Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="COORD_Y" name="Include Y Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="INTERCEPT" name="Intercept">TRUE</OPTION> | ||
<OPTION type="choice" id="METHOD" name="Method" index="3">stepwise</OPTION> | ||
<OPTION type="double" id="P_VALUE" name="Significance Level">5.000000</OPTION> | ||
<OPTION type="choice" id="CROSSVAL" name="Cross Validation" index="0">none</OPTION> | ||
<OPTION type="choice" id="RESIDUAL_COR" name="Residual Interpolation" index="0">Multleve B-Spline Interpolation</OPTION> | ||
<INPUT_LIST type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<dem type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd</FILE> | ||
</dem> | ||
</INPUT_LIST> | ||
<INPUT type="shapes" id="POINTS" name="Points"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp</FILE> | ||
</INPUT> | ||
<OUTPUT type="table" id="INFO_MODEL" name="Details: Model">MLRA Model</OUTPUT> | ||
</MODULE> | ||
</HISTORY> | ||
<SOURCE> | ||
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.dbf</FILE> | ||
<DATABASE> | ||
<FIELDS> | ||
<FIELD TYPE="STRING">PARAMETER</FIELD> | ||
<FIELD TYPE="DOUBLE">VALUE</FIELD> | ||
</FIELDS> | ||
</DATABASE> | ||
<PROJECTION></PROJECTION> | ||
</SOURCE> | ||
<DESCRIPTION></DESCRIPTION> | ||
</SAGA_METADATA> |
1 change: 1 addition & 0 deletions
1
...lugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] |
Binary file added
BIN
+477 Bytes
.../plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.dbf
Binary file not shown.
44 changes: 44 additions & 0 deletions
44
...plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.mshp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<SAGA_METADATA> | ||
<HISTORY saga-version="2.3.1"> | ||
<MODULE library="statistics_regression" id="1" name="Multiple Regression Analysis (Points and Predictor Grids)"> | ||
<OPTION type="grid_system" id="PARAMETERS_GRID_SYSTEM" name="Grid system"> | ||
<CELLSIZE>0.0001</CELLSIZE> | ||
<XMIN>18.666347944200002</XMIN> | ||
<XMAX>18.7035479442</XMAX> | ||
<YMIN>45.7767514376</YMIN> | ||
<YMAX>45.8116514376</YMAX> | ||
</OPTION> | ||
<OPTION type="table_field" id="ATTRIBUTE" name="Dependent Variable" index="1">rvalue_1</OPTION> | ||
<OPTION type="choice" id="RESAMPLING" name="Resampling" index="3">B-Spline Interpolation</OPTION> | ||
<OPTION type="boolean" id="COORD_X" name="Include X Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="COORD_Y" name="Include Y Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="INTERCEPT" name="Intercept">TRUE</OPTION> | ||
<OPTION type="choice" id="METHOD" name="Method" index="3">stepwise</OPTION> | ||
<OPTION type="double" id="P_VALUE" name="Significance Level">5.000000</OPTION> | ||
<OPTION type="choice" id="CROSSVAL" name="Cross Validation" index="0">none</OPTION> | ||
<OPTION type="choice" id="RESIDUAL_COR" name="Residual Interpolation" index="0">Multleve B-Spline Interpolation</OPTION> | ||
<INPUT_LIST type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<dem type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd</FILE> | ||
</dem> | ||
</INPUT_LIST> | ||
<INPUT type="shapes" id="POINTS" name="Points"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp</FILE> | ||
</INPUT> | ||
<OUTPUT type="shapes" id="RESIDUALS" name="Residuals">POINTS.rvalue_1 [Residuals]</OUTPUT> | ||
</MODULE> | ||
</HISTORY> | ||
<SOURCE> | ||
<FILE></FILE> | ||
<DATABASE> | ||
<FIELDS> | ||
<FIELD TYPE="DOUBLE">rvalue_1</FIELD> | ||
<FIELD TYPE="DOUBLE">TREND</FIELD> | ||
<FIELD TYPE="DOUBLE">RESIDUAL</FIELD> | ||
</FIELDS> | ||
</DATABASE> | ||
<PROJECTION></PROJECTION> | ||
</SOURCE> | ||
<DESCRIPTION></DESCRIPTION> | ||
</SAGA_METADATA> |
1 change: 1 addition & 0 deletions
1
.../plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] |
Binary file added
BIN
+268 Bytes
.../plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shp
Binary file not shown.
Binary file added
BIN
+148 Bytes
.../plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shx
Binary file not shown.
Binary file added
BIN
+818 Bytes
...lugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.dbf
Binary file not shown.
57 changes: 57 additions & 0 deletions
57
...ugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.mtab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<SAGA_METADATA> | ||
<HISTORY saga-version="2.3.1"> | ||
<MODULE library="statistics_regression" id="1" name="Multiple Regression Analysis (Points and Predictor Grids)"> | ||
<OPTION type="grid_system" id="PARAMETERS_GRID_SYSTEM" name="Grid system"> | ||
<CELLSIZE>0.0001</CELLSIZE> | ||
<XMIN>18.666347944200002</XMIN> | ||
<XMAX>18.7035479442</XMAX> | ||
<YMIN>45.7767514376</YMIN> | ||
<YMAX>45.8116514376</YMAX> | ||
</OPTION> | ||
<OPTION type="table_field" id="ATTRIBUTE" name="Dependent Variable" index="1">rvalue_1</OPTION> | ||
<OPTION type="choice" id="RESAMPLING" name="Resampling" index="3">B-Spline Interpolation</OPTION> | ||
<OPTION type="boolean" id="COORD_X" name="Include X Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="COORD_Y" name="Include Y Coordinate">FALSE</OPTION> | ||
<OPTION type="boolean" id="INTERCEPT" name="Intercept">TRUE</OPTION> | ||
<OPTION type="choice" id="METHOD" name="Method" index="3">stepwise</OPTION> | ||
<OPTION type="double" id="P_VALUE" name="Significance Level">5.000000</OPTION> | ||
<OPTION type="choice" id="CROSSVAL" name="Cross Validation" index="0">none</OPTION> | ||
<OPTION type="choice" id="RESIDUAL_COR" name="Residual Interpolation" index="0">Multleve B-Spline Interpolation</OPTION> | ||
<INPUT_LIST type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<dem type="grid_list" id="PREDICTORS" name="Predictors" system="PARAMETERS_GRID_SYSTEM"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd</FILE> | ||
</dem> | ||
</INPUT_LIST> | ||
<INPUT type="shapes" id="POINTS" name="Points"> | ||
<FILE>/tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp</FILE> | ||
</INPUT> | ||
<OUTPUT type="table" id="INFO_STEPS" name="Details: Steps">MLRA Steps</OUTPUT> | ||
</MODULE> | ||
</HISTORY> | ||
<SOURCE> | ||
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.dbf</FILE> | ||
<DATABASE> | ||
<FIELDS> | ||
<FIELD TYPE="INTEGER">MODEL</FIELD> | ||
<FIELD TYPE="DOUBLE">R</FIELD> | ||
<FIELD TYPE="DOUBLE">R2</FIELD> | ||
<FIELD TYPE="DOUBLE">R2_ADJ</FIELD> | ||
<FIELD TYPE="DOUBLE">STD_ERROR</FIELD> | ||
<FIELD TYPE="DOUBLE">SSR</FIELD> | ||
<FIELD TYPE="DOUBLE">SSE</FIELD> | ||
<FIELD TYPE="DOUBLE">MSR</FIELD> | ||
<FIELD TYPE="DOUBLE">MSE</FIELD> | ||
<FIELD TYPE="DOUBLE">DF</FIELD> | ||
<FIELD TYPE="DOUBLE">F</FIELD> | ||
<FIELD TYPE="DOUBLE">SIG</FIELD> | ||
<FIELD TYPE="DOUBLE">VAR_F</FIELD> | ||
<FIELD TYPE="DOUBLE">VAR_SIG</FIELD> | ||
<FIELD TYPE="STRING">DIR</FIELD> | ||
<FIELD TYPE="STRING">VARIABLE</FIELD> | ||
</FIELDS> | ||
</DATABASE> | ||
<PROJECTION></PROJECTION> | ||
</SOURCE> | ||
<DESCRIPTION></DESCRIPTION> | ||
</SAGA_METADATA> |
1 change: 1 addition & 0 deletions
1
...lugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters