Skip to main content

Gibbs Reconstructor

The GibbsReconstructor is a Python class designed to perform reconstruction of missing values in partially deleted signals, images, or sequences. It uses a regularized approach based on Gibbs sampling methods to estimate missing entries, making it ideal for scenarios where data might be incomplete or corrupted. This approach is particularly useful for tasks such as image inpainting, signal reconstruction, and sequence completion.

Features

  • Reconstruction of Missing Data: Fills in missing values (NaNs) in partially observed data matrices.
  • Gibbs Sampling: Uses an exact Gibbs sampling approach to estimate missing values based on the observed data.
  • Ridge Regularization: Supports ridge regularization to avoid overfitting during reconstruction.
  • Flexible Application: Can be used for signals, sequences, images, or any dataset where partial data is available.

Use Cases

  • Signal Completion: Recover deleted or corrupted sections of time-series signals.
  • Image Inpainting: Fill in missing pixels in images, making it useful for tasks like repairing damaged images or handling incomplete image data.
  • Sequence Reconstruction: Complete sequences with missing or corrupted values, useful for various predictive modeling tasks in data science.

How It Works

  1. Model Fitting: The fit() method takes in a complete dataset and learns the underlying relationships between the features using a regularized least squares approach.
  2. Prediction: The predict() method takes in data with missing values (represented as NaNs) and reconstructs those missing entries by leveraging the learned relationships. This method uses Gibbs sampling technique to estimate the missing values.

Attributes

  • alpha: A regularization parameter used for controlling the strength of ridge regression. It helps prevent overfitting during the reconstruction process.

Methods

  • fit(X): Fits the GibbsReconstructor model on the given dataset X. The matrix X should be fully observed (i.e., no missing values) and is used to learn the underlying structure of the data.

  • predict(z): Predicts the missing values in the input array z. The missing values should be represented as NaN, and the method will return the input array with the missing values reconstructed.

Installation

To use GibbsReconstructor, ensure you have the required dependencies installed:

pip install numpy tqdm

Release files for gibbs-reconstructor 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gibbs-reconstructor 1.2.3
File Size Uploaded
gibbs_reconstructor-1.2.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gibbs-reconstructor 1.2.3
File Interpreter ABI Platform
gibbs_reconstructor-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / gibbs_reconstructor-1.2.3.tar.gz

Download URL gibbs_reconstructor-1.2.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
66844792a3388ad01fdf928b8050d065cb2941e02781f7d15ab787bbdb6020d2
BLAKE2b-256 checksum
How to use checksums
e29d41835523dea2e1e555d984c9920283e1c578ad51c9950111a1a2f7a4d455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / gibbs_reconstructor-1.2.3-py3-none-any.whl

Download URL gibbs_reconstructor-1.2.3-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
601d88bdc42e309c38b7f3065b506a70548d34f206ba19721e6759c8d527ae5e
BLAKE2b-256 checksum
How to use checksums
e4b4c525e70d9b7b74f4a4073d10848dfbb6a9fefac69d9d1d6aa6c73f37b63f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

1 release file

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page