Sparse columns
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Beginne mit der Prüfung der dataframe API specification und der verlinkten Referenzen zu pandas sparse-data, Arrow sparse-tensor und vaex interoperability. Ermittle, ob der Vorschlag eine definierte Repräsentation für Sparse-Spalten, fehlende Werte und Nullwerte enthält und ob er in die core specification oder eine optionale Erweiterung gehört. Als abgeschlossen gilt die Aufgabe, wenn die offenen Designfragen geklärt und in der specification dokumentiert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Should a dedicated API/column metadata to efficiently support sparse columns be part of the spec?
Context
It can be the case than a given column has more more than 99% of its values that are null or missing (or other repeated constant value) and therefore we would waste both memory and computation by using a dedicated memory representation that does not materialize explicitly these repeated values.
Use cases
- efficient computation: e.g. computing the mean and standard deviation of a sparse column with more then 99% of zeros
- efficient computation: e.g. computing the
nanmeanandnanstdof a sparse column with more then 99% are missing - some machine learning estimators have special treatments of sparse columns (e.g. for memory efficient representation of one-hot encoded categorical data), but often they could (in theory) be changed to handle categorical variables using a different representation if explicitly tagged as such.
Limitations
- treating sparsity at the single column levels can be limiting. some machine learning algorithms that leverage sparsity can only do so when considering many sparse columns together as a sparse matrix using a Compressed-Sparse-Rows (CSR) representation (e.g. logistic regression with non-coordinate-based gradient-based solvers (SGD, L-BFGS...) and kernel machines (support vector machines, Gaussian processes, kernel approximation methods...)
- other can leverage sparsity in a column-wise manner, typically by accepting Compressed Sparse Columns (CSC) data (e.g. coordinate descent solvers for the Lasso, random forests, gradient boosting trees...)
Survey of existing support
(incomplete, feel free to edit or comment)
- pandas' columns can efficiently handle sparse data
- arrow has sparse tensors but apparently those cannot be used to represent table columns
- vaex does have some interop capabilities with scipy.sparse matrices but I am not sure what is the sparse memory layout is preserved (maybe @maartenbreddels or @JovanVeljanoski can comment)
Questions:
- Should sparse datastructures be allowed to represent both missingness and nullness or only one of those? (I assume both would be useful as pandas does with the
fill_valueparam) - Should this be some kind of optional module / extension of the main dataframe API spec?
- Vorherrschende Sprache
- Python
- Sterne
- 106
- Forks
- 22
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus data-apis/dataframe-api
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
data-apis/dataframe-api#363 · 1 Kommentar · 8 Reaktionen ·
-
API design
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
data-apis/dataframe-api#356 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
data-apis/dataframe-api#355 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
data-apis/dataframe-api#352 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
data-apis/dataframe-api#351 ·
Alle Issues in data-apis/dataframe-api
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
aws-samples/sample-per-model-bedrock#243 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
FuRongJun-1999/dsh-memory#404 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
PennyLaneAI/catalyst#3337 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Workflow.schedule stops when a cron deadline passes before sleepEvtl. vergeben @HuaTNA hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag