deepcorr-normalization 0.1.0

Lower level crate for DeepCorr which handles data normalization. Can be uses standalone too.
Documentation
  • Coverage
  • 0%
    0 out of 24 items documented0 out of 12 items with examples
  • Size
  • Source code size: 47.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.35 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 33s Average build duration of successful builds.
  • all releases: 33s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mosaic-rs/DeepCorr
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Harry-S-W

DeepCorr Normalization

A rust based normalization crate, part of the DeepCorr Deep CCA system currently in development by Harry Woodhouse at the University of York.

Current Normalization Functions:

  • Cosine
  • Z-score
  • MinMax

Formulas:

Cosine Normalization

Pass in a 2d matrix which replicates the structure of your data set (i.e. point per row) and it will normalize it. Cosine normalization normalizes data to a unit of 1 by divind values by the euclidean value. I.e.

$$ (X, Y, Z) = (8.0, 32.0, 9.0) $$ $$ r = \sqrt{X2 + Y2 + Z^2} $$ $$ r = 34.2 $$

$$ (X',Y',Z') = (\frac{X}{r}, \frac{Y}{r}, \frac{Z}{r}) $$ $$ (0.23,0.93, 0.26) = (\frac{8.0}{34.2}, \frac{32.0}{34.2}, \frac{9.0}{34.2}) $$

We can veridy these calculations by ensuring the square root of the sum of the square = 1

$$ \sqrt{0.232 + 0.932 + 0.26^2} = 0.99 $$ Off slightly due to rounding but the math checks out.

Z-Score Normalization

Subtrac the mean from a data point divided by the standard deviation of that row of the matrix

$$ z = \frac{x - \mu}{\sigma + \epsilon} $$

Min-Max

$$ x' = \frac{x - \text{min}(x)}{(\text{max}(x) - \text{min}(x)) + \epsilon} $$