Class ParameterLearningOutput
- java.lang.Object
-
- com.bayesserver.learning.parameters.ParameterLearningOutput
-
- All Implemented Interfaces:
Cloneable
public final class ParameterLearningOutput extends Object implements Cloneable
Contains summary information returned byParameterLearning.learn(com.bayesserver.data.EvidenceReaderCommand, com.bayesserver.learning.parameters.ParameterLearningOptions)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Double
getBIC()
Gets the Bayesian Information Criterion (BIC) for the final learntNetwork
based on the learning data.double
getCaseCount()
Gets the number of cases (records) in the learning data.boolean
getConverged()
Gets a value indicating whether this parameter learning converged.int
getIterationCount()
Gets the number of iterations performed during learning.Double
getLogLikelihood()
Gets the log likelihood of the learning data with the final learntNetwork
.int
getSeed()
Gets the seed used to generate random numbers for initialization.long
getUnweightedCaseCount()
Gets the unweighted case count in the learning data.double
getWeightedCaseCount()
Gets the weighted case count in the learning data.
-
-
-
Method Detail
-
getSeed
public int getSeed()
Gets the seed used to generate random numbers for initialization. Only valid whenParameterLearningOptions.getMaximumConcurrency()
is 1.
-
getConverged
public boolean getConverged()
Gets a value indicating whether this parameter learning converged. For more information seeParameterLearningOptions.getTolerance()
.- Returns:
true
if converged; otherwise,false
.
-
getLogLikelihood
public Double getLogLikelihood()
Gets the log likelihood of the learning data with the final learntNetwork
.The log likelihood increases as the model fits the data better.
This value is only calculated if
ParameterLearningOptions.getCalculateStatistics()
istrue
.- Returns:
- The log likelihood.
-
getIterationCount
public int getIterationCount()
Gets the number of iterations performed during learning.- Returns:
- The iteration count.
-
getCaseCount
public double getCaseCount()
Gets the number of cases (records) in the learning data. Any weights associated with cases are incorporated into this sum.- Returns:
- The case count.
-
getWeightedCaseCount
public double getWeightedCaseCount()
Gets the weighted case count in the learning data. Any weights associated with cases are incorporated into this sum.- Returns:
- The weighted case count.
-
getUnweightedCaseCount
public long getUnweightedCaseCount()
Gets the unweighted case count in the learning data. Any weights associated with cases are NOT incorporated into this sum.- Returns:
- The unweighted case count.
-
getBIC
public Double getBIC()
Gets the Bayesian Information Criterion (BIC) for the final learntNetwork
based on the learning data.When comparing two models using the BIC heuristic, a lower value is preferred.
This statistic is only calculated if
ParameterLearningOptions.getCalculateStatistics()
istrue
.The BIC statistics is a Log Likelihood based statistic which penalizes models with more parameters. It can be used as an heuristic to compare networks with different parameters learnt with the same data.
- Returns:
- The BIC statistic.
-
-