Giter Club home page Giter Club logo

tm_metrics's Introduction

Topic Modeling Quality Metrics

This repository contains a Python 3 implementation of topic modeling quality metrics. All metrics are based on the Topic Quality Metrics Based on Distributed Word Representations paper. There are implementations of the following metrics: Coherence, TFIDF-Coherence, PMI/NPMI, LCP and Word2Vec metrics (Cosine Distance, L1 Distance, L2 Distance, Coordinate Distance).

With this metrics you can measure the quality of the topics generated by any topic modeling approach, all that you need is the documents used to generate the topics. For the Word2Vec metrics you'll also need a Word Embedding to extract the vectors.

Installing

Clone this repository in your machine and execute the installation with pip.

Dependencies

In following he've the packages needed in the library:

  • numpy>=1.14.6
  • scikit-learn>=0.20.3
  • scipy>=1.2.1
  • gensim>=3.8.1

User Installation

You can install the tm_metric library with pip:

pip install -U .

Jupyter Example

In the Exemple of Quality Metrics in the 20 News Group Dataset we have a example with the usage of the package (tm_metrics).

In the notebook we use the 20 News Group dataset and the NMF (for topic modeling). We also use the gensim to create a Word Embedding, that is necessary to the Word2Vec metrics.

In the notebook we can see the evaluation of the topics generated, where we use each metric implemented by the tm_metrics package.

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

tm_metrics's People

Contributors

christianrfg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jon-chun chaai20

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.