vccs
Vue 3용 차트 컴포넌트 모음, Recharts에서 포팅
표 데이터 행을 저차원 벡터로 변환하는 파이썬 라이브러리, 신경망·고전 방법을 하나의 인터페이스에 제공
A Python library that turns the rows of any tabular dataset into low-dimensional numeric vectors, with neural and classical methods behind one interface.
데이터Python · HTMLGitHub @tresoldi온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기A Python library for easily generating low-dimensional vector embeddings from tabular datasets
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Turn table rows into vectors.
Row2Vec takes a DataFrame whose columns are a mix of numbers, categories, and
missing values, and returns one dense numeric vector per row. The scaling,
encoding, and imputation are handled for you, and both neural and classical
methods sit behind the same call.README 전문 보기 ↗Turn table rows into vectors.
Row2Vec takes a DataFrame whose columns are a mix of numbers, categories, and
missing values, and returns one dense numeric vector per row. The scaling,
encoding, and imputation are handled for you, and both neural and classical
methods sit behind the same call.
import row2vec
df = row2vec.generate_synthetic_data(200) # mixed numeric + categorical columns
embeddings = row2vec.learn_embedding(df, mode="pca", embedding_dim=3)
assert embeddings.shape == (200, 3) # one row in, one vector out
That is the whole point: everything downstream of a table — clustering, nearest-neighbour lookup, a scatter plot, a feature for another model — presupposes that rows are already points in a metric space. Getting them there usually means a hand-rolled pipeline of encoders, scalers, and imputers. Row2Vec is that pipeline, with several well-tested ways to do the projection itself behind one consistent interface.
pip install row2vec # PCA, t-SNE, UMAP
pip install "row2vec[neural]" # adds the autoencoder, target and contrastive modes (TensorFlow)
The default install is light and has no TensorFlow. The neural modes
(unsupervised, target, contrastive), architecture search, and entity
embeddings for very high-cardinality columns need the neural extra; asking for
one without it raises an error that says so.
One function does the work. Swapping methods means changing mode; the call
site never changes.
import row2vec
df = row2vec.generate_synthetic_data(150)
pca = row2vec.learn_embedding(df, mode="pca", embedding_dim=2)
tsne = row2vec.learn_embedding(df, mode="tsne", embedding_dim=2, perplexity=10)
assert pca.shape == tsne.shape == (150, 2)
assert list(pca.index) == list(df.index) # aligned with the input frame
The result is a DataFrame of the same length as the input, sharing its index,
with one column per embedding dimension — so it joins straight back onto the
original data.
A trained model can be saved with its preprocessing pipeline and reloaded to embed new rows the same way:
import tempfile
from pathlib import Path
import row2vec
df = row2vec.generate_synthetic_data(100)
base = Path(tempfile.mkdtemp()) / "model"
embeddings, saved = row2vec.train_and_save_model(
df, base_path=str(base), mode="pca", embedding_dim=2
)
# One .r2v file. Loading it runs no code from the file; see SECURITY.md.
model = row2vec.load_model(saved)
# The reloaded model reproduces what training returned, scaling included.
assert model.predict(df).shape == embeddings.shape
| Mode | Use it for | Key parameter |
|---|---|---|
pca | a fast linear baseline with interpretable components | embedding_dim |
unsupervised | non-linear structure, via an autoencoder | hidden_units, max_epochs |
tsne | 2-D/3-D plots that show local structure and clusters | perplexity |
umap | preserving local and global structure | n_neighbors, min_dist |
target | supervision from a label column; aggregate_by_reference=True for one vector per category | reference_column |
contrastive | supervision from pairs known to be alike or unalike | auto_pairs, margin |
Start with pca. It costs nothing to run and tells you whether the structure
you are after is linear; if it isn't, unsupervised is the next step.
AdaptiveImputer).minmax, standard, l2, tanh). The scaler is
kept with the model, so a saved model reproduces its training output.compare_modes(df, target=...) fits several modes on
the same rows and scores them on held-out rows (neighbourhood preservation
and, given a target, a downstream score), next to a no-embedding baseline.search_architecture,
auto_select_dimension).A command-line interface for batch work:
row2vec annotate --input data.csv --output embeddings.csv --mode pca --dim 5
row2vec train --input data.csv --output model.py --mode unsupervised --dim 10
row2vec predict --input new.csv --model model.py --output predictions.csv
A scikit-learn transformer and classifier (Row2VecTransformer,
Row2VecClassifier) for use inside a Pipeline, and a pandas accessor
(df.row2vec.pca(dim=2)) for quick interactive work.
py.typed), strict linting
and type-checking, and a test suite run across Python 3.11–3.13 on Linux,
macOS, and Windows. Every example in this README and in the User Guide is
executed by that suite.If you use Row2Vec in academic research, please cite:
@software{tresoldi_row2vec_2026,
author = {Tresoldi, Tiago},
title = {Row2Vec: Neural and classical embeddings for tabular data},
url = {https://github.com/tresoldi/row2vec},
version = {0.2.0},
year = {2026}
}
This library was originally developed as part of the "Cultural Evolution of Texts" project, led by Michael Dunn at the Department of Linguistics and Philology, Uppsala University.
MIT — see LICENSE.