Giter Site home page Giter Site logo

bdutta19 / bayseg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cgre-aachen/bayseg

0.0 2.0 0.0 63.46 MB

An unsupervised machine learning algorithm for the segmentation of spatial data sets.

License: GNU Lesser General Public License v3.0

Python 0.51% MATLAB 0.31% M 0.01% Mathematica 0.06% Jupyter Notebook 99.12%

bayseg's Introduction

BaySeg

Easy-to-use unsupervised spatial segmentation in Python.

License: LGPL v3 Python 3.6.x Build Status

Contents

Introduction

A Python library for unsupervised clustering of n-dimensional datasets, designed for the segmentation of one-, two- and three-dimensional data in the field of geological modeling and geophysics. The library is based on the algorithm developed by Wang et al., 2017 and combines Hidden Markov Random Fields with Gaussian Mixture Models in a Bayesian inference framework. It currently supports one physical dimension and is in an early development stage, but we are working tirelessly on increasing its efficiency, ease of use and expanding the implementation to two and three physical dimensions.

Examples

1D: Segmentation of geophysical well log data

alt text

(Above well log data used from machine learning contest of Hall, 2016)

2D: Combined segmentation of geophysical and remote sensing data

You can try out how BaySeg segments 2D data sets by using an interactive Jupyter Notebook in your own web browser, enabled by Binder:

Binder

Installation

As the library is still in early development, the current way to install it is to clone this repository and then import it manually to your projects. We plan to provide convenient installation using PyPi in the future.

Dependencies

BaySeg depends on several genius components of the Python eco-system:

  • numpy for efficient numerical implementation
  • scikit-learn for mixture models
  • scipy for its statistical functionality
  • matplotlib for plotting
  • tqdm provides convenient progress meters

Cloning directly from GitHub

First clone the repository using the command (or by manually downloading the zip file from the GitHub page)

git clone https://github.com/cgre-aachen/bayseg.git

then append the path to the repository:

import sys
sys.path.append("path/to/cloned/repository/bayseg")

to import the module:

import bayseg

Getting Started

Instantiate the classifier with the n-dimensional array storing the data and the number of labels:

clf = bayseg.BaySeg(data_ndarray, n_labels)

Then use the fit() method to classify your data with your desired number of iterations:

clf.fit(n_iter)

References

  • Wang, H., Wellmann, J. F., Li, Z., Wang, X., & Liang, R. Y. (2017). A Segmentation Approach for Stochastic Geological Modeling Using Hidden Markov Random Fields. Mathematical Geosciences, 49(2), 145-177.
  • Hall, B. (2016). Facies classification using machine learning. The Leading Edge, 35(10), 906-909.

Contact

The library is being developed by Alexander Schaaf and Hui Wang from the LuF Computational Geoscience and Reservoir Engineering (CGRE) and the Aachen Institute for Advanced Study in Computational Engineering Science (AICES) at RWTH Aachen University.

bayseg's People

Contributors

hwang051785 avatar flohorovicic avatar

Watchers

James Cloos avatar Bhaskar Dutta 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.