File: BayesClassifierMachine.html

package info (click to toggle)
torch 2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,488 kB
  • ctags: 3,217
  • sloc: cpp: 14,272; makefile: 201
file content (177 lines) | stat: -rw-r--r-- 8,879 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class  BayesClassifierMachine</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">

<H2>class  <A HREF="#DOC.DOCU">BayesClassifierMachine</A></H2></H2><BLOCKQUOTE>BayesClassifierMachine is the machine used by the <TT>BayesClassifier</TT> trainer to perform a Bayes Classification using different distributions.</BLOCKQUOTE>
<HR>

<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=95>
<param name=classes value="CObject,MObject.html,CMachine,MMachine.html,CBayesClassifierMachine,MBayesClassifierMachine.html">
<param name=before value="M,M,M">
<param name=after value="Md_SP,Md_,M">
<param name=indent value="0,1,2">
<param name=arrowdir value="down">
</APPLET>
<HR>

<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.88.1">n_trainers</A></B>
<DD><I>the number of classes corresponds to the number of <TT>Trainer</TT></I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Trainer.html">Trainer</A>** <B><A HREF="#DOC.88.2">trainers</A></B>
<DD><I>the actual trainers</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>real* <B><A HREF="#DOC.88.3">log_priors</A></B>
<DD><I>the log_prior probabilities of each class.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>real* <B><A HREF="#DOC.88.4">log_posteriors</A></B>
<DD><I>contains the log posterior probability plus the log prior of the class</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.88.5">allocated_log_priors</A></B>
<DD><I>used to know if log_priors where given or allocated</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="ClassFormat.html">ClassFormat</A>* <B><A HREF="#DOC.88.6">class_format</A></B>
<DD><I>the format of the data</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="List.html">List</A>** <B><A HREF="#DOC.88.7">trainers_measurers</A></B>
<DD><I>the measurers for each individual trainer</I>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.88.8">BayesClassifierMachine</A></B>( <!1><A HREF="Trainer.html">Trainer</A>**, int n_trainers_, <!1><A HREF="List.html">List</A>** trainers_measurers_, <!1><A HREF="ClassFormat.html">ClassFormat</A>* class_format_, real* log_priors_=NULL)
<DD><I>creates a machine for BayesClassifier trainers, given a vector of trainers (one per class), an associate measurer for each trainer, a class_format that explains how the classes are coded, and an eventual vector (of size <TT>n_trainers_</TT>) containing the log of the class priors</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual   void <B><A HREF="#DOC.88.9">forward</A></B>( <!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A> )
<DD><I>definition of virtual functions of <TT>Machine</TT> </I>
</DL></P>

</DL>
<HR><H3>Inherited from <A HREF="Machine.html">Machine</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_inputs</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_outputs</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="List.html">List</A>* <B>outputs</B>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>reset</B>()
</DL></P>

</DL>
<HR><H3>Inherited from <A HREF="Object.html">Object</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>init</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int size, void* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addIOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, int init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addROption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, real* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, real init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addBOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, bool* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, bool init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, void* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setIOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setROption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, real option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setBOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, bool option)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>loadFILE</B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>saveFILE</B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>load</B>(const char* filename)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>save</B>(const char* filename)
</DL></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>BayesClassifierMachine is the machine used by the <TT>BayesClassifier</TT>
trainer to perform a Bayes Classification using different distributions.
The output corresponds to the class that is the most probable
(using prior AND posterior information).

<P></BLOCKQUOTE>
<DL>

<A NAME="n_trainers"></A>
<A NAME="DOC.88.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int n_trainers</B></TT>
<DD>the number of classes corresponds to the number of <TT>Trainer</TT>
<DL><DT><DD></DL><P>
<A NAME="trainers"></A>
<A NAME="DOC.88.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Trainer.html">Trainer</A>** trainers</B></TT>
<DD>the actual trainers
<DL><DT><DD></DL><P>
<A NAME="log_priors"></A>
<A NAME="DOC.88.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>real* log_priors</B></TT>
<DD>the log_prior probabilities of each class. default: log_priors are
taken as the log of the proportions in the training set.
<DL><DT><DD></DL><P>
<A NAME="log_posteriors"></A>
<A NAME="DOC.88.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>real* log_posteriors</B></TT>
<DD>contains the log posterior probability plus the log prior of the class
<DL><DT><DD></DL><P>
<A NAME="allocated_log_priors"></A>
<A NAME="DOC.88.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool allocated_log_priors</B></TT>
<DD>used to know if log_priors where given or allocated
<DL><DT><DD></DL><P>
<A NAME="class_format"></A>
<A NAME="DOC.88.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ClassFormat.html">ClassFormat</A>* class_format</B></TT>
<DD>the format of the data
<DL><DT><DD></DL><P>
<A NAME="trainers_measurers"></A>
<A NAME="DOC.88.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="List.html">List</A>** trainers_measurers</B></TT>
<DD>the measurers for each individual trainer
<DL><DT><DD></DL><P>
<A NAME="BayesClassifierMachine"></A>
<A NAME="DOC.88.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> BayesClassifierMachine( <!1><A HREF="Trainer.html">Trainer</A>**, int n_trainers_, <!1><A HREF="List.html">List</A>** trainers_measurers_, <!1><A HREF="ClassFormat.html">ClassFormat</A>* class_format_, real* log_priors_=NULL)</B></TT>
<DD>creates a machine for BayesClassifier trainers, given a vector of
trainers (one per class), an associate measurer for each trainer,
a class_format that explains how the classes are coded, and an eventual
vector (of size <TT>n_trainers_</TT>) containing the log of the class priors
<DL><DT><DD></DL><P>
<A NAME="forward"></A>
<A NAME="DOC.88.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   void forward( <!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A> )</B></TT>
<DD>definition of virtual functions of <TT>Machine</TT> 
<DL><DT><DD></DL><P></DL>

<HR><DL><DT><B>This class has no child classes.</B></DL>

<DL><DT><DT><B>Author:</B><DD>Samy Bengio (bengio@idiap.ch)
Bison Ravi (francois.belisle@idiap.ch)
<DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>