Cohesion measurement to evaluate topic modeling score. call cohesion_df(df)
Project description
The Cohesion Pipeline
Given a division, Cohesion pipeline should give a cohesion score and recommend a suitable name for each group A suitable should suit each member of the group and be the tightest one (no entities in other groups suits the name), using inter and intra score
Installation
pip install cohesion-pipeline
Usage Example
The input to the cohesion_score functin must be a csv,txt,tsv file with a tab['\t'] seperator and must have 'label' and 'text' columns
import pandas as pd
from cohesion import cohesion_pipeline
data = {"text":
["we like to play football",
"I'm playing football better than neymar and cristano ronaldo",
'I like Fifa more than I like football, My Fav team is #RealMadrid Hala Madrid',
'Hamburger or Pizza? what would i choose? I will eat both of them, it so tasty!',
'banana pancakes with syrup maple, thats my favorite meal'],
'label':
[1, 1, 1, 2, 2]}
df = pd.DataFrame(data)
score, res = cohesion_pipeline.cohesion_df(df)
print("Cohesion Final score is", score)
print("Cohesion Topics are:", res)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cohesion_pipeline-0.1.2.tar.gz
.
File metadata
- Download URL: cohesion_pipeline-0.1.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30a5d05ccdc607a1bc9a88547eb28f137ea411eb605b470f0f8662e3c9ea79b |
|
MD5 | b00a15b679221f9377a555c9bec0961d |
|
BLAKE2b-256 | c2678fde738494fa697f0120bd0015ac65a037e978716b19f7a227416f71c114 |
Provenance
File details
Details for the file cohesion_pipeline-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: cohesion_pipeline-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607ca60f87e1a7c681e4b36d964d8bf5e774fe988402f3c5b15526ad12514729 |
|
MD5 | cd1273d17fe4fda36fe84fc319f9ecf1 |
|
BLAKE2b-256 | ff719f727ee3fe10719a23262b6edcb420b15177577be7b574aba9a92bf655d1 |