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

Missing matrix/factorization functions #253

Open
5 of 33 tasks
kshyatt opened this issue Sep 12, 2015 · 8 comments
Open
5 of 33 tasks

Missing matrix/factorization functions #253

kshyatt opened this issue Sep 12, 2015 · 8 comments
Labels
good first issue Good for newcomers Hacktoberfest Good for Hacktoberfest participants

Comments

@kshyatt
Copy link
Contributor

kshyatt commented Sep 12, 2015

Re: JuliaLang/julia#5840, #136, JuliaLang/julia#8240

We have a lot of easy targets to fill out the linear algebra functionality. These methods don't work at all. They don't have fallbacks to the dense method, even. Feel free to add more:

  • BunchKaufman
    • full
    • det
    • logdet
  • Symmetric{SparseMatrixCSC}
    • full
    • det
    • logdet
    • eigvals
    • eigvecs
    • eigfact
    • svdvals
    • svd
    • svdfact
    • issparse - returns false
    • cond - broken because of eigvals
    • (-)A - can't flip sign of the values
    • isposdef
    • A_mul_B!
    • A_mul_Bt!
    • At_mul_Bt!
    • At_mul_B!
    • norm(A,2) also broken because of eigvals
  • LDLt{SymTridiagonal}
    • det
    • logdet
    • norm
    • trace
    • eigvals
    • eigvecs
    • svdvals
    • svd
    • cond
@jeanm
Copy link

jeanm commented Nov 21, 2015

I would like to work on some of these. Is it still a good idea, in light of JuliaLang/julia#8240 ?

@kshyatt
Copy link
Contributor Author

kshyatt commented Nov 23, 2015

I don't see why it wouldn't be. Some things, like det and logdet, we should have anyway. If we do go through with that issue, we can cross that bridge when we get there anyway.

@sarvghotra
Copy link

@kshyatt Is isposdef() still missing ?

@kshyatt
Copy link
Contributor Author

kshyatt commented Dec 14, 2015

julia> a = sprand(5,5,0.3)
5x5 sparse matrix with 5 Float64 entries:
    [1, 2]  =  0.39171
    [2, 2]  =  0.689867
    [4, 2]  =  0.648607
    [3, 3]  =  0.403935
    [2, 5]  =  0.101027

julia> a = a + a.'
5x5 sparse matrix with 8 Float64 entries:
    [2, 1]  =  0.39171
    [1, 2]  =  0.39171
    [2, 2]  =  1.37973
    [4, 2]  =  0.648607
    [5, 2]  =  0.101027
    [3, 3]  =  0.80787
    [2, 4]  =  0.648607
    [2, 5]  =  0.101027

julia> a = Symmetric(a)
5x5 Symmetric{Float64,SparseMatrixCSC{Float64,Int64}}:
 0.0      0.39171   0.0      0.0       0.0
 0.39171  1.37973   0.0      0.648607  0.101027
 0.0      0.0       0.80787  0.0       0.0
 0.0      0.648607  0.0      0.0       0.0
 0.0      0.101027  0.0      0.0       0.0

julia> isposdef(a)
ERROR: MethodError: `isposdef!` has no method matching isposdef!(::Symmetric{Float64,SparseMatrixCSC{Float64,Int64}})
 [inlined code] from linalg/symmetric.jl:5
 in isposdef at linalg/dense.jl:33
 in eval at ./boot.jl:264

Seems to be!

@sarvghotra
Copy link

In order to write tests for logdet of BunchKaufman I referred tests of logdet of generic. In this just @test_approx_eq logdet(A) log(det(A)) is used. This doesn't deal with the case when determinant is negative, i.e. it would throw error.

@andreasnoack
Copy link
Member

Notice that the test matrix A is constructed such that the determinant is positive. Further down, we test that it also throws for negative determinants.

tkelman referenced this issue in JuliaLang/julia Feb 23, 2016
Address issparse for specialized matrix types part of #13096
@kshyatt kshyatt added the Hacktoberfest Good for Hacktoberfest participants label Oct 5, 2016
@bencardoen
Copy link

Is this still open/relevant? If so, I'd like to help with a few (need them for my own work as well)

@oscardssmith
Copy link
Member

I'm not sure. Test them out and see if they error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest Good for Hacktoberfest participants
Projects
None yet
Development

No branches or pull requests

7 participants