/** * Computes and stores the partial fraction of covered propagations. * * <p>Works only if {@link #computeFractionOfPropagations} is true, otherwise does nothing. * * @param observations the observations * @param newProbs the probabilities of the current model * @param i a number indicating the number of edges so far */ protected void computeAndStorePartialFractionOfPropagations( ObservationsReader observations, SparseDoubleMatrix2D newProbs, int i) { if (computeFractionOfPropagations) { ICModel tempModel = new ICModel(originalModel.getSn(), newProbs); double sparsifiedFraction = tempModel.getTotalFraction(observations); storePartialResult(Measure.FRACTION_OF_PROPAGATIONS, i, sparsifiedFraction); } }
protected double computeAndStorePartialLogLikelihood(int k, SparseDoubleMatrix2D newProbs) { ICModel model = new ICModel(originalModel.getSn(), newProbs); double logLikelihood = model.getLogLikelihoodIgnoringParentInformation(auxiliary); storePartialResult(Measure.LOG_L, k, logLikelihood); return logLikelihood; }