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
- Model Fitting: The
fit()method takes in a complete dataset and learns the underlying relationships between the features using a regularized least squares approach. - Prediction: The
predict()method takes in data with missing values (represented asNaNs) 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 datasetX. The matrixXshould 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 arrayz. The missing values should be represented asNaN, 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
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gibbs_reconstructor-1.2.3.tar.gz | 4.1 kB | Without provenance | Details for gibbs_reconstructor-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gibbs_reconstructor-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for gibbs_reconstructor-1.2.3-py3-none-any.whl |
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
|
Security for gibbs-reconstructor 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.