STK++ 0.9.13
|
A ILinearReduct is an interface base class for reduction method using linear reduction. More...
#include <STK_ILinearReduct.h>
Public Types | |
typedef IReducer< Array, Weights > | Base |
Public Member Functions | |
ILinearReduct () | |
Default Constructor. | |
ILinearReduct (Array const *p_data) | |
Constructor. | |
ILinearReduct (Array const &data) | |
Constructor. | |
ILinearReduct (ILinearReduct const &reducer) | |
copy Constructor. | |
virtual | ~ILinearReduct () |
virtual destructor | |
VectorX const & | criteriaValues () const |
Array const & | axis () const |
virtual bool | run () |
Compute the projection matrix axis_ by maximizing the criteria and project the data set in order to obtain p_projected_ . | |
virtual bool | run (Weights const &weights) |
Compute the projection matrix set by maximizing the weighted criteria and project the data set in order to obtain p_projected_ . | |
![]() | |
virtual | ~IReducer () |
virtual destructor. | |
int | dim () const |
get the number of dimension. | |
Array * | p_reduced () const |
get a pointer on the reduced data set | |
void | setDimension (const int &dim) |
set the number of dimension. | |
void | clear () |
clear allocated memory | |
![]() | |
Array const * | p_data () const |
get the data set | |
virtual void | setData (Array const *p_data) |
Set the data set. | |
virtual void | setData (Array const &data) |
Set the data set. | |
![]() | |
String const & | error () const |
get the last error message. | |
Public Attributes | |
Array * | p_reduced_ |
The reduced data set. | |
Protected Attributes | |
VectorX | idx_values_ |
The values of the index for each axis. | |
Array | axis_ |
The computed axis. | |
![]() | |
int | dim_ |
dimension of the reduced data set | |
Array * | p_reduced_ |
The reduced data set. | |
![]() | |
Array const * | p_data_ |
A pointer on the original data set. | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
Private Member Functions | |
virtual void | maximizeStep ()=0 |
Find the axis by maximizing the Index. | |
virtual void | maximizeStep (Weights const &weights)=0 |
Find the axis by maximizing the weighted Index. | |
void | projectionStep () |
Compute the projection of the data set on the Axis. | |
Additional Inherited Members | |
![]() | |
typedef IRunnerUnsupervised< Array, Weights > | Runner |
![]() | |
IReducer () | |
Default constructor. | |
IReducer (Array const *p_data) | |
Constructor with a pointer on the constant data set. | |
IReducer (Array const &data) | |
Constructor with a constant reference on the data set. | |
IReducer (IReducer const &reducer) | |
Copy constructor. | |
![]() | |
IRunnerUnsupervised () | |
default constructor. | |
IRunnerUnsupervised (Array const *const p_data) | |
constructor with a pointer on the constant data set | |
IRunnerUnsupervised (Array const &data) | |
constructor with a constant reference on the data set | |
IRunnerUnsupervised (IRunnerUnsupervised const &runner) | |
copy constructor | |
~IRunnerUnsupervised () | |
destructor | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
A ILinearReduct is an interface base class for reduction method using linear reduction.
In order to find the linear reduction, the derived classes maximize an index.
The class computes the optimal axis (stored in the axis_
) attribute and the projected
data set (stored in the p_reduct_
attribute of the base class IReducer) when user uses the virtual method run()
(for not weighted observations) or run(weights)
(for weighted observations).
The Array axis_ is computed by maximizing some criteria defined in derived classes. It is constructed using the pure virtual functions:
Definition at line 63 of file STK_ILinearReduct.h.
typedef IReducer<Array, Weights> STK::ILinearReduct< Array, Weights >::Base |
Definition at line 66 of file STK_ILinearReduct.h.
STK::ILinearReduct< Array, Weights >::ILinearReduct | ( | ) |
STK::ILinearReduct< Array, Weights >::ILinearReduct | ( | Array const * | p_data | ) |
Constructor.
p_data | a pointer on the constant data set to reduce. |
Definition at line 128 of file STK_ILinearReduct.h.
STK::ILinearReduct< Array, Weights >::ILinearReduct | ( | Array const & | data | ) |
Constructor.
data | a constant reference on the data set to reduce. |
Definition at line 134 of file STK_ILinearReduct.h.
STK::ILinearReduct< Array, Weights >::ILinearReduct | ( | ILinearReduct< Array, Weights > const & | reducer | ) |
copy Constructor.
reducer | the reducer to copy. |
Definition at line 139 of file STK_ILinearReduct.h.
|
virtual |
|
inline |
Definition at line 88 of file STK_ILinearReduct.h.
References STK::ILinearReduct< Array, Weights >::axis_.
|
inline |
Definition at line 86 of file STK_ILinearReduct.h.
References STK::ILinearReduct< Array, Weights >::idx_values_.
|
privatepure virtual |
Find the axis by maximizing the Index.
Implemented in STK::LocalVariance< Array >, and STK::ProjectedVariance< Array >.
|
privatepure virtual |
Find the axis by maximizing the weighted Index.
weights | the weights to used |
Implemented in STK::LocalVariance< Array >, and STK::ProjectedVariance< Array >.
|
private |
Compute the projection of the data set on the Axis.
Definition at line 202 of file STK_ILinearReduct.h.
Compute the projection matrix axis_
by maximizing the criteria and project the data set in order to obtain p_projected_
.
Implements STK::IRunnerUnsupervised< Array, Weights >.
Definition at line 152 of file STK_ILinearReduct.h.
References STK::Exception::error(), STK::IRunnerBase::msg_error_, and STKERROR_NO_ARG.
|
virtual |
Compute the projection matrix set by maximizing the weighted criteria and project the data set in order to obtain p_projected_
.
weights | the weights to used in the index. |
Implements STK::IRunnerUnsupervised< Array, Weights >.
Definition at line 179 of file STK_ILinearReduct.h.
References STK::Exception::error(), STK::IRunnerBase::msg_error_, and STKERROR_NO_ARG.
|
protected |
The computed axis.
Definition at line 103 of file STK_ILinearReduct.h.
Referenced by STK::ILinearReduct< Array, Weights >::axis().
|
protected |
The values of the index for each axis.
Definition at line 101 of file STK_ILinearReduct.h.
Referenced by STK::ILinearReduct< Array, Weights >::criteriaValues().
Array* STK::IReducer< Array, Weights >::p_reduced_ |
The reduced data set.
Definition at line 101 of file STK_IReducer.h.