https://github.com/ivanvigor/local-fusion-dynamic-weighted-ensemble
This repository contains an implementation for the Dynamic Weighted Ensemble (DWE) - Local Fusion method. Local Fusion is an ensemble techinque that could be used to improve predictions by weighing appropriately the single models contribution.
https://github.com/ivanvigor/local-fusion-dynamic-weighted-ensemble
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: sciencedirect.com, ieee.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
Repository
This repository contains an implementation for the Dynamic Weighted Ensemble (DWE) - Local Fusion method. Local Fusion is an ensemble techinque that could be used to improve predictions by weighing appropriately the single models contribution.
Basic Info
Statistics
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Dynamic Weighted Ensemble - Local Fusion
This repository contains an implementation for the Dynamic Weighted Ensemble (DWE) - Local Fusion method. Find the paper in this ref on IEEE.
Local Fusion is an ensemble techinque that could be used to improve predictions by weighing appropriately the single models contribution.

Installation
```{r setup, include=FALSE}
pip install ensemblem
```
Docs - ReadTheDocs (UnderReview)
Usage
First of all, you need to define the KWEnsembler class. Next, it's required to provide the search-space (it could be the validation set / neighbours-set) in which the ensembler will find the nearest elements to the generic test sample.
{r setup, include=FALSE}
from ensemblem.model import KWEnsembler
ensemble = KWEnsembler(5)
ensemble.fit(X_validation, y_validation)
Finally, calling the prediction method the class will produce the forecasts.
{r setup, include=FALSE}
ensemble.predict(X_test,
features_space,
other_model_prediction_columns)
The class returns predictions in the same order in which they are provided. It supports one or multiple samples to forecasts. In this library, we refers to the neighbours-set as the space in which the ensembler will find the nearest elements to the generic test sample.
Example of using the KWEnsembler class
You can find a detailed tutorial in the readthedocs webpage.
- Load data
- Split data into train, neighbours-set and test sets
- Train multiple expert models on the train data
- Generate predictions for the test data
- Train the ensembler on neighbours-set
- Generate predictions for the test dataset using ensembler
- Compare the predictions from the ensembler with the predictions from the expert models
Results & Benchmarks
| | Model | MAPE | MAE | RMSE | RMSLE | |---:|:--------|---------:|---------:|----------:|---------:| | 0 | Ensemble | 0.304129 | 0.499381 | 0.0016118 | 0.211999 | | 1 | Tree 1 | 0.370919 | 0.593606 | 0.00755926 | 0.249373 | | 2 | Tree 2 | 0.319638 | 0.511249 | 0.00224047 | 0.225012 | | 3 | RidgeCV | 0.31537 | 0.531177 | 0.0131216 | 0.238018 |
Changelog
15-05-2023 [Fix] Renamed wrong paths
Credits
Algorithm Applications
A dynamic weighting ensemble approach for wind energy production prediction IEEE
An ensemble approach to sensor fault detection and signal reconstruction for nuclear system control Elsevier
Possible Improvements
[Code] Clean-code
[Engineering] When dealing with features coming with magnitude and different meaning, it's relevant to normalize values appropriately.
[Engineering] Additional measures to the simple euclidean-space
Licence
The code is provided with a MIT licence.
Owner
- Name: Ivan Vigorito
- Login: IvanVigor
- Kind: user
- Location: Milan, Italy
- Website: https://www.linkedin.com/in/ivan-vigorito/
- Repositories: 3
- Profile: https://github.com/IvanVigor
Data Scientist and Software Engineer. Creativity++
GitHub Events
Total
- Delete event: 3
Last Year
- Delete event: 3
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| IvanVigor | i****4@g****m | 62 |
| Ivan Vigorito | i****o@I****t | 20 |
| Ivan Vigorito | i****t@g****m | 12 |
| Ivan Vigorito | i****o@I****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 13
- Average time to close issues: N/A
- Average time to close pull requests: 1 minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- IvanVigor (14)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 27 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 12
- Total maintainers: 1
pypi.org: ensemblem
Dynamic Weighted Ensemble - Local Fusion
- Homepage: https://github.com/IvanVigor/Dynamic-Weighted-Ensemble
- Documentation: https://ensemblem.readthedocs.io/
- License: MIT License
-
Latest release: 0.3.5
published almost 3 years ago
Rankings
Maintainers (1)
Dependencies
- numpy ==1.23.3
- pandas ==1.5.0
- scikit_learn ==1.1.2