sparse grid produces more nodes than tensorgrid
Closed this issue · 4 comments
NittanyLion commented
The code below produces
1 7 (7, 7)
1 11 (11, 11)
2 7 (49, 137)
2 11 (121, 501)
3 7 (343, 681)
3 11 (1331, 5297)
I had expected the number of sparse nodes to be less than the number of tensor nodes. What am I doing wrong?
using SparseGrids, FastGaussQuadrature
function hmmm( d, o )
nt, wt = tensorgrid( d, o )
ns, ws = sparsegrid( d, o )
length( wt ), length( ws )
end
for d ∈ 1:3, o ∈ [ 7, 11 ]
println( "$d $o ", hmmm( d,o) )
end
robertdj commented
I would have to dig deeper to be certain, but as far as I remember the number of sparse nodes is less than the number of tensor nodes in high dimensions, but not necessarily in low dimensions. Can you check this?
Also/otherwise check some of the papers linked in the README.
NittanyLion commented
ok, thanks, I'll have a look.
…On Sat, Jul 15, 2023 at 3:34 PM Robert Dahl Jacobsen < ***@***.***> wrote:
I would have to dig deeper to be certain, but as far as I remember the
number of sparse nodes is less than the number of tensor nodes in high
dimensions, but not necessarily in low dimensions. Can you check this?
Also/otherwise check some of the papers linked in the README.
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5W7ZVKAHX6ER26E3MIZITXQLWDDANCNFSM6AAAAAA2LNLLHM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
robertdj commented
Did you reach a conclusion?
NittanyLion commented
Thank you Robert. I believe you're right. You can close this.