Calculate base metrics
calculate_base_metrics(raster, deposits, band=1, negatives=None)
Calculate true positive rate, proportion of area and false positive rate values for different thresholds.
Function calculates true positive rate, proportion of area and false positive rate values for different thresholds which are determined from inputted deposit locations and mineral prospectivity map. Note that calculation of false positive rate is optional and is only done if negative point locations are provided.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
raster |
DatasetReader
|
Mineral prospectivity map or evidence layer. |
required |
deposits |
GeoDataFrame
|
Mineral deposit locations as points. |
required |
band |
int
|
Band index of the mineral prospectivity map. Defaults to 1. |
1
|
negatives |
Optional[GeoDataFrame]
|
Negative locations as points. |
None
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing true positive rate, proportion of area, threshold values and false positive rate (optional) values. |
Raises:
Type | Description |
---|---|
NonMatchingCrsException
|
The raster and point data are not in the same CRS. |
GeometryTypeException
|
The input geometries contain non-point features. |
Source code in eis_toolkit/evaluation/calculate_base_metrics.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|