StochasticNumerics / mimclib

A software library for UQ methods
GNU General Public License v2.0
6 stars 8 forks source link

What's the purpose of mods here #13

Closed Virtakuono closed 8 years ago

Virtakuono commented 8 years ago

I am somewhat puzzled about the meaning of the parameter mods in https://github.com/StochasticNumerics/mimclib/blob/693653b4868a74a9db50ea4f98cd776441a0e3e4/tests/gbm/run.py#L104

This is supposed to be an array of doubles, I presume? I don't quite get why anyone would want to call this function with anything but np.ones(1) . What am I missing here?

haji-ali commented 8 years ago

Actually for MLMC, mods=[-1, 1] For MIMC, things are a bit more complicated. I just wanted a general mechanism for both and for Stochastic Collocation in the future.

Virtakuono commented 8 years ago

Okay so inds gives a list of multi-indices and mods gives the weights of those? As in for MLMC I should be looking at mods = [-1 1] and inds = [n-1,n] for some integer n?

haji-ali commented 8 years ago

inds = [[n-1], [n]] weird for MLMC, but makes sense for MIMC

Virtakuono commented 8 years ago

Ah, so inds is a list of not multi-indices, but list of lists of actual indices?

haji-ali commented 8 years ago

inds is a list of multi-indices a multi-index is just another list