Commit 73463550 authored by Davis King's avatar Davis King

Clarified spec

parent 4f08da0d
...@@ -33,7 +33,7 @@ namespace dlib ...@@ -33,7 +33,7 @@ namespace dlib
- The confusion matrix C returned by this function has the following properties. - The confusion matrix C returned by this function has the following properties.
- C.nc() == labeler.num_labels() - C.nc() == labeler.num_labels()
- C.nr() == labeler.num_labels() - C.nr() == labeler.num_labels()
- C(T,P) == the number of times a sample with label T was predicted - C(T,P) == the number of times a sequence element with label T was predicted
to have a label of P. to have a label of P.
- Any samples with a label value >= labeler.num_labels() are ignored. That - Any samples with a label value >= labeler.num_labels() are ignored. That
is, samples with labels the labeler hasn't ever seen before are ignored. is, samples with labels the labeler hasn't ever seen before are ignored.
...@@ -69,7 +69,7 @@ namespace dlib ...@@ -69,7 +69,7 @@ namespace dlib
- The confusion matrix C returned by this function has the following properties. - The confusion matrix C returned by this function has the following properties.
- C.nc() == trainer.num_labels() - C.nc() == trainer.num_labels()
- C.nr() == trainer.num_labels() - C.nr() == trainer.num_labels()
- C(T,P) == the number of times a sample with label T was predicted - C(T,P) == the number of times a sequence element with label T was predicted
to have a label of P. to have a label of P.
!*/ !*/
......
...@@ -30,9 +30,10 @@ namespace dlib ...@@ -30,9 +30,10 @@ namespace dlib
is calculated. It also defines how many output labels there are as is calculated. It also defines how many output labels there are as
well as the order of the model. well as the order of the model.
Finally, note that PSI(x,y) is a sum of feature vectors, each extracted Finally, note that PSI(x,y) is a sum of feature vectors, each derived
at one of the positions of the input sequence x. Each of these constituent from the entire input sequence x but only part of the label sequence y.
feature vectors is defined by the get_features() method of this class. Each of these constituent feature vectors is defined by the get_features()
method of this class.
!*/ !*/
public: public:
...@@ -123,9 +124,9 @@ namespace dlib ...@@ -123,9 +124,9 @@ namespace dlib
- for all valid i: - for all valid i:
- interprets y(i) as the label corresponding to x[position-i] - interprets y(i) as the label corresponding to x[position-i]
- This function computes the part of PSI() corresponding to the x[position] - This function computes the part of PSI() corresponding to the x[position]
element of the input sequence. The features are returned as a sparse element of the input sequence. Moreover, this part of PSI() is returned as
vector by invoking set_feature(). For example, to set the feature with a sparse vector by invoking set_feature(). For example, to set the feature
an index of 55 to the value of 1 this method would call: with an index of 55 to the value of 1 this method would call:
set_feature(55); set_feature(55);
Or equivalently: Or equivalently:
set_feature(55,1); set_feature(55,1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment