Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deformation union #50

Closed
bmcfee opened this issue Mar 1, 2017 · 1 comment
Closed

Deformation union #50

bmcfee opened this issue Mar 1, 2017 · 1 comment

Comments

@bmcfee
Copy link
Owner

bmcfee commented Mar 1, 2017

The pipeline object allows for cascading of multiple deformers into a single chain.

Sometimes, we just want to apply a set of deformations independently, but there's no direct way to do that currently.

It would be easy to implement something analogous to a sklearn feature union that does round-robin sampling from each deformer.

@bmcfee bmcfee added this to the 0.1.3 milestone Mar 1, 2017
@bmcfee
Copy link
Owner Author

bmcfee commented Mar 1, 2017

From the itertools recipes page:

def roundrobin(*iterables):
    "roundrobin('ABC', 'D', 'EF') --> A D E B F C"
    # Recipe credited to George Sakkis
    pending = len(iterables)
    nexts = cycle(iter(it).next for it in iterables)
    while pending:
        try:
            for next in nexts:
                yield next()
        except StopIteration:
            pending -= 1
            nexts = cycle(islice(nexts, pending))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant