StarVine
starvine.mvar.mvd.Mvd Class Reference

Multi-variate data class. More...

Inheritance diagram for starvine.mvar.mvd.Mvd:

Public Member Functions

def __init__ (self, mvdData=pd.DataFrame(), mvdWeights=pd.DataFrame())
 
def setData (self, dataDict, weights=None)
 Collect data from dictionary with {str: np_1darray} {key, value} pairs into a pandas dataFrame.
 
def plot (self, kwargs)
 generate pairwise scatter plots
 
def setUVD (self, uvdList)
 Collect uni-variate data sets into a multivariate data object. More...
 
def computeKDEpdf (self, bandwidth=None)
 Computes mulitvariate kernel density function. More...
 
def computeCov (self, weighted=False)
 computes cov matrix More...
 
def computePC (self)
 Computes principal components of multivariate data set. More...
 
def computePCOP (self, retainFracVar=0.95, reducedDim=None)
 Computes a projection matrix. More...
 
def applyPCA (self)
 Provides a reduced order view of the current MVD object. More...
 
def plotExplainedVar (self)
 Plots fractional explained varience as a function of number of principal components retained.
 

Public Attributes

 uvdPool
 
 mvdData
 
 mvdDataWeights
 
 nDims
 
 mvdKDEpdf
 
 mvdCov
 
 eig_pairs
 
 frac_explained_var
 
 cum_frac_explained_var
 
 pcW
 

Detailed Description

Multi-variate data class.

Performs principal component analysis to reduce the dimensionality of a large data set.

Member Function Documentation

§ applyPCA()

def starvine.mvar.mvd.Mvd.applyPCA (   self)

Provides a reduced order view of the current MVD object.

Returns
(Mvd object, eigenValues_cov, eigenVectors_cov, W) Where W is the transformation matrix.

§ computeCov()

def starvine.mvar.mvd.Mvd.computeCov (   self,
  weighted = False 
)

computes cov matrix

Parameters
weightedbool if True, utilizes mvdDataWeights (vols or areas) as frequency weights, essentially counting samples which represent more "area" or "volume" in the domain more times. True by default.

§ computeKDEpdf()

def starvine.mvar.mvd.Mvd.computeKDEpdf (   self,
  bandwidth = None 
)

Computes mulitvariate kernel density function.

A kernel density function is constructed by combining many locally supported "mini PDFs". This is a data smoothing operation.

Parameters
<b>float</b>(optional) bandwidth. Default is to use the "scott" factor: $n^{\frac{-1}{d+4}}$

§ computePC()

def starvine.mvar.mvd.Mvd.computePC (   self)

Computes principal components of multivariate data set.

Provides a measure of explained varience per principal component, the principal compenent directions and magnitudes.

Returns
list [eigen_pairs, frac explained variance, cummulative_explained_var]

§ computePCOP()

def starvine.mvar.mvd.Mvd.computePCOP (   self,
  retainFracVar = 0.95,
  reducedDim = None 
)

Computes a projection matrix.

Maps from the original data space to a reduced param space.

Parameters
retainFracVardouble Desired fraction of explained varience to retain
reducedDimint Target reduced data dimension
Returns
np_ndarray PC projection matrix

§ setUVD()

def starvine.mvar.mvd.Mvd.setUVD (   self,
  uvdList 
)

Collect uni-variate data sets into a multivariate data object.

Parameters
uvdListlist of uvar.Uvd instances

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