Git Product home page Git Product logo

scikit-hyper's Introduction

scikit-hyper

Build Status Documentation Status Python Version 3.5 Python Version 3.6 PyPI version

Machine learning for hyperspectral data in Python

  • Simple tools for exploratory analysis of hyperspectral data
  • Built on numpy, scipy, matplotlib and scikit-learn
  • Simple to use, syntax similar to scikit-learn

Contents

  1. About
  2. Installation
  3. Features
  4. Examples
  5. Documentation
  6. License

About

This package builds upon the popular scikit-learn to provide an interface for performing machine learning on hyperspectral data. Many of the commonly used techniques in the analysis of hyperspectral data (PCA, ICA, clustering and classification) have been implemented and more will be added in the future.

scikit-hyper also provides two features which aim to make exploratory analysis easier:

  • Process object (skhyper.process.Process)

    This class forms the core of scikit-hyper. It provides useful information about the hyperspectral data and makes machine learning on the data simple.

  • Interactive hyperspectral viewer

    A lightweight pyqt gui that provides an interative interface to view the hyperspectral data.

Please note that this package is currently in pre-release. The first general release will be v0.1.0

Installation

To install using pip:

pip install scikit-hyper

The following packages are required:

  • numpy
  • scipy
  • scikit-learn
  • matplotlib
  • seaborn
  • PyQt5
  • pyqtgraph

Features

Features implemented in scikit-hyper include:

Examples

Hyperspectral denoising

import numpy as np
from skhyper.process import Process
from skhyper.decomposition import PCA

# Generating a random 4-d dataset and creating a Process instance
test_data = np.random.rand(200, 200, 10, 1024)
X = Process(test_data, scale=True)

# To denoise the dataset using PCA:
# First we fit the PCA model to the data, and then fit_transform()
# All the usual scikit-learn parameters are available
mdl = PCA()
mdl.fit_transform(X)

# The scree plot can be accessed by:
mdl.plot_statistics()

# Choosing the number of components to keep, we project back 
# into the original space:
Xd = mdl.inverse_transform(n_components=200)

# Xd is another instance of Process, which contains the new
# denoised hyperspectral data

Hyperspectral clustering

import numpy as np
from skhyper.process import Process
from skhyper.cluster import KMeans

# Generating a random 3-d dataset and creating a Process instance
test_data = np.random.rand(200, 200, 1024)
X = Process(test_data, scale=True)

# Again, all the usual scikit-learn parameters are available
mdl = KMeans(n_clusters=4)
mdl.fit(X)

# The outputs are:
# mdl.labels_  (a 2d/3d image with n_clusters number of labels)
# mdl.image_components_  (a list of n_clusters number of image arrays)
# mdl.spec_components_  (a list of n_clusters number of spectral arrays)

Documentation

The docs are hosted here.

The package API includes documentation from the scikit-learn modules where the particular module is wrapped around the scikit-learn version.

License

scikit-hyper is licensed under the OSI approved BSD 3-Clause License.

scikit-hyper's People

Contributors

priyankshah7 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.