#include <learning.h>
Inheritance diagram for Learner:
Public Methods | |
Learner () | |
virtual void | make (const char *description)=0 |
virtual void | init (double r=-1)=0 |
virtual double | train (const PatternSet &set, int cycles, int cycint=-1, int vsize=-1) |
double | train (const PatternSet &trainSet, const PatternSet &validationSet, int cycles, int cycint=-1) |
virtual double | trainOnce (const PatternSet &trainset) |
virtual Vector | testPattern (const PatternSource &set, int pattern) const |
virtual double | test (const PatternSource &set) const |
virtual ClassifResults * | testClassify (const PatternSource &set) const |
virtual void | copyFreeNet (const ANNetwork &fnet, bool onlyWeights=false) |
virtual void | copy (const Learner &fnet, bool onlyWeights=false) |
virtual ANNetwork * | toANNetwork () const |
This abstraction is intended be generic enough to accomodate every kind of artificial neural networks. But, since there are currently just a very few such implementations, this class may not be very mature.
Slightly bloated.
Definition at line 81 of file learning.h.
|
This file is part of the Inanna library. * * Copyright (C) 1997-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
Definition at line 41 of file learning.cc. |
|
Copy or conversion from any other neural network.
Definition at line 235 of file learning.cc. Referenced by ANNetwork::copy(), and copyFreeNet(). |
|
Copy or conversion from ANNetwork. Implementing this is essential for the use of Terminator early stopping, because transient network states are stored in ANNetwork objects during training.
Reimplemented in ANNetwork. Definition at line 219 of file learning.cc. References copy(). |
|
Initializes the network with the given weight range (use default if negative).
Implemented in ANNetwork. |
|
Creates a network according to the given structure description. The exact interpretation of the description are dependent on the implementor. Implemented in ANNetwork. |
|
Tests an entire pattern set.
Definition at line 121 of file learning.cc. References PatternSource::output(), PatternSource::outputs, PatternSource::patterns, and testPattern(). Referenced by Terminator::validate(). |
|
Makes a classification test with the given test set. If there is just one output unit, it is interpreted to indicate two class memberships. In any other case, each output unit designates different class.
Definition at line 146 of file learning.cc. References ClassifResults::classcnts, ClassifResults::classSizes, ClassifResults::failures, PatternSource::getClass(), ClassifResults::mse, PatternSource::output(), PatternSource::outputs, PatternSource::patterns, and testPattern(). |
|
Tests a specific pattern from a set. Returns a double vector containing the output values.
Reimplemented in ANNetwork. Definition at line 110 of file learning.cc. Referenced by test(), and testClassify(). |
|
Conversion to ANNetwork, a highly object-oriented network representation.
Definition at line 243 of file learning.cc. |
|
Trains the network. Coating for the other train method above; accepts validation set as a parameter.
Definition at line 86 of file learning.cc. |
|
Trains the network. MUST BE OVERLOADED if the ANN system uses any training (not necessary if it doesn't).
Definition at line 64 of file learning.cc. |
|
Trains the network for one cycle. MUST BE OVERLOADED if training is desired. Definition at line 99 of file learning.cc. |