From d3e0be657ba7348e916a80797fb53dcb1c52ffea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gi=C3=B9=20Marcer?= Date: Fri, 3 Apr 2020 23:28:29 +0200 Subject: [PATCH] ex-7: FLD terminated --- notes/sections/7.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/notes/sections/7.md b/notes/sections/7.md index 138c125..b6ef97b 100644 --- a/notes/sections/7.md +++ b/notes/sections/7.md @@ -35,7 +35,12 @@ In the code, default settings are $N_s = 800$ points for the signal and $N_n = samples were handled as matrices of dimension $n$ x 2, where $n$ is the number of points in the sample. The library `gsl_matrix` provided by GSL was employed for this purpose and the function `gsl_ran_bivariate_gaussian()` was used for -generating the points. +generating the points. +An example of the two samples is shown in @fig:fisher_points. + +![Example of points sorted according to two Gaussian with +the given parameters. Noise points in pink and signal points +in yellow.](images/fisher-points.pdf){#fig:fisher_points} Assuming not to know how the points were generated, a model of classification must then be implemented in order to assign each point to the right class @@ -185,8 +190,25 @@ $$ $$ The projection of the points was accomplished by the use of the function -`gsl_blas_ddot`, which computed a dot product between two vectors, which in +`gsl_blas_ddot()`, which computed a dot product between two vectors, which in this case were the weight vector and the position of the point to be projected. +
+![View from above of the samples.](images/fisher-plane.pdf){height=5.7cm} +![Gaussian of the samples on the projection + line.](images/fisher-proj.pdf){height=5.7cm} +Aeral and lateral views of the projection direction, in blue, and the cut, in red. +
+Results obtained for the same sample in @fig:fisher_points are shown in +@fig:fisher_proj. The weight vector $w$ was found to be: + +$$ + w = (0.707, 0.707) +$$ + +and $t_{\text{cut}}$ is 1.323 far from the origin of the axes. Hence, as can be +seen, the vector $w$ turned out to be parallel to the line joining the means of +the two classes (reminded to be $(0, 0)$ and $(4, 4)$) which means that the +total covariance matrix $S$ is isotropic, proportional to the unit matrix.