@@ -205,27 +205,6 @@ def compare_NORMs(SINCLAS_outputs, NORM_outputs, name=""):
205
205
fig , ax = compare_NORMs (df .loc [~ volcanic_filter , :], NORM .loc [~ volcanic_filter ])
206
206
plt .show ()
207
207
########################################################################################
208
- # These normative mineralogical components could be input into mineralogical
209
- # classifiers, as mentioned above. For example, the IUGS QAP classifier:
210
- #
211
- from pyrolite .util .classification import QAP
212
-
213
- clf = QAP () # build a QAP classifier
214
-
215
- qap_data = NORM .loc [:, ["quartz" , "orthoclase" ]] #
216
- qap_data ["plagioclase" ] = NORM .loc [:, ["albite" , "anorthite" ]].sum (axis = 1 )
217
- # predict which lithological class each mineralogical composiiton belongs in
218
- # we add a small value to zeros here to ensure points fit in polygons
219
- predicted_classes = clf .predict (qap_data .replace (0 , 10e-6 ).values )
220
- predicted_classes .head ()
221
- ########################################################################################
222
- # We can use these predicted classes as a color index also, within the QAP diagram
223
- # or elsewhere:
224
- #
225
- ax = clf .add_to_axes ()
226
- qap_data .pyroplot .scatter (ax = ax , c = predicted_classes , axlabels = False , cmap = "tab20c" )
227
- plt .show ()
228
- ########################################################################################
229
208
# We could also compare how these mineralogical distinctions map into chemical ones
230
209
# like the TAS diagram:
231
210
#
0 commit comments