Git Product home page Git Product logo

sc-ml-guide's Introduction

Spatial Current Machine Learning Guide (sc-ml-guide)

Description

A guide for machine learning with Internet-scale geospatial data. This guide includes information on classifiers and training datasets for parsing and understanding large geospatial datsets, including OpenStreetMap.

NLTK

Many of the examples in this guide use the Python Natural Language Toolkit (NLTK) for machine learning tasks.

Contributing

Spatial Current, Inc. is currently accepting pull requests for this repository. We'd love to have your contributions! Please see Contributing.md for how to get started.

License

This work is distributed under the MIT License. See LICENSE file.

Guide

This guide includes a list of classifiers and how they can be used.

Naive Bayes Classifier

A naive Bayes classifier can be used for simple categorizing of a set of documents. A simple use case is using 2 related attributes of geospatial features to fill in sparse data, e.g., type of cuisine.

Setup

For python, Python Natural Language Toolkit (NLTK) is a great tool that has a naive Bayes classifier. See Chapter 6, Section 1.3 of the Natural Language Processing with Python online book.

For Java, see the Java-Naive-Bayes-Classifier, including the runnable example.

Workflow

Below is a sample workflow with some pseudo-code.

  • Collect training dataset, e.g., OSM extract or Spatial Current SGOL query.
  • Generate frequency distribution of words
  • Create vocabulary (select top N most common words from the frequency distribution)
  • For each document in a training dataset, convert into a series of binary contains(<word>) features
  • Train dataset
  • Convert input into document
  • Classify document, e.g., category = classifier.classify(convert(document)).

Data

See the data.yml file in /data/naive-bayes-classifier folder for bootstrapping a classifier to guess the cuisine of a point of interest, based on the name.

Training Datasets

osm_name_cuisine.csv

This dataset includes a list of amenities in Washington, DC and Virginia that have name= and cuisine= tags.

sc-ml-guide's People

Contributors

pjdufour avatar

Stargazers

Vijay Gandhi avatar

Watchers

James Cloos avatar  avatar

sc-ml-guide's Issues

CLA

I, Patrick Dufour (@pjdufour), agree to the license terms. My contributions to this repo are granted to Spatial Current, Inc. under a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license and/or copyright is transferred.

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.