Skip to content

Better single entity API #1000

Open
Open
@kmax12

Description

@kmax12

If I have a single entity, it'd be great if I could just initialize an Entity and then pass the entity to DFS. We have a lot of users who only have a single table, so we an improvement to streamline the API in this case would help a lot.

Potential API

entity = ft.Entity(
            entity_id, #optional
            dataframe,
            variable_types=variable_types,
            index=index,
            time_index=time_index,
            secondary_time_index=secondary_time_index,
            make_index=make_index
)

ft.dfs(entity, cutoff_time, trans_primitives)

Quick thoughts on how to implement

  • Update the Entity API to not require a an entityset as a param
  • move methods on Entity that require the entityset to EntitySet
  • Update dfs and calculate_feature_matrix to convert the a single entity into an entityset and then run as normal.
    • Maybe disable some arguments to dfs that don't make sense in the single table case
    • before implementing, we can discuss if we should just define a new methods instead of using DFS
  • It'd be cool if I could call normalize_entity on this entity object to then create a second entity and covert it into a entityset

We should also add a documentation guide outline how to use DFS with a single table. Right now we have answers on stackoverlow and the FAQ, but this question comes up frequently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs designIssues requiring design documentation.new featuresuggestions for new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions