Update chapter4.do.txt

This commit is contained in:
Morten Hjorth-Jensen
2021-10-20 10:04:42 +02:00
parent 86358bc28a
commit 8630bcf4b3
+13 -1
View File
@@ -566,8 +566,20 @@ features are of relevance and which are not. This leads us to
the classical Principal Component Analysis (PCA) theorem with
applications. This will be discussed later this semester ("week 43":"https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week43-bs.html").
Here we present a further way to present our results in terms of a so-called _confusion matrix_, the cumulative gain and the _ROC_ curve.
This way of displaying our data are based upon different ways to classify our possible outcomes. Before we proceed we need some definitions.
o _TP_: true positive or in other words, something equivalent with a proper classification
o _TN_: true negative, which is equivalent with a correct rejection
o _FP_: false positive, or in simpler words something that is equivalent with a false alarm
o _FN_: false negative, which is mean to be equivalent with a miss.
The total data set is then the sum of the true positive and true negative targets or outputs, labeled by $n$.
Based on this we can then define the accuracy score as the sum of correctly predicted _TP_ and _TN_ cases divided by the sum of true positive and treue negative events in our data set, or as
!bt
\[
\mathrm{Accuracy} = \frac{\sum_{i=0}^{n-1}I(y_i=\tilde{y}_i)}{n}.
\]
!et
!bc pycod
import matplotlib.pyplot as plt