![]() |
StarVine
|
A C-tree is a tree with a single root node. More...
Public Member Functions | |
| def | __init__ (self, data, lvl=None, kwargs) |
| A single tree within vine. More... | |
| def | seqCopulaFit (self) |
| Iterate through all edges in tree, fit copula models at each edge. More... | |
| def | treeNLLH (self, treeCopulaParams=None) |
| Compute this tree's negative log likelyhood. More... | |
| def | evalH (self) |
| Define nodes of the T+1 level tree. More... | |
Public Member Functions inherited from starvine.vine.tree.Vtree | |
| def | __init__ (self, data, lvl, parentTree=None, kwargs) |
| A generic tree within vine. More... | |
| def | addNode (self, dataLabel, data) |
| Add a node to the tree. More... | |
| def | buildNodes (self) |
| Assign each data column to a networkx node. | |
| def | setEdges (self, nodePairs=None) |
| Sets the node to node connections in the tree. More... | |
| def | lowerTree (self, lowerTree=None) |
| Gets lower tree. More... | |
| def | lowerTree (self, lTree) |
| Sets lower tree. | |
| def | upperTree (self, upperTree=None) |
| Gets upper tree. More... | |
| def | upperTree (self, uTree) |
| Sets upper tree. | |
Public Attributes | |
| rootNodeID | |
| VV is OK UU is wrong! | |
| treeCopulaParams | |
Public Attributes inherited from starvine.vine.tree.Vtree | |
| data | |
| nT | |
| level | |
| tree | |
Private Member Functions | |
| def | _optimNodePairs (self) |
| Selects the node-pairings which maximizes the sum over all edge weights provided the constraint of a C-tree stucture. More... | |
| def | _evalH (self) |
Computes data set at each node for use in the next level tree. More... | |
| def | _getEdgeCopulaParams (self, u, v) |
| Get copula paramters of particular edge in tree. More... | |
| def | _initTreeParamMap (self) |
| Pack all copula paramters in the tree into a 1d numpy array for simulatneous MLE optimization. More... | |
A C-tree is a tree with a single root node.
Each level of a cononical vine is a C-tree.
| def starvine.vine.C_vine.Ctree.__init__ | ( | self, | |
| data, | |||
lvl = None, |
|||
| kwargs | |||
| ) |
A single tree within vine.
| data | DataFrame multivariate data set. Each data column will be assigned to a node. |
| lvl | int: tree level in the vine |
| weights | DataFrame: (optional) data weights |
| labels | list of str or ints: (optional) data labels |
|
private |
Computes
data set at each node for use in the next level tree.
|
private |
Get copula paramters of particular edge in tree.
|
private |
Pack all copula paramters in the tree into a 1d numpy array for simulatneous MLE optimization.
Sets the tree copula paramters.
|
private |
Selects the node-pairings which maximizes the sum over all edge weights provided the constraint of a C-tree stucture.
It is feasible to try all C-tree configuations since if we have nT variables in the top level tree the number of unique C-trees is == nT.
| def starvine.vine.C_vine.Ctree.evalH | ( | self | ) |
Define nodes of the T+1 level tree.
Use the conditional distribution (h()) to obtain marginal distributions at the next tree level.
| def starvine.vine.C_vine.Ctree.seqCopulaFit | ( | self | ) |
Iterate through all edges in tree, fit copula models at each edge.
This is a sequential fitting operation.
See simultaneousCopulaFit() for a tree-wide simulltaneous parameter estimation.
| def starvine.vine.C_vine.Ctree.treeNLLH | ( | self, | |
treeCopulaParams = None |
|||
| ) |
Compute this tree's negative log likelyhood.
For C-trees this is just the sum of copula-log-likeyhoods over all node-pairs.
| treeCopulaParams | np_1darray Copula parameter array. Contains parameters for all PCC in the tree. |
| paramMap | Maps edges to parameter len and location in treeCopulaParams {[u, v]: (start, Params_len_0), [u, v]: (start, Params_len), ...} |