Conversation
| n = len(vector) | ||
| dispersion_measure = np.std(vector, ddof=1) * np.sqrt(n) | ||
| return dispersion_measure | ||
| return np.std(vector, ddof=1) * np.sqrt(n) |
There was a problem hiding this comment.
Function dpm refactored with the following changes:
- Inline variable that is only used once
| tbi = np.sum(w * vector) / np.sum(w) | ||
| return tbi | ||
| return np.sum(w * vector) / np.sum(w) |
There was a problem hiding this comment.
Function tukey_biweight refactored with the following changes:
- Inline variable that is only used once
| h = -1 * np.dot(p, np.log2(p)) | ||
| return h | ||
| return -1 * np.dot(p, np.log2(p)) |
There was a problem hiding this comment.
Function entropy refactored with the following changes:
- Inline variable that is only used once
| h = entropy(vector_p) | ||
| return h | ||
| return entropy(vector_p) |
There was a problem hiding this comment.
Function roku refactored with the following changes:
- Inline variable that is only used once
| jsd = np.sqrt(js) | ||
| return jsd | ||
| return np.sqrt(js) |
There was a problem hiding this comment.
Function js_distance refactored with the following changes:
- Inline variable that is only used once
| rs_transformed = rs / np.log2(n) | ||
| return rs_transformed | ||
| return rs / np.log2(n) |
There was a problem hiding this comment.
Function roku_specificity refactored with the following changes:
- Inline variable that is only used once
| tissue_specificity_index = vector / np.sum(vector) | ||
| return tissue_specificity_index | ||
| return vector / np.sum(vector) |
There was a problem hiding this comment.
Function tsi refactored with the following changes:
- Inline variable that is only used once
| zs_transformed = (zs + max_zs) / (2 * max_zs) | ||
| return zs_transformed | ||
| return (zs + max_zs) / (2 * max_zs) |
There was a problem hiding this comment.
Function zscore refactored with the following changes:
- Inline variable that is only used once
| spm_dispersion = dpm(spm_vector) | ||
| return spm_dispersion | ||
| return dpm(spm_vector) |
There was a problem hiding this comment.
Function spm_dpm refactored with the following changes:
- Inline variable that is only used once
| js_specificity_dispersion = dpm(js_vector) | ||
| return js_specificity_dispersion | ||
| return dpm(js_vector) |
There was a problem hiding this comment.
Function js_specificity_dpm refactored with the following changes:
- Inline variable that is only used once
Branch
masterrefactored by Sourcery.If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
masterbranch, then run: