histc() reforged 45/19045/12
authorSamuel GOUGEON <sgougeon@free.fr>
Mon, 6 Feb 2017 19:30:11 +0000 (20:30 +0100)
committerAntoine ELIAS <antoine.elias@esi-group.com>
Wed, 19 Feb 2020 13:58:38 +0000 (14:58 +0100)
commit907fc7c0b62b7dfa82e7cc841814ed421c32ad42
treec284dfe1956680772d6157368e9c2d8c71071eb6
parentbdf60b3d3dd0e92db3d2915698fd7a5b98eb4fbf
histc() reforged

* BC 100 % ensured with all preexisting syntaxes
* syntaxes of histplot() reforged will be aligned with histc() ones.
  BC will be 100% ensured as well (+ fixing the bugs)
* histc() unit tests: ~400 tests added.
* Help page rewritten, render. in PDF. Please remove it before merging

* Input data:
  - extension to sparses, complex numbers, texts, and polynomials
  - Data becomes the first input argument (Matlab-like). Back-compatibility ensured.
  - %inf and -%inf values are now accepted. They yielded an error.
  - In ranging mode, %nan values are now properly filtered out.

* Binning:
  - Specification becomes the second input argument.  Back-compatibility ensured.
  - input bins become optional: automatic binning modes are now available:
    - polynomials, texts: (discrete) categorial bins generated from data
    - numbers: sqrt (default), freediac, sturges methods are now available.
  - "discrete" categorial mode added, for all types of input data.
  - Numbers: a fixed bins width can now be specified
  - Numbers and texts: marginal bins can now be specified with -%inf and %inf
    or with "" and "~~" on both histogram wings.

* Histogram scales:
  - boolean "normalization" option replaced. Back-compatibility fully ensured.
  - "counts" (default) and "countsNorm" options added for all input data types
    "density" and "densityNorm" options added for data numbers in ranging mode.
  - Management of special values (jokers) added: Nan, Inf, zeros in sparse, ""
    - are excluded from the continuous histogram
    - For each joker, an option can be used to take its counts into
      account for normalized scales

* Results:
  - Bins indices of data are now returned in 4th position. Back-compatibility ensured.
  - Counts of jokers are now returned:
      * integers: [leftout, rightout] (range) or [out] (discrete)
      * decimal or complex numbers, full or sparse:
            range: [leftout, rightout, zeros, nan, inf]
         discrete: [out, 0, zeros, nan, inf]
      * polynomials: [out, 0, 0, nan, inf]
      * texts: range: [leftout, rightout, ""]; discrete: [out, 0, ""]
  - Actual bins values or edges are now returned.

Change-Id: Ia9ef2f4bcefab81c5a5852610136daa56900d0fc
29 files changed:
scilab/modules/graphics/macros/histplot.sci
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/_LaTeX_histc.xml_1.png
scilab/modules/helptools/images/_LaTeX_histplot.xml_1.png
scilab/modules/helptools/images/histc_1.png
scilab/modules/helptools/images/histc_en_US_2.png [deleted file]
scilab/modules/helptools/images/histc_en_US_3.png [deleted file]
scilab/modules/helptools/images/histc_en_US_4.png [deleted file]
scilab/modules/helptools/images/histc_fr_FR_2.png [deleted file]
scilab/modules/helptools/images/histc_fr_FR_3.png [deleted file]
scilab/modules/helptools/images/histc_fr_FR_4.png [deleted file]
scilab/modules/helptools/images/histc_ja_JP_2.png [deleted file]
scilab/modules/helptools/images/histc_ja_JP_3.png [deleted file]
scilab/modules/helptools/images/histc_ja_JP_4.png [deleted file]
scilab/modules/helptools/images/histc_pt_BR_2.png [deleted file]
scilab/modules/helptools/images/histc_pt_BR_3.png [deleted file]
scilab/modules/helptools/images/histc_pt_BR_4.png [deleted file]
scilab/modules/helptools/images/histc_ru_RU_2.png [deleted file]
scilab/modules/helptools/images/histc_ru_RU_3.png [deleted file]
scilab/modules/helptools/images/histc_ru_RU_4.png [deleted file]
scilab/modules/statistics/help/en_US/4_distribution_empirical_shape/histc.xml
scilab/modules/statistics/help/en_US/histc.pdf [new file with mode: 0644]
scilab/modules/statistics/help/fr_FR/4_distribution_empirical_shape/histc.xml [deleted file]
scilab/modules/statistics/help/ja_JP/4_distribution_empirical_shape/histc.xml [deleted file]
scilab/modules/statistics/macros/histc.sci
scilab/modules/statistics/tests/nonreg_tests/bug_13490.tst [deleted file]
scilab/modules/statistics/tests/nonreg_tests/bug_6306.dia.ref [deleted file]
scilab/modules/statistics/tests/nonreg_tests/bug_6306.tst
scilab/modules/statistics/tests/unit_tests/histc.tst