-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
bugSomething isn't workingSomething isn't workingprocessorsInvolves self-contained analyticalprocessors.Involves self-contained analyticalprocessors.
Description
The 'Filter by value' processor in 4CAT has an 'is in the top n results for this attribute' mode which, for example, returns the top 100 items from a dataset sorted by a given column, e.g. likes.
It does this by getting the top 100 values for that column and returning all items with that value, but if (for example) multiple items have the same amount of plays, it will select all of those. So potentially more than 100 matching items are returned.
The naive solution would be return sorted(items, reverse=True)[:100] but sorted() happens in-memory, and that should be avoided for this to also work with (very) large datasets.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingprocessorsInvolves self-contained analyticalprocessors.Involves self-contained analyticalprocessors.