Skip to main content

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

cohesion_pipeline-0.1.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

cohesion_pipeline-0.1.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file cohesion_pipeline-0.1.1.tar.gz.

File metadata

  • Download URL: cohesion_pipeline-0.1.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for cohesion_pipeline-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5ed89185d72e5c8cd19d3d82db119a49d1e08a091948501f78325721ea5aa62a
MD5 44f3041c129002f27614443ca34e633f
BLAKE2b-256 5bdb2b35fde5bb9211a37f0e5eb475d2def9de886556c47a17ba4420058f80fe

See more details on using hashes here.

Provenance

File details

Details for the file cohesion_pipeline-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cohesion_pipeline-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f0c5647bd8e6fac78ffb7bffcca16f78da051aaefce0167e936086acec717b
MD5 3abb5909123743f6c07324155b93cb40
BLAKE2b-256 ed7d0c30baf03c84a0b58f1b8742c736758fd2f3ee7fe9c22137a89d8d73bf20

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page