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

Improving Span, or Span 2 #10

Merged
merged 89 commits into from
Sep 27, 2019
Merged

Improving Span, or Span 2 #10

merged 89 commits into from
Sep 27, 2019

Conversation

dievsky
Copy link
Contributor

@dievsky dievsky commented Sep 11, 2019

A companion PR for JetBrains-Research/epigenome#1436.

Introduces:

  • weighted least squares for fitting a GLM;
  • RegessionEmissonScheme, IntegerRegressionEmissionScheme and PoissonRegressionEmissionScheme;
  • autodetection of 2bit files for custom genome builds if they're in the same folder as the chrom.sizes file.

Also minor code style improvements.

@dievsky dievsky marked this pull request as ready for review September 12, 2019 09:44
@dievsky dievsky self-assigned this Sep 12, 2019
@dievsky dievsky requested a review from olegs September 12, 2019 09:44
@@ -14,7 +14,7 @@ import org.jetbrains.bio.viktor._I
object MixtureInternals {
@JvmStatic
fun predict(logGammas: F64Array): IntArray {
return IntArray(logGammas.shape[0]) { logGammas.V[_I, it].argMax() }
return IntArray(logGammas.shape[1]) { logGammas.V[_I, it].argMax() }
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this this a bug-fix, why dimension is changed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was, I even commented on it, and you asked me to provide a test. Since this is a really hard-to-miss bug (shape is usually something like 3 x 15_000_000), I'd say that the integration and sample-and-fit tests that we have cover this issue pretty well.
(That reminds me, though, that I've recently killed argMax in viktor. I have to either bring it back or work around this.)

@olegs olegs merged commit 469bed9 into master Sep 27, 2019
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.

3 participants