Skip to content

[Feature request] Customizable feature combinations #3

Description

@athewsey

Hi team, Thanks for the useful library! I wonder if you'd be open to this idea:

I would like to be able to:

  • Set up categorizing features (let's say, for illustration, CATEGORY=[footwear, t-shirts, socks], SIZE=[S, M, L, US-Mens-8, US-Womens-6) and define Factors on them
  • Generate time-series with more restricted feature combinations than the outer product (again for illustration, "t-shirt sizes for t-shirts, shoe sizes for footwear")

Today, it seems like Generator.generate() hard-codes the assumption that time-series should be generated for the product of all provided feature values.

It'd be helpful if, instead, we could have the option of customizing this join to limit down generated combinations?

Some options I can think of:

  1. Leave the library as-is: Users generate full outer product and limit down what they want in post-processing
    • This seems possible already, but very RAM-intensive if your desired combinations are sparse?
  2. Accept an optional dataframe of factor combinations as parameter to the generate() method
    • Gives full flexibility over which combinations are kept / ignored, without assuming any particular rigid hierarchies between features
    • ...But might need to do a bit of validation to protect against user errors? May not be super easy to use without some documented examples / functions to generate the dataframe
  3. Some more complex API for feature configuration that accommodates specifying valid/invalid feature combinations
    • Might be nicer for usability, but difficult to make general: E.g. a straightforward hierarchy could be represented as a nested dict, but in practice many applications have multiple intersecting views of product category information e.g. brand, type, target segment, etc.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions