Comments (5)
Fair enough. The hadamard
function just takes the FWHT of the columns of the identity matrix, which is certainly not the most efficient way to do things. (Does it matter? I thought that performance-sensitive cases would mainly use the FWHT.)
Regarding non powers of two, I could certainly have a table of Hadamard matrices for various factors, and then build other sizes from Kronecker products of these. However, I have three concerns:
- Is this actually useful? Who needs Hadamard matrices of non-power-of-two sizes?
- Does it matter what ordering I choose? Ordering the factors in different ways seems like it will produce different matrices (albeit equivalent modulo reordering).
- Does it matter which inequivalent Hadamard matrix I choose, in the common case where there are inequivalent choices for a given factor?
from hadamard.jl.
Note that it is even faster on my machine to do a "power-by-squaring" algorithm, which keeps the size of the matrices smaller until the last Kronecker product:
function hadsq(m)
m == 0 && return reshape([1],1,1)
m == 1 && return H2
z = hadsq(m >> 1)
z = kron(z, z)
iseven(m) ? z : kron(H2, z)
end
from hadamard.jl.
Is this actually useful? Who needs Hadamard matrices of non-power-of-two sizes?
People use them from time to time for experimental design. Not saying it's the world's highest priority.
Does it matter what ordering I choose? Ordering the factors in different ways seems like it will produce different matrices (albeit equivalent modulo reordering).
Does it matter which inequivalent Hadamard matrix I choose, in the common case where there are inequivalent choices for a given factor?
I would say for starters, any one is fine, in part because I'm not sure it's practical to get an exhaustive list of non-Hadamard equivalent matrices for all n anyway, and generating Hadamard
equivalent matrices is easy enough for the user.
from hadamard.jl.
cute
On Mon, Jul 7, 2014 at 9:28 AM, Steven G. Johnson [email protected]
wrote:
Note that it is even faster on my machine to do a "power-by-squaring"
algorithm, which keeps the size of the matrices smaller until the last
Kronecker product:function hadsq(m)
m == 0 && return reshape([1],1,1)
m == 1 && return H2
z = hadsq(m >> 1)
z = kron(z, z)
iseven(m) ? z : kron(H2, z)
end—
Reply to this email directly or view it on GitHub
#2 (comment).
from hadamard.jl.
Should be mostly fixed. There are a few known orders of Hadamard matrices that aren't supported because I can't yet find the matrices online, but hopefully that will be fixed once a bug in the webhadamard site is fixed (their matrices are currently truncated).
from hadamard.jl.
Related Issues (10)
- Deprecation warnings
- fwht() input dimension HOT 3
- TagBot trigger issue HOT 21
- Failure to Precompile HOT 6
- Julia 0.4 support HOT 6
- use FFHT code HOT 4
- Package compatibility caps HOT 1
- In place FWHT HOT 2
- hadamard(1200) should work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hadamard.jl.