Class Sp
- All Implemented Interfaces:
SuborderSearch
Note that SP considers all permutations of the algorithm, which is exponential in the number of variables. So SP without knowledge is limited to about 10 variables per knowledge tier.
However, notably, tiered Knowledge can be used with this search. If tiered knowledge is used, then the procedure is carried out for each tier separately, given the variable preceding that tier, which allows the SP algorithm to address tiered (e.g., time series) problems with more than 11 variables.
This class is meant to be used in the context of the PermutationSearch class (see). the proper use is PermutationSearch search = new PermutationSearch(new Sp(score));
Raskutti, G., & Uhler, C. (2018). Learning directed acyclic graph models based on sparsest permutations. Stat, 7(1), e183.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Author:
- bryanandrews, josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the parents of each variable.getScore()
Returns the score being used.Returns the variables being searched over.void
searchSuborder
(List<Node> prefix, List<Node> suborder, Map<Node, GrowShrinkTree> gsts) This is the method called by PermutationSearch per tier.void
setKnowledge
(Knowledge knowledge) Set the knowledge to used.
-
Constructor Details
-
Sp
This algorithm will work with an arbitrary score.- Parameters:
score
- The Score to use.
-
-
Method Details
-
searchSuborder
This is the method called by PermutationSearch per tier.- Specified by:
searchSuborder
in interfaceSuborderSearch
- Parameters:
prefix
- The variable preceding the suborder variables in the permutation, including all variables from previous tiers.suborder
- The suborder of the variable list beign searched over. Only the order of the variables in this suborder will be modified.gsts
- The GrowShrinkTree used for the search. This is an optimized score-caching class.- See Also:
-
getVariables
Returns the variables being searched over.- Specified by:
getVariables
in interfaceSuborderSearch
- Returns:
- The variables being searched over.
- See Also:
-
getParents
Returns the parents of each variable.- Specified by:
getParents
in interfaceSuborderSearch
- Returns:
- The parents of each variable.
-
getScore
Returns the score being used.- Specified by:
getScore
in interfaceSuborderSearch
- Returns:
- The score being used.
- See Also:
-
setKnowledge
Set the knowledge to used.- Specified by:
setKnowledge
in interfaceSuborderSearch
- Parameters:
knowledge
- This knowledge.- See Also:
-