GithubHelp home page GithubHelp logo

krishnapriyavarrier / modified_adsorption Goto Github PK

View Code? Open in Web Editor NEW

This project forked from psorianom/modified_adsorption

0.0 1.0 0.0 140 KB

Python implementation of the random-walk inductive classification algorithm Modified Adsorption from P. Talukdar

Python 100.00%

modified_adsorption's Introduction

Modified Adsorption: Python Implementation

This project implements P. Talukdar's Modified Adsorption (MAD) label propagation algorithm. MAD is a graph semi-supervised learning model. As such it uses a small number of seeds to determine the class. It is transductive, it assigns classes to the already existent dataset. It does not assign classes to new, unseen instances.

Project Setup

The module includes a simple class implementing the MAD algorithm. A graph file is needed, graph_file, and a seed_file, containing the minimum set of initial labeled items. They must be in a tab separated format: NodeA, NodeB, LinkWeight. For example, the graph_file should be like this:

N1	N2	0.18

For the seed_file, a Node, a Label and a Weight (indicating the strength of the label class):

N1	L1	1.0
N4	L2	1.0

Then, it suffices to call the MAD constructor:

mad = ModifiedAdsorption(graph_file, seed_file)

Calculate the modified adsorption:

mad.calculate_mad()

And finally, get the results:

mad.results()

Notes

The code is not thoroughly tested, the matrices are not checked for special considerations neither at the beginning of the process, neither at the iterative steps.

I am sure it could be made faster and more memory efficient. I have tested it with around 10k nodes and it took around 1hr to converge. I need to perform more experiments, specially take time to run these datasets: http://www.talukdar.net/datasets/class_inst/

References

Partha Pratim Talukdar and Koby Crammer. 2009. New Regularized Algorithms for Transductive Learning. In Proceedings of the European Conference on Machine Learning and Knowledge Discovery in Databases: Part II (ECML PKDD '09), Wray Buntine, Marko Grobelnik, Dunja Mladenić, and John Shawe-Taylor (Eds.). Springer-Verlag, Berlin, Heidelberg, 442-457. DOI=10.1007/978-3-642-04174-7_29 http://dx.doi.org/10.1007/978-3-642-04174-7\_29

License

Apache v2

modified_adsorption's People

Contributors

psorianom avatar

Watchers

James Cloos 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.