CEBL  2.1
Public Member Functions
CEBL::MNF Class Reference

#include <MNF.hpp>

Public Member Functions

 MNF ()
void make (const ublas::matrix< double > &data, const std::vector< int > &components)
ublas::matrix< double > apply (const ublas::matrix< double > &data) const
ublas::matrix< double > extract (const ublas::matrix< double > &data)
ublas::matrix< double > getFilterMatrix ()
map< string, SerializedObjectsave () const
 save plugin to list, and return it
void load (map< string, SerializedObject > objects)
 load plugin from list of objects
- Public Member Functions inherited from CEBL::Filter
 Filter ()
virtual ~Filter ()
bool isTrained ()
- Public Member Functions inherited from CEBL::Plugin
 Plugin ()
virtual ~Plugin ()
void halt ()
 tell classifier to halt
string getName () const
 get the name of the plugin
virtual std::map< std::string,
CEBL::Param
getParamsList ()
 get the parameter list
virtual void setParamsList (std::map< std::string, CEBL::Param > &)
 set the parameter list

Additional Inherited Members

- Protected Attributes inherited from CEBL::Filter
bool created
- Protected Attributes inherited from CEBL::Plugin
string plugin_name
bool should_halt

Detailed Description

Definition at line 32 of file MNF.hpp.


Constructor & Destructor Documentation

CEBL::MNF::MNF ( )
inline

Definition at line 45 of file MNF.hpp.

References CEBL::Plugin::plugin_name.


Member Function Documentation

ublas::matrix< double > CEBL::MNF::apply ( const ublas::matrix< double > &  data) const
virtual

Apply filter matrix to new data and return filtered result.

 TODO: make a version which modifies input in-place
 \param data data to filter

 \return filtered result matrix, same size as data

Implements CEBL::Filter.

Definition at line 120 of file MNF.cpp.

References cppR::createMatrix(), filter(), cppR::ncol(), and cppR::rep().

ublas::matrix< double > CEBL::MNF::extract ( const ublas::matrix< double > &  data)
virtual

Extract components from sample data for manual or automatic artifact identification.

Parameters:
datasample data nFeatures X nSamples
Returns:
matrix of components

Implements CEBL::Filter.

Definition at line 131 of file MNF.cpp.

ublas::matrix<double> CEBL::MNF::getFilterMatrix ( )
inlinevirtual

Returns the internal filter matrix created in the make function.

 \return 

Implements CEBL::Filter.

Definition at line 77 of file MNF.hpp.

void CEBL::MNF::load ( map< string, SerializedObject objects)
virtual

load plugin from list of objects

Reimplemented from CEBL::Plugin.

Definition at line 151 of file MNF.cpp.

References CEBL::deserialize(), and filter().

void CEBL::MNF::make ( const ublas::matrix< double > &  data,
const std::vector< int > &  components 
)
virtual

Using a matrix of sample data and vector of components to remove, create the internal filter matrix which will be used by the apply function to remove components from new data.

Parameters:
datasample data nFeatures X nSamples
componentsvector of component indices

Implements CEBL::Filter.

Definition at line 87 of file MNF.cpp.

References cppR::createMatrix(), cppR::diag(), filter(), cppR::ncol(), cppR::nrow(), cppR::rep(), cppR::rowMeans(), and cppR::solve().

map< string, SerializedObject > CEBL::MNF::save ( ) const
virtual

save plugin to list, and return it

Reimplemented from CEBL::Plugin.

Definition at line 140 of file MNF.cpp.

References filter(), and CEBL::serialize().


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