Skip to content

Maintained package (scipy) implementation #23

@alexandreCameron

Description

@alexandreCameron

For those looking to upgrade the function to a maintained package:

def get_sequence_using_sobol_seq(n_samples, d):
    from sobol_seq import i4_sobol_generate
    return i4_sobol_generate(d, n_samples).flatten()

is equivalent to

def get_sequence_using_scipy(n_samples, d):
    from scipy.stats.qmc import Sobol
    support_generator = Sobol(d, scramble=False, seed=None).reset()
    # The first value is remove because it's 0
    support = support_generator.random(n=n_samples+1).flatten()[1:]
    return  support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions