ex-7: FLD terminated

This commit is contained in:
Giù Marcer 2020-04-03 23:28:29 +02:00 committed by rnhmjoj
parent ef5f8d5a33
commit d3e0be657b

View File

@ -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.
<div id="fig:fisher_proj">
![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.
</div>
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.