Class Lofs
Implements a number of methods which take a fixed graph as input and use linear, non-Gaussian methods to orient the edges in the graph. where the acronym stands for linear, non-Gaussian Orientation with a Fixed graph Structure (LOFS). The options for different types of scores are given in the enum Lofs.Score. The options for rules to use to do the orientations are given in the enum, Lofs.Rule. Most of these are taken from the literature and can be googled, though we should certainly give this reference for several of them, to which we are indebted:
Hyvärinen, A., & Smith, S. M. (2013). Pairwise likelihood ratios for estimation of non-Gaussian structural equation models. The Journal of Machine Learning Research, 14(1), 111-152.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Author:
- josephramsey
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Give a list of options for rules for doing the non-Gaussian orientations.static enum
Gives a list of options for non-Gaussian transformations that can be used for some scores. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getPValue
(double fisherZ) double
kernel
(double z) double
kernel1
(double z) double
kernel2
(double z) double
kernel3
(double z) double
kernel4
(double z) double
kernel5
(double z) double
kernel6
(double z) double
kernel7
(double z) double
kernel8
(double z) orient()
Orients the graph and returns the oriented graph.double
void
setAlpha
(double alpha) Sets the alpha to use, where applicable.void
setEpsilon
(double epsilon) void
setKnowledge
(Knowledge knowledge) void
setOrientStrongerDirection
(boolean orientStrongerDirection) Sets whether orientation should be done in the stronger direction, where applicable.void
setR2Orient2Cycles
(boolean r2Orient2Cycles) Sets for R2 whether cycles should be oriented.void
Sets the rule to use to do the orientation.void
setScore
(Lofs.Score score) Sets the (LoFS) score to use.void
setSelfLoopStrength
(double selfLoopStrength) Sets the self-loop strength, if applicable.
-
Constructor Details
-
Lofs
Constructor.- Parameters:
graph
- The graph to be oriented. Orientations for the graph will be overwritten.dataSets
- A list of datasets to use to do the orientation. This may be just one dataset. If more than one dataset are given, the data will be concatenated (pooled).- Throws:
IllegalArgumentException
-
-
Method Details
-
orient
Orients the graph and returns the oriented graph.- Returns:
- The oriented graph.
-
setRule
Sets the rule to use to do the orientation.- Parameters:
rule
- This rule.- See Also:
-
setScore
Sets the (LoFS) score to use.- Parameters:
score
- This score.- See Also:
-
setSelfLoopStrength
public void setSelfLoopStrength(double selfLoopStrength) Sets the self-loop strength, if applicable.- Parameters:
selfLoopStrength
- This strength.
-
setAlpha
public void setAlpha(double alpha) Sets the alpha to use, where applicable.- Parameters:
alpha
- This alpha.
-
setOrientStrongerDirection
public void setOrientStrongerDirection(boolean orientStrongerDirection) Sets whether orientation should be done in the stronger direction, where applicable.- Parameters:
orientStrongerDirection
- True, if so.
-
setR2Orient2Cycles
public void setR2Orient2Cycles(boolean r2Orient2Cycles) Sets for R2 whether cycles should be oriented.- Parameters:
r2Orient2Cycles
- True, if so.
-
scoreRow
-
setEpsilon
public void setEpsilon(double epsilon) -
setKnowledge
-
getPValue
public double getPValue(double fisherZ) - Returns:
- the probability associated with the most recently computed independence test.
-
kernel
public double kernel(double z) -
kernel1
public double kernel1(double z) -
kernel2
public double kernel2(double z) -
kernel3
public double kernel3(double z) -
kernel4
public double kernel4(double z) -
kernel5
public double kernel5(double z) -
kernel6
public double kernel6(double z) -
kernel7
public double kernel7(double z) -
kernel8
public double kernel8(double z)
-