Coder Social home page Coder Social logo

mapreduce-knn's Introduction

MapReduce-KNN

K nearest neighbour implementation for Hadoop MapReduce

This is a java program designed to work with the MapReduce framework. In this example the K nearest neighbour classification method (supervised machine learning) is applied to some sample data about car types and buyer characteristics, so that it classifies a buyer with a likely car model.

Usage:

hadoop jar KnnPattern.jar KnnPattern /home/mhi/knn/CarOwners.csv /home/mhi/knn/res /home/mhi/knn/KnnParams.txt

KnnPattern.jar – the jar file containing the source code.

KnnPattern – the top level class in the program, containing the Mapper and Reducer classes and the main() method.

1st argument: /home/mhi/knn/CarOwners.csv – the location in HDFS of the data input file.

2nd argument: /home/mhi/knn/res – the output directory in HDFS.

3rd argument: /home/mhi/knn/KnnParams.txt - the location in HDFS of a parameter file with the following format:

K, Age, Income, Status, Gender, Children E.g. 5, 67, 16668, Single, Male, 3 Where K is the number of nearest neighbours to consider in the classification.

mapreduce-knn's People

Contributors

matt-hicks avatar

Stargazers

 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.