Description Public fields Methods
R implementation for LiNGAM models This class is a base class for LiNGAM.
This code is based on Python implementation:
(The LiNGAM Project: https://sites.google.com/site/sshimizu06/lingam)
random_state(integer) Random seed
causal_order(numeric vector) Causal oreder of variables
adjacency_matrix(numeric matrix) Estimated adjacency matrix
intercept(numeric vector) Estimated intercept term
lasso_engine(character) "lars" or "glmnet"
new()create lingam object
BaseLiNGAM$new(random_state = NULL, lasso_engine = "glmnet")
random_state(integer) Random seed
lasso_engine(character) "lars" or "glmnet"
fit()subclasses should implement this method
BaseLiNGAM$fit(X)
X(numeric matrix or data.frame) data matrix
estimate_adjacency_matrix()estimate adjacency matrix based on causal order
BaseLiNGAM$estimate_adjacency_matrix(X)
X(numeric matrix or data.frame) data matrix
predict_adaptive_lasso()fit adaptice lasso
BaseLiNGAM$predict_adaptive_lasso(X, predictors, target, gamma = 1)
X(numeric matrix or data.frame) data matrix
predictors(numeric vector) index of explanatory variables
target(integer) index of target variable
gamma(numeric) data x will be weighted like x^(gamma) for adaptive lasso
coef_ (numeric vector) estimated coefficients
clone()The objects of this class are cloneable with this method.
BaseLiNGAM$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.