Title: | Learning Graphs for Financial Markets |
---|---|
Description: | Learning graphs for financial markets with optimization algorithms. This package contains implementations of the algorithms described in the paper: Cardoso JVM, Ying J, and Palomar DP (2021) <https://papers.nips.cc/paper/2021/hash/a64a034c3cb8eac64eb46ea474902797-Abstract.html> "Learning graphs in heavy-tailed markets", Advances in Neural Informations Processing Systems (NeurIPS). |
Authors: | Ze Vinicius [cre, aut] |
Maintainer: | Ze Vinicius <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-03-01 02:49:23 UTC |
Source: | https://github.com/cranhaven/cranhaven.r-universe.dev |
Laplacian matrix of a connected graph with Gaussian data
Computes the Laplacian matrix of a graph on the basis of an observed data matrix, where we assume the data to be Gaussian distributed.
learn_connected_graph( S, w0 = "naive", d = 1, rho = 1, maxiter = 10000, reltol = 1e-05, verbose = TRUE )
learn_connected_graph( S, w0 = "naive", d = 1, rho = 1, maxiter = 10000, reltol = 1e-05, verbose = TRUE )
S |
a p x p covariance matrix, where p is the number of nodes in the graph |
w0 |
initial vector of graph weights. Either a vector of length p(p-1)/2 or a string indicating the method to compute an initial value. |
d |
the nodes' degrees. Either a vector or a single value. |
rho |
constraint relaxation hyperparameter. |
maxiter |
maximum number of iterations. |
reltol |
relative tolerance as a convergence criteria. |
verbose |
whether or not to show a progress bar during the iterations. |
A list containing possibly the following elements:
laplacian |
estimated Laplacian matrix |
adjacency |
estimated adjacency matrix |
theta |
estimated Laplacian matrix slack variable |
maxiter |
number of iterations taken to reach convergence |
convergence |
boolean flag to indicate whether or not the optimization converged |
Laplacian matrix of a k-component graph with heavy-tailed data
Computes the Laplacian matrix of a graph on the basis of an observed data matrix, where we assume the data to be Student-t distributed.
learn_kcomp_heavytail_graph( X, k = 1, heavy_type = "gaussian", nu = NULL, w0 = "naive", d = 1, beta = 1e-08, update_beta = TRUE, early_stopping = FALSE, rho = 1, update_rho = FALSE, maxiter = 10000, reltol = 1e-05, verbose = TRUE, record_objective = FALSE )
learn_kcomp_heavytail_graph( X, k = 1, heavy_type = "gaussian", nu = NULL, w0 = "naive", d = 1, beta = 1e-08, update_beta = TRUE, early_stopping = FALSE, rho = 1, update_rho = FALSE, maxiter = 10000, reltol = 1e-05, verbose = TRUE, record_objective = FALSE )
X |
an n x p data matrix, where n is the number of observations and p is the number of nodes in the graph. |
k |
the number of components of the graph. |
heavy_type |
a string which selects the statistical distribution of the data . Valid values are "gaussian" or "student". |
nu |
the degrees of freedom of the Student-t distribution. Must be a real number greater than 2. |
w0 |
initial vector of graph weights. Either a vector of length p(p-1)/2 or a string indicating the method to compute an initial value. |
d |
the nodes' degrees. Either a vector or a single value. |
beta |
hyperparameter that controls the regularization to obtain a k-component graph |
update_beta |
whether to update beta during the optimization. |
early_stopping |
whether to stop the iterations as soon as the rank constraint is satisfied. |
rho |
constraint relaxation hyperparameter. |
update_rho |
whether or not to update rho during the optimization. |
maxiter |
maximum number of iterations. |
reltol |
relative tolerance as a convergence criteria. |
verbose |
whether to show a progress bar during the iterations. |
record_objective |
whether to record the objective function per iteration. |
A list containing possibly the following elements:
laplacian |
estimated Laplacian matrix |
adjacency |
estimated adjacency matrix |
theta |
estimated Laplacian matrix slack variable |
maxiter |
number of iterations taken to reach convergence |
convergence |
boolean flag to indicate whether or not the optimization conv erged |
beta_seq |
sequence of values taken by the hyperparameter beta until convergence |
primal_lap_residual |
primal residual for the Laplacian matrix per iteratio n |
primal_deg_residual |
primal residual for the degree vector per iteration |
dual_residual |
dual residual per iteration |
lagrangian |
Lagrangian value per iteration |
elapsed_time |
Time taken to reach convergence |
Laplacian matrix of a connected graph with heavy-tailed data
Computes the Laplacian matrix of a graph on the basis of an observed data matrix, where we assume the data to be Student-t distributed.
learn_regular_heavytail_graph( X, heavy_type = "gaussian", nu = NULL, w0 = "naive", d = 1, rho = 1, update_rho = TRUE, maxiter = 10000, reltol = 1e-05, verbose = TRUE )
learn_regular_heavytail_graph( X, heavy_type = "gaussian", nu = NULL, w0 = "naive", d = 1, rho = 1, update_rho = TRUE, maxiter = 10000, reltol = 1e-05, verbose = TRUE )
X |
an n x p data matrix, where n is the number of observations and p is the number of nodes in the graph |
heavy_type |
a string which selects the statistical distribution of the data. Valid values are "gaussian" or "student". |
nu |
the degrees of freedom of the Student-t distribution. Must be a real number greater than 2. |
w0 |
initial vector of graph weights. Either a vector of length p(p-1)/2 or a string indicating the method to compute an initial value. |
d |
the nodes' degrees. Either a vector or a single value. |
rho |
constraint relaxation hyperparameter. |
update_rho |
whether or not to update rho during the optimization. |
maxiter |
maximum number of iterations. |
reltol |
relative tolerance as a convergence criteria. |
verbose |
whether or not to show a progress bar during the iterations. |
A list containing possibly the following elements:
laplacian |
estimated Laplacian matrix |
adjacency |
estimated adjacency matrix |
theta |
estimated Laplacian matrix slack variable |
maxiter |
number of iterations taken to reach convergence |
convergence |
boolean flag to indicate whether or not the optimization conv erged |
primal_lap_residual |
primal residual for the Laplacian matrix per iteration |
primal_deg_residual |
primal residual for the degree vector per iteration |
dual_residual |
dual residual per iteration |
lagrangian |
Lagrangian value per iteration |
elapsed_time |
Time taken to reach convergence |