BaseLiNGAM: LiNGAM class

Description Public fields Methods

Description

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)

Public fields

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"

Methods

Public methods


Method new()

create lingam object

Usage
BaseLiNGAM$new(random_state = NULL, lasso_engine = "glmnet")
Arguments
random_state

(integer) Random seed

lasso_engine

(character) "lars" or "glmnet"


Method fit()

subclasses should implement this method

Usage
BaseLiNGAM$fit(X)
Arguments
X

(numeric matrix or data.frame) data matrix


Method estimate_adjacency_matrix()

estimate adjacency matrix based on causal order

Usage
BaseLiNGAM$estimate_adjacency_matrix(X)
Arguments
X

(numeric matrix or data.frame) data matrix


Method predict_adaptive_lasso()

fit adaptice lasso

Usage
BaseLiNGAM$predict_adaptive_lasso(X, predictors, target, gamma = 1)
Arguments
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

Returns

coef_ (numeric vector) estimated coefficients


Method clone()

The objects of this class are cloneable with this method.

Usage
BaseLiNGAM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


gkikuchi/rlingam documentation built on Jan. 7, 2022, 11:10 p.m.