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

Refine feature selection scope #87

Open
amirrr opened this issue Aug 20, 2024 · 1 comment
Open

Refine feature selection scope #87

amirrr opened this issue Aug 20, 2024 · 1 comment
Assignees

Comments

@amirrr
Copy link
Collaborator

amirrr commented Aug 20, 2024

Internal representation

[{'name': 'paper', 'children': ['title', 'experiments']}]
[{'name': "experiments", 'children': ['name', 'description', 'conditions']}]
[{'name': "conditions", 'children': ['name', 'description', 'type', 'message', 'behaviors']}]
[{'name': "behaviors", 'children': ['name', 'description', 'priority', 'focal']}]

GPT response:

{
  title: 'something',
  experiments: [
    {
      adults: '--',
      age_mean: '--',
      age_sd: '--',
      compensation: '--',
      conditions: [
        {
          description: '--',
          message: '--',
          name: '--',
          type: '--',
          behaviors: [
            {
              description: '--',
              focal: '--',
              name: '--',
              priority: '--',
            },
          ],
        },
      ],
      description: '--',
      name: '--',
    },
  ],
}
@markwhiting
Copy link
Member

markwhiting commented Sep 24, 2024

Assuming a flat array of features that include at least name and parent:

  1. get the parents and their order (parent's parent > parent) so we can render the buttons for selecting which parents to summarize.
  2. Expand all features that are children of a selected parent.
  3. Summarize all features that are children of a unselected parents by showing the count of unique rows if their parent was expanded.

This returns:

  1. An array of parents to be used as buttons
  2. An array of features ordered by parents with a new property summarized.

Then, compute how each row should appear in the table based on that.

  1. Parents above expanded children should be summarized by showing the name feature of the parent level, e.g., conditions.map(condition => condition.name).
  2. Parents below the last expanded parent should appear as a number showing how many rows would appear if that parent were expanded, e.g. behaviors.length

@amirrr amirrr self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants