Skip to content

[FIX] stats: Fix statistics for primitive variables#3722

Merged
ajdapretnar merged 1 commit intobiolab:masterfrom
VesnaT:stats_fix
Apr 5, 2019
Merged

[FIX] stats: Fix statistics for primitive variables#3722
ajdapretnar merged 1 commit intobiolab:masterfrom
VesnaT:stats_fix

Conversation

@VesnaT
Copy link
Copy Markdown
Contributor

@VesnaT VesnaT commented Apr 4, 2019

Issue

Fixes #3671

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2019

Codecov Report

Merging #3722 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3722      +/-   ##
==========================================
- Coverage   84.52%   84.52%   -0.01%     
==========================================
  Files         373      373              
  Lines       68459    68460       +1     
==========================================
  Hits        57868    57868              
- Misses      10591    10592       +1

else:
nans = (~X.astype(bool)).sum(axis=0) if X.size else np.zeros(X.shape[1])
X_str = X.astype(str)
nans = ((X_str == "nan") | (X_str == "")).sum(axis=0) \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have my doubts about a literal 'nan' being treated as missing.

@ajdapretnar
Copy link
Copy Markdown
Contributor

@janezd @lanzagar @markotoplak How do you feel about a literal 'nan' being treated as missing? 'nan' can have meaning in English other than missing values (e.g. grandmother, naan bread).

@ajdapretnar
Copy link
Copy Markdown
Contributor

Ok, we have decided to accept the current solution. We consider 'nan' to be a borderline case and if it ever arises, we will fix it then.

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.

2 participants