private boolean paramInBounds(Edge edge, double newValue) { edgeParameters.put(edge, newValue); Map<Node, Double> errorVariances = new HashMap<Node, Double>(); for (Node node : semPm.getVariableNodes()) { Node error = semGraph.getExogenous(node); double d2 = calculateErrorVarianceFromParams(error); if (Double.isNaN(d2)) { return false; } errorVariances.put(error, d2); } if (!MatrixUtils.isPositiveDefinite(errCovar(errorVariances))) { return false; } return true; }
/** * @return For compatibility only. Returns the variable means of the model. These are always zero, * since this is a standardized model. THESE ARE ALSO NOT PARAMETERS OF THE MODEL. ONLY THE * COEFFICIENTS ARE PARAMETERS. */ public double[] means() { return new double[semPm.getVariableNodes().size()]; }
/** @return the list of variable nodes of the model, in order. */ public List<Node> getVariableNodes() { return semPm.getVariableNodes(); }