Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use StableRNGs for initialization #147

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

exaexa
Copy link
Collaborator

@exaexa exaexa commented Oct 6, 2020

This should fix the tests failing in Julia 1.5 (which changed the default RNG). Likely closes #132 and #144.

Assorted extra changes:

  • initGigaSOM is now seeded using either seed= or explicit rng= parameter
  • Removed a bit of unnecessary imports
  • Removed colNames from Som struct
  • Changed the test reference data to match the StableRNG
  • dstat() now really returns 1-dim vectors, not single-line matrices

Extra stuff to decide:

The new initialization uses an approximation of the dataset and avoids some data bias. We can do better (have a covariance matrix computed on the data and make a nice skewed ellipsoid instead of axis-aligned one). If that sounds important, please let me know (cc @oHunewald ); though I guess it has little practical value except perhaps if the data is already flat.

This should fix the tests failing in Julia 1.5 (which changed the default RNG).

Assorted extra changes:
- initGigaSOM is now seeded using either seed= or explicit rng= parameter
- Removed a bit of unnecessary imports
- Removed colNames from Som struct
- Changed the test reference data to match the StableRNG
- dstat() now really returns 1-dim vectors, not single-line matrices
@codecov
Copy link

codecov bot commented Oct 6, 2020

Codecov Report

Merging #147 into develop will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #147      +/-   ##
===========================================
+ Coverage    89.17%   89.28%   +0.11%     
===========================================
  Files           12       12              
  Lines          471      476       +5     
===========================================
+ Hits           420      425       +5     
  Misses          51       51              
Impacted Files Coverage Δ
src/GigaSOM.jl 100.00% <ø> (ø)
src/base/dataops.jl 97.40% <ø> (ø)
src/analysis/core.jl 93.75% <100.00%> (+0.52%) ⬆️
src/base/structs.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 741568d...d0a1ff1. Read the comment docs.

@laurentheirendt
Copy link
Member

very nice work @exaexa 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants