SingleChannelSurprise is a Surprise extension to SingleChannel. More...
#include <Surprise/SingleChannelSurprise.H>
Public Member Functions | |
SingleChannelSurprise (OptionManager &mgr) | |
Constructor. | |
virtual | ~SingleChannelSurprise () |
destructor | |
Image< float > | getSurpriseMap (const uint index, const Image< float > &submap) |
get a surprise map | |
virtual Image< float > | compute (const SingleChannel &chan, const uint i) |
Compute the i'th submap for the given channel. | |
Protected Member Functions | |
virtual void | start1 () |
This is called from within start() before the subcomponents start. | |
Protected Attributes | |
OModelParam< uint > | itsSQlen |
number of surprise maps | |
OModelParam< double > | itsUpdateFac |
update factor | |
OModelParam< double > | itsNeighUpdateFac |
update factor for neighbors | |
NModelParam< double > | itsInitialVal |
Initial values. | |
NModelParam< double > | itsInitialVar |
Initial variance. | |
NModelParam< double > | itsBgVal |
Background values. | |
OModelParam< float > | itsNeighSigma |
Neighborhood sigma. | |
OModelParam< float > | itsLocSigma |
Local neighborhood sigma. | |
OModelParam< bool > | itsTakeSTMax |
Use Max for space-time. | |
OModelParam< bool > | itsLogged |
Do we dump data to a log file. | |
OModelParam< LevelSpec > | itsLevelSpec |
our levelspec | |
OModelParam< Point2D< int > > | itsProbe |
location of a virtusl electrode | |
OModelParam< double > | itsSLfac |
fact for local temporal surprise | |
OModelParam< double > | itsSSfac |
factor for spatial surprise | |
OModelParam< std::string > | itsJointKLBiasTypeStr |
SingleChannelSurprise is a Surprise extension to SingleChannel.
This class only provides the computation of surprise. Typically you would first build a SingleChannel (or derivative), then build a SingleChannelSurprise, then pass the SingleChannelSurprise to the channel's setSubmapAlgorithm(). See VisualCortexSurprise for example usage.
Definition at line 55 of file SingleChannelSurprise.H.
SingleChannelSurprise< SMODEL >::SingleChannelSurprise | ( | OptionManager & | mgr | ) | [inline] |
Constructor.
Definition at line 58 of file SingleChannelSurprise.C.
References rutz::demangled_name(), ModelComponent::setDescriptiveName(), and ModelComponent::setTagName().
SingleChannelSurprise< SMODEL >::~SingleChannelSurprise | ( | ) | [inline, virtual] |
destructor
Definition at line 85 of file SingleChannelSurprise.C.
Image< float > SingleChannelSurprise< SMODEL >::compute | ( | const SingleChannel & | chan, | |
const uint | i | |||
) | [inline, virtual] |
Compute the i'th submap for the given channel.
Implements SubmapAlgorithm.
Definition at line 132 of file SingleChannelSurprise.C.
References SingleChannel::getRawCSmap(), SingleChannelSurprise< SMODEL >::getSurpriseMap(), and SingleChannel::postProcessMap().
Image< float > SingleChannelSurprise< SMODEL >::getSurpriseMap | ( | const uint | index, | |
const Image< float > & | submap | |||
) | [inline] |
get a surprise map
Pass a submap index and a submap, and you'll get back the associated surprise
Definition at line 113 of file SingleChannelSurprise.C.
References Image< T >::getDims(), OModelParam< T >::getVal(), NModelParam< T >::getVal(), SingleChannelSurprise< SMODEL >::itsBgVal, SingleChannelSurprise< SMODEL >::itsInitialVar, SingleChannelSurprise< SMODEL >::itsUpdateFac, and NO_INIT.
Referenced by SingleChannelSurprise< SMODEL >::compute().
void SingleChannelSurprise< SMODEL >::start1 | ( | ) | [inline, protected, virtual] |
This is called from within start() before the subcomponents start.
Reimplemented from ModelComponent.
Definition at line 90 of file SingleChannelSurprise.C.
References OModelParam< T >::getVal(), NModelParam< T >::getVal(), SurpriseMap< T >::init(), SingleChannelSurprise< SMODEL >::itsBgVal, SingleChannelSurprise< SMODEL >::itsInitialVal, SingleChannelSurprise< SMODEL >::itsInitialVar, SingleChannelSurprise< SMODEL >::itsLevelSpec, SingleChannelSurprise< SMODEL >::itsLocSigma, SingleChannelSurprise< SMODEL >::itsNeighSigma, SingleChannelSurprise< SMODEL >::itsNeighUpdateFac, SingleChannelSurprise< SMODEL >::itsProbe, SingleChannelSurprise< SMODEL >::itsSLfac, SingleChannelSurprise< SMODEL >::itsSQlen, SingleChannelSurprise< SMODEL >::itsSSfac, SingleChannelSurprise< SMODEL >::itsTakeSTMax, SingleChannelSurprise< SMODEL >::itsUpdateFac, and LevelSpec::maxIndex().
NModelParam<double> SingleChannelSurprise< SMODEL >::itsBgVal [protected] |
Background values.
Definition at line 79 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::getSurpriseMap(), and SingleChannelSurprise< SMODEL >::start1().
NModelParam<double> SingleChannelSurprise< SMODEL >::itsInitialVal [protected] |
Initial values.
Definition at line 77 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
NModelParam<double> SingleChannelSurprise< SMODEL >::itsInitialVar [protected] |
Initial variance.
Definition at line 78 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::getSurpriseMap(), and SingleChannelSurprise< SMODEL >::start1().
OModelParam<LevelSpec> SingleChannelSurprise< SMODEL >::itsLevelSpec [protected] |
our levelspec
Definition at line 84 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<float> SingleChannelSurprise< SMODEL >::itsLocSigma [protected] |
Local neighborhood sigma.
Definition at line 81 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<bool> SingleChannelSurprise< SMODEL >::itsLogged [protected] |
Do we dump data to a log file.
Definition at line 83 of file SingleChannelSurprise.H.
OModelParam<float> SingleChannelSurprise< SMODEL >::itsNeighSigma [protected] |
Neighborhood sigma.
Definition at line 80 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<double> SingleChannelSurprise< SMODEL >::itsNeighUpdateFac [protected] |
update factor for neighbors
Definition at line 76 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<Point2D<int> > SingleChannelSurprise< SMODEL >::itsProbe [protected] |
location of a virtusl electrode
Definition at line 85 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<double> SingleChannelSurprise< SMODEL >::itsSLfac [protected] |
fact for local temporal surprise
Definition at line 86 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<uint> SingleChannelSurprise< SMODEL >::itsSQlen [protected] |
number of surprise maps
Definition at line 74 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<double> SingleChannelSurprise< SMODEL >::itsSSfac [protected] |
factor for spatial surprise
Definition at line 87 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<bool> SingleChannelSurprise< SMODEL >::itsTakeSTMax [protected] |
Use Max for space-time.
Definition at line 82 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::start1().
OModelParam<double> SingleChannelSurprise< SMODEL >::itsUpdateFac [protected] |
update factor
Definition at line 75 of file SingleChannelSurprise.H.
Referenced by SingleChannelSurprise< SMODEL >::getSurpriseMap(), and SingleChannelSurprise< SMODEL >::start1().