Giter VIP home page Giter VIP logo

simple-hac's Introduction

simple-hac

A simple hierarchical agglomerative clustering implementation in Clojure. This is not industrial strength or performant.

While the clustering is generalized to sparse vectors (represented as maps), the executable is built to cluster text documents. Tokenization is naive, no stemming. This implementation supports several variants, including single link, complete link, centroid, medoid, and average link clustering.

Usage

$ java -jar simple-hac-0.1.0-standalone.jar [args]

Options

["-f" "--file"]

Defines the input file to use, one line per document

["-i" "--idf-file"]

Defines an external idf file, with each line containing a whitespace separated term and weight

["-d" "--documentkey"]

Indicates the first token on a line is the identifier of the document, otherwise they are numbered

["-c" "--complete-link"]

Output complete link clustering

["-s" "--single-link"]

Output single link clustering

["-a" "--average-link"]

Output average link clustering

["-x" "--centroid-link"]

Output centroid link clustering

["-m" "--medoid-link"]

Output medoid link clustering (nearest neighbor to centroid)

["-t" "--similarity-threshold"]

To limit the clustering to a similarity threshold

["-v" "--verbose"]

Verbose loggin

Examples

-f "./my_corpus.txt" -i "./my_idf.txt" -c -a -t 0.01 -d 

Using the file my_corpus.txt and idf my_idf.txt, output clusterings with complete link and average link strategies, stopping clustering at a similarity threshold of 0.01. The first token in each document is an identifier.

License

Copyright © 2013 Shayne Studdard

Distributed under the Eclipse Public License, the same as Clojure.

simple-hac's People

Contributors

sstuddard avatar

Stargazers

Sungjin Chun avatar  avatar

Watchers

 avatar

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.