GAMCR.dataset.datagam module#
- class GAMCR.dataset.datagam.DataGAM(L, n_splines=10, lam=10)[source]#
Bases:
objectA class connecting the PyGAM package to GAMCR.
…
- L#
number of basis functions on which the transfer function is decomposed - it is also equal to the number of GAMs considered in our model
- Type:
- lam#
regularization parameter related to the smoothing penalty in the GAM
- Type:
positive float
- init_gam_from_knots(edge_knots, m_features, coeffs=None)[source]#
Initizialize the L GAMs using the knots provided as input
- init_gam_from_design(X)[source]#
Initizialize the L GAMs using the design matrix X to set the knots
- Parameters:
- X array
Design matrix of the GAM compute from the method ‘get_design’. X has dimension: number of timepoints x number of features.
- init_gam_from_knots(edge_knots, m_features, coeffs=None)[source]#
Initizialize the L GAMs using the knots provided as input
- Parameters:
- edge_knots array
Knots to use for all GAMs
- m_features int
Total number of features
- coeffs array, optional
If not None, the coefficients of the L GAMs are set using the coefficients provided in coeffs. coeffs should be of dimension: L x (number of columns of the matrix returned by the ‘_modelmat’ method)