ESP  0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
LogEnergy Class Reference
Inheritance diagram for LogEnergy:
GRT::Filter

Public Member Functions

 LogEnergy (UINT filterSize=5, UINT numDimensions=1)
 
double computeFilter (const VectorDouble &buf)
 
- Public Member Functions inherited from GRT::Filter
 Filter (const char *classType, UINT filterSize=5, UINT numDimensions=1)
 
 Filter (const Filter &rhs)
 
virtual ~Filter ()
 
Filteroperator= (const Filter &rhs)
 
virtual bool deepCopyFrom (const PreProcessing *preProcessing)
 
virtual bool process (const VectorDouble &inputVector)
 
virtual bool reset ()
 
virtual bool saveModelToFile (string filename) const
 
virtual bool saveModelToFile (fstream &file) const
 
virtual bool loadModelFromFile (string filename)
 
virtual bool loadModelFromFile (fstream &file)
 
bool init (UINT filterSize, UINT numDimensions)
 
double filter (const double x)
 
VectorDouble filter (const VectorDouble &x)
 
UINT getFilterSize () const
 
VectorDouble getFilteredData () const
 
vector< VectorDouble > getDataBuffer () const
 

Additional Inherited Members

- Protected Attributes inherited from GRT::Filter
UINT filterSize
 The size of the filter. More...
 
UINT inputSampleCounter
 A counter to keep track of the number of input samples. More...
 
CircularBuffer< VectorDouble > dataBuffer
 A buffer to store the previous N values, N = filterSize. More...
 

Constructor & Destructor Documentation

LogEnergy::LogEnergy ( UINT  filterSize = 5,
UINT  numDimensions = 1 
)
inline

Member Function Documentation

double LogEnergy::computeFilter ( const VectorDouble &  buf)
inlinevirtual

Compute the filter. This is implemented by the derived class and called separately on each dimension of the input data.

Parameters
constVectorDouble buf: the values to filter, i.e. the last filterSize (or fewer) values read within a particular dimension
Returns
the filtered value

Implements GRT::Filter.


The documentation for this class was generated from the following file: