Sparse columns
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia esaminando la dataframe API specification e i riferimenti collegati sull'interoperabilità di pandas sparse-data, Arrow sparse-tensor e vaex. Determina se la proposta definisce una rappresentazione per le colonne sparse, i valori mancanti e i valori null, e se debba rientrare nella core specification o in un'estensione opzionale. Il lavoro è completato quando le questioni di progettazione aperte sono risolte e documentate nella specification.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- Python
- Stelle
- 106
- Fork
- 22
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di data-apis/dataframe-api
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#363 · 1 commento · 8 reazioni ·
-
Row ordering design choiceApertaAPI design
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#356 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
data-apis/dataframe-api#355 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#352 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#351 ·
Tutte le issue di data-apis/dataframe-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
onyx-dot-app/onyx#16016 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
black --check exits 0 and prints All done when a multi file run is interruptedForse già presa @jiteshgulati l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Non-positive worker counts wait for results without starting workersForse già presa @IlyaKhalafi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno