Class SearchStructuralLearningOptions
- java.lang.Object
-
- com.bayesserver.learning.structure.SearchStructuralLearningOptions
-
- All Implemented Interfaces:
StructuralLearningOptions
public final class SearchStructuralLearningOptions extends Object implements StructuralLearningOptions
Options for structural learning with thecom.bayesserver.learning.structure.search.SearchStructuralLearning
class.
-
-
Constructor Summary
Constructors Constructor Description SearchStructuralLearningOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cancellation
getCancellation()
Gets of sets the instance implementingCancellation
, used for cancellation.InferenceFactory
getInferenceFactory()
Gets the inference factory used during scoring.LinkConstraintCollection
getLinkConstraints()
Gets any link constraints to use during structural learning.Integer
getMaximumIterations()
Gets the optional maximum number of iterations (moves) made during the search procedure.int
getPartitionCount()
Gets the number of partitions used by scoring functions that use cross validation.StructuralLearningProgress
getProgress()
Gets of sets the instance implementingStructuralLearningProgress
, used for progress notifications.ScoreMethod
getScoreMethod()
Gets the scoring method used to evaluate search moves.Stop
getStopping()
Gets the instance implementingStop
used for early stopping.boolean
getTestIndependence()
Gets a value which when true uses independence tests to reduce the search space.Double
getTolerance()
Gets the tolerance used to determine whether or not a search move is a significant improvement.double
getToleranceOrDefault()
If Tolerance is null, this returns the default tolerance for the given scoring method, otherwise Tolerance is returned.void
setCancellation(Cancellation value)
Gets of sets the instance implementingCancellation
, used for cancellation.void
setInferenceFactory(InferenceFactory value)
Sets the inference factory used during scoring.void
setMaximumIterations(Integer value)
Sets the optional maximum number of iterations (moves) made during the search procedure.void
setPartitionCount(int value)
Sets the number of partitions used by scoring functions that use cross validation.void
setProgress(StructuralLearningProgress value)
Gets of sets the instance implementingStructuralLearningProgress
, used for progress notifications.void
setScoreMethod(ScoreMethod value)
Sets the scoring method used to evaluate search moves.void
setStopping(Stop value)
Sets the instance implementingStop
used for early stopping.void
setTestIndependence(boolean value)
Sets a value which when true uses independence tests to reduce the search space.void
setTolerance(Double value)
Sets the tolerance used to determine whether or not a search move is a significant improvement.
-
-
-
Method Detail
-
getPartitionCount
public int getPartitionCount()
Gets the number of partitions used by scoring functions that use cross validation.
-
setPartitionCount
public void setPartitionCount(int value)
Sets the number of partitions used by scoring functions that use cross validation.
-
getProgress
public StructuralLearningProgress getProgress()
Gets of sets the instance implementingStructuralLearningProgress
, used for progress notifications.- Specified by:
getProgress
in interfaceStructuralLearningOptions
-
setProgress
public void setProgress(StructuralLearningProgress value)
Gets of sets the instance implementingStructuralLearningProgress
, used for progress notifications.- Specified by:
setProgress
in interfaceStructuralLearningOptions
-
getMaximumIterations
public Integer getMaximumIterations()
Gets the optional maximum number of iterations (moves) made during the search procedure. By default, no maximum is set.
-
setMaximumIterations
public void setMaximumIterations(Integer value)
Sets the optional maximum number of iterations (moves) made during the search procedure. By default, no maximum is set.
-
getToleranceOrDefault
public double getToleranceOrDefault()
If Tolerance is null, this returns the default tolerance for the given scoring method, otherwise Tolerance is returned.- Returns:
-
getTolerance
public Double getTolerance()
Gets the tolerance used to determine whether or not a search move is a significant improvement. This is a non negative number which indicates that learning will only stop when the relative difference between scores between moves is no greater than this value.When null, a default value is used which depends on the Score Method in use.
- Returns:
- The tolerance.
-
setTolerance
public void setTolerance(Double value)
Sets the tolerance used to determine whether or not a search move is a significant improvement. This is a non negative number which indicates that learning will only stop when the relative difference between scores between moves is no greater than this value.When null, a default value is used which depends on the Score Method in use.
- Parameters:
value
- The tolerance.
-
getScoreMethod
public ScoreMethod getScoreMethod()
Gets the scoring method used to evaluate search moves.
-
setScoreMethod
public void setScoreMethod(ScoreMethod value)
Sets the scoring method used to evaluate search moves.
-
getInferenceFactory
public InferenceFactory getInferenceFactory()
Gets the inference factory used during scoring.
-
setInferenceFactory
public void setInferenceFactory(InferenceFactory value)
Sets the inference factory used during scoring.
-
getStopping
public Stop getStopping()
Gets the instance implementingStop
used for early stopping. Stopping is different to cancellation, as stopping will still complete the learning process, albeit having not run to completion.- Specified by:
getStopping
in interfaceStructuralLearningOptions
- Returns:
- The instance used for stopping.
-
setStopping
public void setStopping(Stop value)
Sets the instance implementingStop
used for early stopping. Stopping is different to cancellation, as stopping will still complete the learning process, albeit having not run to completion.- Specified by:
setStopping
in interfaceStructuralLearningOptions
- Parameters:
value
- The instance used for stopping.
-
getCancellation
public Cancellation getCancellation()
Gets of sets the instance implementingCancellation
, used for cancellation.- Specified by:
getCancellation
in interfaceStructuralLearningOptions
- See Also:
Cancellation
-
setCancellation
public void setCancellation(Cancellation value)
Gets of sets the instance implementingCancellation
, used for cancellation.- Specified by:
setCancellation
in interfaceStructuralLearningOptions
- See Also:
Cancellation
-
getLinkConstraints
public LinkConstraintCollection getLinkConstraints()
Gets any link constraints to use during structural learning.- Specified by:
getLinkConstraints
in interfaceStructuralLearningOptions
-
getTestIndependence
public boolean getTestIndependence()
Gets a value which when true uses independence tests to reduce the search space.
-
setTestIndependence
public void setTestIndependence(boolean value)
Sets a value which when true uses independence tests to reduce the search space.
-
-