Comments (2)
Here is a script to generate the files in question:
import pathlib
import tempfile
import pandas as pd
from skrub.datasets._ken_embeddings import (
fetch_ken_embeddings,
fetch_ken_table_aliases,
_correspondence_table_url,
fetch_figshare,
)
out_dir = pathlib.Path(tempfile.mkdtemp(suffix="_ken_types"))
print(f"storing types in {out_dir}")
type(out_dir)
aliases = fetch_ken_table_aliases()
correspondence = pd.read_csv(_correspondence_table_url)
embedding_type_id = correspondence["type_figshare_id"].values[0]
emb_type = fetch_figshare(embedding_type_id).X
for table_name in aliases:
print(table_name)
entities = fetch_ken_embeddings(embedding_table_id=table_name)["Entity"].apply("<{}>".format)
table_types = emb_type.merge(entities, on="Entity")
table_types.to_parquet(out_dir / f"{table_name}.parquet", index=False)
print(f"embedding types are in {out_dir}")
from skrub.
there are still improvements we can do for the ken embeddings but the specific one suggested here has been applied in skrub-data/datasets#10 and circleci is now passing again so I'll close this issue
from skrub.
Related Issues (20)
- incorrect github action matrix description
- Failing fetch ken embeddings test HOT 2
- Should accept pipelines and transformers HOT 1
- TableVectorizer raises when a categorical column contains `pd.NA` HOT 1
- Add features to the `DatetimeEncoder` HOT 16
- Hacky Idea: ifelse in a pipeline HOT 10
- Scikit-learn v1.5 breaks skrub HOT 4
- `drop_nulls` and `is_null` have a different behavior for polars and pandas HOT 1
- Follow-ups after #902
- GapEncoder and MinHashEncoder modify their input inplace HOT 2
- adding `make_learner` to create a default pipeline for a given predictor
- Shorthand for getting only the preprocessing part of the TableVectorizer HOT 2
- AggJoiner raises exceptions when trying to join multiple tables at once HOT 5
- Faster alternative to GapEncoder HOT 1
- Display columns with the HTML representation of the fitted TableVectorizer
- `fetch_ken_embeddings` does not use `suffix` with default parameter HOT 1
- `SingleColumnTransformer`s don't work with `ColumnTransformer` HOT 4
- Port from sckikit-learn the positioning of the example buttons on downloading, jupyter-lite...
- Jupyter-lite picks up old versions of the examples? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skrub.