ex-7: FLD terminated
This commit is contained in:
parent
ef5f8d5a33
commit
d3e0be657b
@ -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
|
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
|
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
|
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.
|
||||||
|
|
||||||
|
{#fig:fisher_points}
|
||||||
|
|
||||||
Assuming not to know how the points were generated, a model of classification
|
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
|
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
|
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.
|
this case were the weight vector and the position of the point to be projected.
|
||||||
|
|
||||||
|
<div id="fig:fisher_proj">
|
||||||
|
{height=5.7cm}
|
||||||
|
{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.
|
||||||
|
Loading…
Reference in New Issue
Block a user