Last change
on this file since 389 was
389,
checked in by Peter, 18 years ago
|
moved kernel to regression namespace and tried to fix some dox issues
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.3 KB
|
Line | |
---|
1 | // $Id: Score.h 389 2005-08-15 11:37:07Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_statistics_score_ |
---|
4 | #define _theplu_statistics_score_ |
---|
5 | |
---|
6 | #include <c++_tools/gslapi/vector.h> |
---|
7 | |
---|
8 | namespace theplu { |
---|
9 | namespace statistics { |
---|
10 | |
---|
11 | /// |
---|
12 | /// Abstract Base Class defining the interface for the score classes. |
---|
13 | /// |
---|
14 | class Score |
---|
15 | { |
---|
16 | |
---|
17 | public: |
---|
18 | /// |
---|
19 | /// Constructor |
---|
20 | /// |
---|
21 | Score(bool absolute=true) ; |
---|
22 | |
---|
23 | /// |
---|
24 | /// Destructor |
---|
25 | /// |
---|
26 | virtual ~Score(void) {}; |
---|
27 | |
---|
28 | /// |
---|
29 | /// Function changing mode of Score |
---|
30 | /// |
---|
31 | inline void absolute(bool absolute) {absolute_=absolute;} |
---|
32 | |
---|
33 | /// |
---|
34 | /// @return statistica. |
---|
35 | /// |
---|
36 | virtual double |
---|
37 | score(const gslapi::vector&, |
---|
38 | const gslapi::vector&, |
---|
39 | const std::vector<size_t>& = std::vector<size_t>()) = 0; |
---|
40 | |
---|
41 | /// |
---|
42 | /// @return statistica (weighted version) |
---|
43 | /// |
---|
44 | virtual double |
---|
45 | score(const gslapi::vector&, |
---|
46 | const gslapi::vector&, |
---|
47 | const gslapi::vector&, |
---|
48 | const std::vector<size_t>& = std::vector<size_t>()) = 0; |
---|
49 | |
---|
50 | /// |
---|
51 | /// @return the ///one-sided p-value( if absolute true is used |
---|
52 | /// this is equivalent to the two-sided p-value.) |
---|
53 | /// |
---|
54 | virtual double p_value(void) const = 0; |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | protected: |
---|
59 | bool absolute_; |
---|
60 | gslapi::vector data_; |
---|
61 | gslapi::vector target_; |
---|
62 | std::vector<size_t> train_set_; |
---|
63 | gslapi::vector weight_; |
---|
64 | bool weighted_; |
---|
65 | |
---|
66 | }; // class Score |
---|
67 | |
---|
68 | }} // of namespace statistics and namespace theplu |
---|
69 | |
---|
70 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.