PA chart (PA chart) in geology is explained and implemented using python || plt drawing implementation, a coordinate chart shares two left and right y-axes

1. PA diagram

The PA diagram was first proposed in the article "Fuzzification of continuous-value spatial evidence for mineral prospectivity mapping" .

as followsFigure dShown:
Insert image description here

Explanation of the PA diagram in the original article

In this paper, we combine the percentage of known mineral sites delineated by the corresponding prospect class and the area occupied by the corresponding prospect class (relative to the total study area) to form a graph. Therefore, by overlaying the locations of known deposits onto classified prospect maps, the association of known deposits with different prospect classes (e.g. Carranza et al., 2005; Porwal et al., 2003, 2004, 2006; Yousefi et al., 2012, 2013, 2014), the model is evaluated considering its occupied area relative to the total area of ​​the study area, and we getFigure d. These plots are called prediction-area (PA) plots, respectively based onPicture c, drawn for fuzzy foreground models and expected value foreground models.

Picture c: Insert image description here
The meaning of PA diagram

In Figure d, the intersection of the two curves, namely the known mineral point prediction rate curve corresponding to the prospect grade and the occupied area percentage curve corresponding to the prospect grade, is the standard for evaluating and comparing the fuzzy prospect model and the expected value prospect model. This is because if an intersection appears higher on the PA diagram, it depicts a smaller area containing more mineral deposits. Therefore, it is "easier" to find undiscovered deposit types in such a smaller area. The higher the intersection point, the higher the priority for further exploration and the higher the value of the target area.


My understanding:

For the entire study area, we have known mining areas (positive samples) and unknown mining areas. Using the neural network model to predict these mining areas will get the mineralization probability of each mining area (a decimal between 0 and 1, generally greater than 0.5). for minerals). Change the classification threshold from 0 to 1, increasing in steps of 0.1 each time. If it is greater than the threshold, it is determined that there is a mine (no longer a fixed 0.5). Then each time the threshold is changed, aPositive samples are classified correctly/the total number of known positive samplesCorrect classification percentage, also calculatedArea occupied by greater than threshold/total area;After getting these two numbers, you can draw the PA diagram

2. python drawing

predictionClaCorPer = []		# 保存 正样本分类正确 / 已知正样本总数
AreaClaCorPer = []				# 保存 大于阈值所占的面积/总面积

# 坐标样式
custom_y_left = []
for i in range(11):
    custom_y_left.append(str(i*10)+'%')
custom_y_right = custom_y_left[::-1]     # 将custom_y_left的顺序逆置

'''
custom_y_right:
['100%', '90%', '80%', '70%', '60%', '50%', '40%', '30%', '20%', '10%', '0%']
custom_y_left:
['0%', '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%']
'''

# 设置画布大小 7×7
fig, ax1 = plt.subplots(figsize=(8, 8), dpi=100)

# 设置网格线
ax1.grid(axis='both', linestyle='-.')

# 设置左边的 y轴
ax1.plot(np.linspace(0, 1.0, 101), predictionClaCorPer, color="red", alpha=0.5, label="Prediction rate",linewidth= 2)
ax1.set_yticks(np.linspace(0, 100, 11), custom_y_left)     # 设置左边 y轴刻度
plt.ylim(0, 100) # 设置y轴显示刻度 0~100
ax1.set_xticks(np.linspace(0, 1.0, 11))     # 设置共享 x轴刻度
ax1.set_xlabel('Prospectivity score', fontdict={
    
    'size': 16})
ax1.set_ylabel('Percentage of known mine occurrences', fontdict={
    
    'size': 16})

# 设置右边的 y轴,与ax1共享同一个 x轴
ax2 = ax1.twinx()
ax2.set_yticks(np.linspace(100, 0, 11),custom_y_right)     # 设置右边 y轴刻度
plt.ylim(0, 100) # 设置y轴显示刻度 0~100
ax2.invert_yaxis()                          # 将右边 y轴刻度逆置
ax2.set_ylabel('Percentage of study area', fontdict={
    
    'size': 16})
ax2.plot(np.linspace(0, 1.0, 101), AreaClaCorPer, color="green", label="Area",linewidth=2)

fig.legend(loc=4, bbox_to_anchor=(1, 1), bbox_transform=ax1.transAxes)
plt.show()

Result graph:
Insert image description here

Guess you like

Origin blog.csdn.net/qq_56039091/article/details/126794380