Bugs in isotonic regression ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the two examples with the isotonic method: decreasing x should preserve the corresponding output order, and the fitted solution should not have a larger squared error than the constant mean solution. Read the isotonic-regression implementation and its existing tests, if present, then add regression coverage for both cases. Done means the reported inputs produce an ordered, objective-minimizing fit.
Written by the indexing model from the issue text.
Description
Hello !
By testing the isotonic method from this package and comparing it with a custom implementation, I faced some strange behaviours.
First, the output seems to always be ordered, regardless of the first input arg x:
julia> isotonic(5:-1:1, 5:-1:1)
5-element Vector{Float64}:
1.0
2.0
3.0
4.0
5.0
Shouldn't it return [5.0, 4.0, 3.0, 2.0, 1.0] instead ?
Second, even when using an ordered x, it seems that the output solution is often suboptimal:
julia> y = [0.52, 0.58, -1.91, -1.12, -1.04]
julia> sol = isotonic(1:length(y), y)
5-element Vector{Float64}:
-0.8725
-0.8725
-0.8725
-0.8725
-0.8725
In this example, the output x is a worse solution than the mean of y
julia> sol_mean = fill(sum(y) / length(y), length(y))
5-element Vector{Float64}:
-0.594
-0.594
-0.594
-0.594
-0.594
julia> sum((vi - yi) ^ 2 for (vi, yi) in zip(sol, y))
5.21453125
julia> sum((vi - yi) ^ 2 for (vi, yi) in zip(sol_mean, y))
4.826719999999999
- Dominant language
- Julia
- Stars
- 387
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaStats/MultivariateStats.jl
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
tagbot-manual
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
JuliaStats/MultivariateStats.jl#238 · 1 comment ·
-
Return a result even when MetricMDS does not convergePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaStats/MultivariateStats.jl#233 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in JuliaStats/MultivariateStats.jl
Similar issues
-
Affine transformations of `JohnsonSU` could return a `JohnsonSU`Possibly taken @devmotion claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaStats/Distributions.jl#2117 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
TomerAberbach/profiler-md#970 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
grame-cncm/faust#1409 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
SciML/PETScDiffEq.jl#521 ·
Maintainers usually reply within 1 day