Biorithm  1.1
Public Member Functions | Friends
MyPoint Class Reference
Inheritance diagram for MyPoint:
Point_d< NT >

List of all members.

Public Member Functions

 MyPoint (int dim, const vector< MyNT > &coords, MyInfo *inf)
 MyPoint (int dim, const vector< MyNT > &coords, MyInfo *inf, set< unsigned int > *missing=NULL)
 MyPoint (const _MyPoint &pt, MyPointInfo *inf)
 MyPoint (const MyPoint &copy)
const MyPointoperator= (const MyPoint &rhs)
const MyInfogetInfo () const
MyString getName () const
void setInfo (MyPointInfo *inf)
void setInfo (MyInfo *inf)
string getClassName () const
void setClassName (string name)
bool getChosen () const
bool getHidden () const
MyNT getMaxCoord () const
MyNT getMinCoord () const
MyNT computeNorm (unsigned int p) const
MyNT computeSparsityHoyer () const
 Compute the sparsity of the point, as defined by Hoyer.
int computeDiscreteCorrelation (const MyPoint &other, bool computeSign=false) const
MyNT computePearsonsCorrelation (const MyPoint &other, const MyNT *mean1=NULL, const MyNT *stdDev1=NULL, const MyNT *mean2=NULL, const MyNT *stdDev2=NULL) const
void computeRanks (MyPoint &rankedPoint) const

Friends

class MyPointSet

Member Function Documentation

int MyPoint::computeDiscreteCorrelation ( const MyPoint other,
bool  computeSign = false 
) const

Compute the "discrete" correlation between two points.

Parameters:
[in]other,aninstance of MyPoint to compute the distance to.
[in]computeSign,returnthe sign of the discrete correlation.

We define the discrete correlation between two points as follows: in each point, replace each coordinate by the sign of the coordinate and compute the dot product of the resulting binary vectors.

MyNT MyPoint::computeNorm ( unsigned int  p) const

Compute the L_p norm of the point.

Parameters:
[in]pthe "base" of the norm.
MyNT MyPoint::computePearsonsCorrelation ( const MyPoint other,
const MyNT *  mean1 = NULL,
const MyNT *  stdDev1 = NULL,
const MyNT *  mean2 = NULL,
const MyNT *  stdDev2 = NULL 
) const

Compute the Pearson correlation between two points.

The method computes the Pearson correlation between the invocant and another instance of MyPoint.

Parameters:
MyPointother, the other point to compute the correlation with.
mean1,apointer to the mean of the invocant. If this argument is NULL, the method calculates it.
stdDev1,apointer to the standard deviation of the invocant. If this argument is NULL, the method calculates it.
mean2,apointer to the mean of other. If this argument is NULL, the method calculates it.
stdDev1,apointer to the standard deviation of other. If this argument is NULL, the method calculates it.
Remarks:
If the standard deviation of both points is 0, the method returns a correlation of 1. If the standard deviation of only point is 0, the method returns a correlation of 0.
Warning:
This method takes missing values into account as follows. It ignores a dimension if the dimension is missing in either point. However, it will have to calculate the mean and standard deviation afresh for every invocation, which can be very slow. It is not clear what the best option is.
void MyPoint::computeRanks ( MyPoint rankedPoint) const

Rank the coordinates of the point.

Parameters:
[out]rankedPoint,aninstance of MyPoint that contains the ranks.
Note:
If multiple coordinates have the same value, the method assigns them an average rank.

Compute the sparsity of the point, as defined by Hoyer.

Hoyer defined the sparsity of a vector in terms of the ratio of the L_1 norm of the vector to its L_2 norm. If this value is r and d is the dimensionality of the vector, the Hoyer defined the vector's sparsity as {{d} - r}{{d} - 1}. Read "Non-negative Matrix Factorization with Sparseness Constraints" (http://www.jmlr.org/papers/volume5/hoyer04a/hoyer04a.pdf) for all the gory details.

MyNT MyPoint::getMaxCoord ( ) const [inline]

Return the maximum coordinate, ignoring missing dimensions.

Warning:
If all dimensions are missing, the method returns 0.
MyNT MyPoint::getMinCoord ( ) const [inline]

Return the minimum coordinate, ignoring missing dimensions.

Warning:
If all dimensions are missing, the method returns 0.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends