Skip to main content

A collection of interpolation methods.

Project description

example workflow

Polire

The word "interpolation" has Latin origin and is composed of two words - Inter meaning between and Polire meaning to polish.

This repository is a collection of several spatial interpolation algorithms.

Examples

Minimal example of interpolation

import numpy as np
from polire import Kriging

# Data
X = np.random.rand(10, 2) # Spatial 2D points
y = np.random.rand(10) # Observations
X_new = np.random.rand(100, 2) # New spatial points

# Fit
model = Kriging()
model.fit(X, y)

# Predict
y_new = model.predict(X_new)

Supported Interpolation Methods

from polire import (
    Kriging, # Best spatial unbiased predictor
    GP, # Gaussian process interpolator from GPy
    IDW, # Inverse distance weighting
    SpatialAverage,
    Spline,
    Trend,
    Random, # Predict uniformly within the observation range, a reasonable baseline
    NaturalNeighbor,
    CustomInterpolator # Supports any regressor from Scikit-learn
)

Use GP kernels from GPy and regressors from sklearn

from sklearn.linear_model import LinearRegression # or any Scikit-learn regressor
from GPy.kern import Matern32 # or any other GPy kernel

from polire import GP, CustomInterpolator

# GP model
model = GP(Matern32(input_dim=2))

# Sklearn model
model = CustomInterpolator(LinearRegression(normalize = True))

More info

Contributors: S Deepak Narayanan, Zeel B Patel, Apoorv Agnihotri, and Nipun Batra.

This project is a part of Sustainability Lab at IIT Gandhinagar.

Acknowledgement to sklearn template for helping to package into a PiPy package.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for polire, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size polire-0.1.3-py3.8.egg (58.0 kB) File type Egg Python version 0.1.3 Upload date Hashes View
Filename, size polire-0.1.3-py3-none-any.whl (26.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size polire-0.1.3.tar.gz (20.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page