double PCA_and_TableOfReal_getFractionVariance (PCA me, TableOfReal thee, long from, long to) { try { double fraction = NUMundefined; if (from < 1 || from > to || to > thy numberOfColumns) { return NUMundefined; } autoSSCP s = TableOfReal_to_SSCP (thee, 0, 0, 0, 0); autoSSCP sp = Eigen_and_SSCP_project (me, s.get()); fraction = SSCP_getFractionVariation (sp.get(), from, to); return fraction; } catch (MelderError) { return NUMundefined; } }
double Discriminant_getConcentrationEllipseArea (Discriminant me, long group, double scale, bool confidence, int discriminantDirections, long d1, long d2) { double area = NUMundefined; if (group < 1 || group > my numberOfGroups) { return area; } if (discriminantDirections) { autoSSCP thee = Eigen_and_SSCP_project (my eigen.get(), my groups->at [group]); area = SSCP_getConcentrationEllipseArea (thee.get(), scale, confidence, d1, d2); } else { area = SSCP_getConcentrationEllipseArea (my groups->at [group], scale, confidence, d1, d2); } return area; }
double Discriminant_getConcentrationEllipseArea (Discriminant me, long group, double scale, int confidence, int discriminantDirections, long d1, long d2) { SSCPs groups = my groups; double area = NUMundefined; if (group < 1 || group > my numberOfGroups) { return area; } if (discriminantDirections) { autoSSCP thee = Eigen_and_SSCP_project (me, (SSCP) groups -> item[group]); area = SSCP_getConcentrationEllipseArea (thee.peek(), scale, confidence, d1, d2); } else { area = SSCP_getConcentrationEllipseArea ((SSCP) groups -> item[group], scale, confidence, d1, d2); } return area; }