Skip to content

statistics-2.1.3

Latest

Choose a tag to compare

@pr0m1th3as pr0m1th3as released this 13 Nov 21:35

A maintenance release: cvpartition grouped partitions completed and corrected, classes kept when all their rows are dropped, and fixes across descriptive statistics, plotting and classifier loss.

Requires Octave >= 11.1.0 and datatypes 1.5.0 or newer, as 2.0.0 did.

Standing notice, unchanged since 1.9.0. The nan and the tablicious packages are incompatible with this one.

Incompatible changes. Code calling these functions must be checked:

  • cvpartition.summary gives labels of the stratification or grouping variable's own type, as MATLAB does, where text labels were always strings; several grouping variables give one column each, GroupLabel1, GroupLabel2, and so on.
  • geomean, harmmean and trimmean take double and single input only, as MATLAB documents; integer, logical and character input raise an error.
  • meanEffectSize takes full option values only, in any case; shortened values such as 'coh' raise an error.

Fixes.

  • cvpartition with 'GroupingVariables' accepts a string array and a mixed cell array, as documented. A grouped 'Holdout' with a stratification variable ignored the groups; it now keeps them whole, and is refused with 'Stratify' true. A grouped hold-out counted rows left out for missing groups as training data, and repartition split its groups. test (C, 'all') of a stratified hold-out with missing values returned too few rows.
  • cvpartition.summary failed for a grouping variable given as a row vector or a categorical array, and for a grouped hold-out with missing groups; it labelled a group of several variables by the first alone.
  • fitcknn, fitctree, fitcnb, fitcensemble, fitcecoc, fitcnet and TreeBagger keep a class whose every row is dropped in ClassNames with prior 0, as MATLAB does, where it was left out; 'AdaBoostM2' and TreeBagger failed on such data.
  • loss under 'classiferror' counted a tie for the highest score as an error even when predict returned the true class; a tie now goes to the first tied class, as in MATLAB.
  • fitcensemble with 'Subspace' accepts observation weights that are not uniform, as MATLAB does, where they were refused.
  • plotResiduals drew empty axes for the default histogram of NonLinearModel and GeneralizedLinearModel; every model now draws probability density in MATLAB's bins, equal residuals give one bar where the histogram failed or misplaced it, and a second histogram replaces the first unless hold is on.
  • ksdensity accepts a single value, with a bandwidth of one, as MATLAB does, and so do fitdist with 'Kernel' and fitcnb with a 'kernel' class of one observation.
  • adtest stopped with an error under 'MCTol'; it now runs the Monte Carlo approximation (#548).
  • mvncdf was wrong in three or more dimensions when SIGMA was not diagonal (#547).
  • makima flattened the curve for very small data and gave NaN for very large data (#546).
  • nanvar and nanstd give NaN for data holding Inf and the real variance for complex input, as MATLAB does (#545).
  • harmmean with 'omitnan' lost precision or returned Inf for large values (#544).
  • geomean let a zero hide a NaN, an Inf or single input under 'all', and ignored 'all' given with a dimension (#543).
  • chi2gof raises an error for an unknown option name, which it ignored; its help named options and an output field that do not exist.

Improvements. cvpartition takes 'GroupingVariables' after a stratification variable without 'Stratify', giving a stratified grouped K-fold partition; rows dropped for missing groups raise a warning, as in MATLAB.

Every change is listed in NEWS.