The type hierarchy is implemented in "src/types.jl".
AbstractLoss: is the base abstract type for all loss functions:
SemLoss{O <: SemObserved, I <: SemImplied}: is the subtype ofAbstractLoss, which is the base for all SEM-specific loss functions (SemML,SemWLSetc) that evaluate how closely the implied covariation structure (represented by the object of typeI) matches the observed one (contained in the object of typeO);- regularizing terms (e.g.
SemRidge) are implemented as subtypes ofAbstractLoss.
AbstractSem is the base abstract type for all SEM models. It has two concrete subtypes:
Sem{L <: Tuple} <: AbstractSem: the main SEM model type that implements a list of weighted loss terms (usingLossTermwrapper aroundAbstractLoss) and allows modeling both single and multi-group SEMs and combining them with regularization terms.SemFiniteDiff{S <: AbstractSem} <: AbstractSem: a wrapper around anyAbstractSemthat substitutes dedicated gradient/hessian evaluation with finite difference approximation.