cluestar-0.1.0
توضیحات
Gain a clue by clustering!
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cluestar-0.1.0 |
| نام | cluestar |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Vincent D. Warmerdam |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/koaning/cluestar/ |
| آدرس اینترنتی | https://pypi.org/project/cluestar/ |
| مجوز | - |
<img src="cluestar.png" width=175 align="right">
# cluestar
> Gain a clue by clustering!
This library contains visualisation tools that might help you
get started with classification tasks. The idea is that if you
can inspect clusters easily, you might gain a clue on what
good labels for your dataset might be!
It generates charts that looks like this:

## Install
```
python -m pip install "cluestar @ git+https://github.com/koaning/cluestar.git"
```
## Interactive Demo
You can see an interactive demo of the generated widgets [here](https://koaning.github.io/cluestar/).
You can also toy around with the demo notebook found [here](https://github.com/koaning/cluestar/blob/main/notebooks/overview.ipynb).
## Usage
The first step is to encode textdata in two dimensions, like below.
```python
from sklearn.pipeline import make_pipeline
from sklearn.decomposition import TruncatedSVD
from sklearn.feature_extraction.text import TfidfVectorizer
pipe = make_pipeline(TfidfVectorizer(), TruncatedSVD(n_components=2))
X = pipe.fit_transform(texts)
```
From here you can make an interactive chart via;
```python
from cluestar import plot_text
plot_text(X, texts)
```
The best results are likely found when you use
[umap](https://umap-learn.readthedocs.io/en/latest/)
together with something like
[universal sentence encoder](https://koaning.github.io/whatlies/api/language/universal_sentence/).
You might also improve the understandability by highlighting points
that have a certain word in it.
```python
plot_text(X, texts, color_words=["plastic", "voucher", "deliver"])
```
You can also use a numeric array, one that contains proba-values for prediction,
to influence the color.
```python
# First, get an array of pvals from some model
p_vals = some_model.predict(texts)[:, 0]
# Use these to assign pretty colors.
plot_text(X, texts, color_array=p_vals)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=4.0.1 | altair |
| >=1.19.2 | numpy |
| >=4.0.1 | altair |
| >=1.19.2 | numpy |
| >=4.0.1 | altair |
| >=1.19.2 | numpy |
| >=4.0.2 | pytest |
| >=19.3b0 | black |
| >=2.6.1 | pytest-cov |
| >=2.2.0 | pre-commit |
| - | umap-learn |
| - | jupyterlab |
نحوه نصب
نصب پکیج whl cluestar-0.1.0:
pip install cluestar-0.1.0.whl
نصب پکیج tar.gz cluestar-0.1.0:
pip install cluestar-0.1.0.tar.gz