Opened 6 years ago
Closed 5 years ago
#13643 closed defect (fixed)
default norm for RDF/CDF matrices is inconsistent with other types of matrices
Reported by: | jason | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-5.5 |
Component: | linear algebra | Keywords: | |
Cc: | rbeezer | Merged in: | sage-5.5.beta1 |
Authors: | Jason Grout | Reviewers: | Punarbasu Purkayastha |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Currently, the default norm for matrices is the induced 2-norm, unless the matrix is an RDF or CDF matrix, in which case the default norm is the Frobenius norm. Needless to say, this is very confusing:
sage: version() 'Sage Version 5.4.rc1, Release Date: 2012-10-05' sage: a=matrix(QQ, 3, range(9)) sage: a.norm() 14.2267073908 sage: a.norm(2) 14.2267073908 sage: b=a.change_ring(RDF) sage: b.norm() 14.2828568571 sage: b.norm('frob') 14.2828568571
I propose we change the default norm for RDF/CDF matrices to the induced 2-norm.
Attachments (1)
Change History (10)
comment:1 Changed 6 years ago by
Changed 6 years ago by
comment:2 Changed 6 years ago by
- Status changed from new to needs_review
patch tested on the affected file...
comment:3 Changed 6 years ago by
comment:4 Changed 6 years ago by
Patch looks fine to me. Let some more people comment on your email first :)
comment:5 Changed 6 years ago by
I don't feel like this is a bad idea at all, given that we are focused more on the Ms than imitating NumPy?, and with the deprecation warning we will hopefully catch any power users. I don't usually do a norm of a matrix myself...
comment:6 Changed 6 years ago by
Just FYI, my post to numpy sparked a thread where the reason was uncovered: http://mail.scipy.org/pipermail/numpy-discussion/2012-October/064228.html (in particular, see http://mail.scipy.org/pipermail/numpy-discussion/2006-March/019194.html).
comment:7 Changed 5 years ago by
I think this has now dropped off the voting on sage-devel, with several positive votes. Can someone review the patch?
comment:8 Changed 5 years ago by
- Reviewers set to Punarbasu Purkayastha
- Status changed from needs_review to positive_review
I had checked it earlier, when I last reviewed it. It was positive review from my side. Patchbot gives a green signal too :)
comment:9 Changed 5 years ago by
- Merged in set to sage-5.5.beta1
- Resolution set to fixed
- Status changed from positive_review to closed
More info for a decision:
Defaults to Frobenius norm:
Defaults to induced 2-norm: