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

Add Penalty, Regularized Least Squares and IPODRegression #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

getzze
Copy link
Owner

@getzze getzze commented May 12, 2023

Θ-IPOD Regression algorithm is based on "Outlier Detection Using Nonconvex Penalized Regression", 2011, Y. She, A.B. Owen

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Attention: Patch coverage is 85.40479% with 128 lines in your changes missing coverage. Please review.

Project coverage is 85.02%. Comparing base (b3ef64a) to head (0d3adee).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/ipod.jl 80.66% 58 Missing ⚠️
src/penalties.jl 81.36% 30 Missing ⚠️
src/regularizedpred.jl 91.02% 29 Missing ⚠️
src/robustlinearmodel.jl 91.01% 8 Missing ⚠️
src/RobustModels.jl 33.33% 2 Missing ⚠️
src/linpred.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
+ Coverage   84.12%   85.02%   +0.90%     
==========================================
  Files          12       14       +2     
  Lines        1776     2651     +875     
==========================================
+ Hits         1494     2254     +760     
- Misses        282      397     +115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

JuliaFormatter

[JuliaFormatter] reported by reviewdog 🐶

(A isa FormulaTerm) ? "formula" :
(A isa SparseMatrixCSC) ? "sparse " : "dense "


[JuliaFormatter] reported by reviewdog 🐶

(A isa FormulaTerm) ? "formula" :
(A isa SparseMatrixCSC) ? "sparse " : "dense "


[JuliaFormatter] reported by reviewdog 🐶

(A isa FormulaTerm) ? "formula" :
(A isa SparseMatrixCSC) ? "sparse " : "dense "


[JuliaFormatter] reported by reviewdog 🐶

(A isa FormulaTerm) ? "formula" :
(A isa SparseMatrixCSC) ? "sparse " : "dense "


[JuliaFormatter] reported by reviewdog 🐶

# elseif f in (confint,)
# @test isapprox(var1, var2; rtol=1e-1)


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶

beta = vcat(beta, zeros(T, p-nonzero))


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶

X .+= sqrt(rho/(1-rho)) * z
X *= sqrt(1-rho)


[JuliaFormatter] reported by reviewdog 🐶

ssd = sqrt((1-rho)*sum(abs2, beta) + rho*sum(abs, beta))


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶

@test_throws Exception rlm(X3, y3, est1; method=method, initial_scale=1, dropcollinear=false)


[JuliaFormatter] reported by reviewdog 🐶

m1 = rlm(X3, y3, pen; method=method, initial_scale=1, maxiter=1000, dropcollinear=true)


[JuliaFormatter] reported by reviewdog 🐶

@test_throws Exception ipod(X3, y3, loss1, pen; method=method, initial_scale=1, dropcollinear=false)


[JuliaFormatter] reported by reviewdog 🐶

m2 = ipod(X3, y3, loss1, pen; method=method, initial_scale=1, maxiter=1000, dropcollinear=true)

format

use :cholesky and dropcollinear like in GLM

correctly use QR

test method :cholesky

change types

clean after rebase
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.

1 participant