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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class Trainer</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class <A HREF="#DOC.DOCU">Trainer</A></H2></H2><BLOCKQUOTE>Trainer.</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=275>
<param name=classes value="CObject,MObject.html,CTrainer,MTrainer.html,CQCTrainer,MQCTrainer.html,CNPTrainer,MNPTrainer.html,CGMTrainer,MGMTrainer.html,CEMTrainer,MEMTrainer.html,CBoosting,MBoosting.html,CBayesClassifier,MBayesClassifier.html,CBagging,MBagging.html">
<param name=before value="M,M,M|_,MR_,MR_,MR_,MR_,MR_,Mr_">
<param name=after value="Md_,M,M,M,M,M,M,M,M">
<param name=indent value="0,1,1,1,1,1,1,1,1">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.60.1">Trainer</A></B>(<!1><A HREF="Machine.html">Machine</A>* machine_, <!1><A HREF="DataSet.html">DataSet</A>* data_)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.60.2">train</A></B>(<!1><A HREF="List.html">List</A>* measurers) = 0
<DD><I>Train the machine.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.60.3">test</A></B>(<!1><A HREF="List.html">List</A>* measurers)
<DD><I>Test the machine.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.60.4">testExample</A></B>(<!1><A HREF="List.html">List</A>* measurers, int t)
<DD><I>Test on one example.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.60.5">crossValidate</A></B>(int k_fold, <!1><A HREF="List.html">List</A>* train_measurers, <!1><A HREF="List.html">List</A>* test_measurers, <!1><A HREF="List.html">List</A>* cross_valid_measurers=NULL)
<DD><I>K-fold cross-validation.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.60.6">loadFILE</A></B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DD><I>Load the parameters of the machine and the dataset</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.60.7">saveFILE</A></B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DD><I>Save the parameters of the machine and the dataset</I>
</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>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>Trainer.
<P>A trainer takes a <TT>Machine</TT> and a <TT>DataSet</TT>,
and is able to train this machine on this dataset.</BLOCKQUOTE>
<DL>
<A NAME="Trainer"></A>
<A NAME="DOC.60.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Trainer(<!1><A HREF="Machine.html">Machine</A>* machine_, <!1><A HREF="DataSet.html">DataSet</A>* data_)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="train"></A>
<A NAME="DOC.60.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void train(<!1><A HREF="List.html">List</A>* measurers) = 0</B></TT>
<DD>Train the machine.
The Trainer has to call the measurers
when it want.
<DL><DT><DD></DL><P>
<A NAME="test"></A>
<A NAME="DOC.60.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void test(<!1><A HREF="List.html">List</A>* measurers)</B></TT>
<DD>Test the machine.
This method call all the measurers,
for all the examples of their associated
dataset.
It's already written...
<DL><DT><DD></DL><P>
<A NAME="testExample"></A>
<A NAME="DOC.60.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void testExample(<!1><A HREF="List.html">List</A>* measurers, int t)</B></TT>
<DD>Test on one example.
It supposes that all the measurers
have the same dataset, and call the
measurers for the example <TT>t</TT> of this
dataset.
<DL><DT><DD></DL><P>
<A NAME="crossValidate"></A>
<A NAME="DOC.60.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void crossValidate(int k_fold, <!1><A HREF="List.html">List</A>* train_measurers, <!1><A HREF="List.html">List</A>* test_measurers, <!1><A HREF="List.html">List</A>* cross_valid_measurers=NULL)</B></TT>
<DD>K-fold cross-validation.
Do a K-fold cross-validation on <TT>data</TT>.
<UL>
<LI> <TT>k_fold</TT> is the number of subsets that
it will make on <TT>data</TT>.
<LI> <TT>train_measurers</TT> are the measurers called
during the train phase. (NULL if nothing).
<LI> <TT>test_measurers</TT> are the measurers called
during the test phase.
<LI> <TT>cross_valid_measurers</TT> are the measurers
called after each iteration of the cross-validation.
(these last measurers should'nt use <TT>measureEx()</TT>)
</UL>
<DL><DT><DD></DL><P>
<A NAME="loadFILE"></A>
<A NAME="DOC.60.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void loadFILE(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)</B></TT>
<DD>Load the parameters of the machine and the dataset
<DL><DT><DD></DL><P>
<A NAME="saveFILE"></A>
<A NAME="DOC.60.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void saveFILE(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)</B></TT>
<DD>Save the parameters of the machine and the dataset
<DL><DT><DD></DL><P></DL>
<HR>
<DL><DT><B>Direct child classes:
</B><DD><A HREF="QCTrainer.html">QCTrainer</A><BR>
<A HREF="NPTrainer.html">NPTrainer</A><BR>
<A HREF="GMTrainer.html">GMTrainer</A><BR>
<A HREF="EMTrainer.html">EMTrainer</A><BR>
<A HREF="Boosting.html">Boosting</A><BR>
<A HREF="BayesClassifier.html">BayesClassifier</A><BR>
<A HREF="Bagging.html">Bagging</A><BR>
</DL>
<DL><DT><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>
|