class Trainer

Trainer.

Inheritance:


Public Methods

[more] Trainer(Machine* machine_)
[more]virtual void train(DataSet* data_, MeasurerList* measurers) = 0
Train the machine.
[more]virtual void test(MeasurerList* measurers)
Test the machine.
[more]static Allocator* extractMeasurers(MeasurerList* measurers, DataSet* train, DataSet*** datas, Measurer**** meas, int** n_meas, int* n_datas)
Make a table of measurers from a List.
[more]virtual void loadXFile(XFile* file)
By default, just load the machine
[more]virtual void saveXFile(XFile* file)
By default, just save the machine


Inherited from Object:

Public Fields

oAllocator* allocator

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="")
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="")
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="")
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
ovoid addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid setOOption(const char* name, Object* option)
ovoid load(const char* filename)
ovoid save(const char* filename)
ovoid* operator new(size_t size, Allocator* allocator_=NULL)
ovoid* operator new(size_t size, Allocator* allocator_, void* ptr_)
ovoid operator delete(void* ptr)


Documentation

Trainer.

A trainer takes a Machine and is able to train this machine on a given dataset with the train() method. For each machine, it should exist a trainer which knows how to train this machine. Testing the machine is possible with the test() method.

o Trainer(Machine* machine_)

ovirtual void train(DataSet* data_, MeasurerList* measurers) = 0
Train the machine. The Trainer has to call the measurers when it want.

ovirtual void test(MeasurerList* measurers)
Test the machine. This method call all the measurers, for all the examples of their associated dataset. It's already written...

ostatic Allocator* extractMeasurers(MeasurerList* measurers, DataSet* train, DataSet*** datas, Measurer**** meas, int** n_meas, int* n_datas)
Make a table of measurers from a List.

Given a List of measurers, and, if you want, a train DataSet (else NULL)

Returns an allocator to all the memory allocated by the function. You have to delete this allocator by yourself.

ovirtual void loadXFile(XFile* file)
By default, just load the machine

ovirtual void saveXFile(XFile* file)
By default, just save the machine


Direct child classes:
StochasticGradient
QCTrainer
NPTrainer
EMTrainer
Boosting
BayesClassifier
Bagging
Author:
Ronan Collobert (collober@idiap.ch)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.