Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marta-barea/visnir-paraffinwax-hydroprocessing-ml
Repository for analyzing paraffin wax using Vis-NIR and machine learning techniques to assess hydroprocessing.
https://github.com/marta-barea/visnir-paraffinwax-hydroprocessing-ml
chemoinformatics machine-learning petroleum r rstudio vis-nir-spectroscopy
Last synced: 21 days ago
JSON representation
Repository for analyzing paraffin wax using Vis-NIR and machine learning techniques to assess hydroprocessing.
- Host: GitHub
- URL: https://github.com/marta-barea/visnir-paraffinwax-hydroprocessing-ml
- Owner: Marta-Barea
- License: gpl-3.0
- Created: 2024-11-20T13:46:59.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-20T17:11:11.000Z (about 1 month ago)
- Last Synced: 2024-11-20T17:42:47.113Z (about 1 month ago)
- Topics: chemoinformatics, machine-learning, petroleum, r, rstudio, vis-nir-spectroscopy
- Language: R
- Homepage:
- Size: 11 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **Vis-NIRS Wax Analysis Scripts**
This repository contains a suite of R scripts and a Shiny web application for analyzing wax samples using Visible-Near Infrared (Vis-NIR) spectroscopy. These tools include preprocessing, classification, clustering, and dimensionality reduction methods tailored to study the effects of hydroprocessing on waxes.
---
## π **Overview of Scripts**
1. **Spectra_VisNIRS_Waxes_Type.R**
- Prepares Vis-NIR spectral data for analysis using smoothing, normalization, and scatter correction.2. **Gaussian_SVM_VisNIRS_Waxes_HT.R**
- Implements Gaussian Support Vector Machine (SVM) models to classify hydroprocessing grades.3. **RF_VisNIRS_Waxes_HT.R**
- Applies Random Forest classification to determine wax hydroprocessing levels.4. **HCA_VisNIRS_Waxes_HIFI.R**
- Performs Hierarchical Cluster Analysis (HCA) with dendrogram visualizations to group wax samples.5. **PCA_VisNIRS_Waxes_HIFI.R**
- Conducts Principal Component Analysis (PCA) and visualizes eigenvalues, scores, and loadings.6. **app.R**
- A Shiny application for uploading, preprocessing, visualizing, and classifying wax data.---
## π οΈ **System Requirements**
### Software
- **R version 4.4.0** (2024-04-24, "Puppy Cup")
- RStudio (optional but recommended)### R Packages and Versions
| **Task** | **Package** | **Version** |
|------------------------------------|---------------------|---------------|
| Spectral preprocessing | `prospectr` | 0.2.7 |
| Clustering (HCA) | `stats` | 4.4.0 |
| Dendrogram visualization | `factoextra` | 1.0.7 |
| PCA | `stats` | 4.4.0 |
| PCA visualization | `factoextra` | 1.0.7 |
| Machine learning (SVM, RF) | `caret` | 6.0-94 |
| Random Forest models | `ranger` | 0.17.0 |
| Data manipulation | `dplyr`, `data.table`, `stringr` | 1.1.4, 1.16.2, 1.5.1 |
| Radar charts | `ggplot2`, `ggiraphExtra` | 3.5.1, 0.3.0 |
| Visualization | `ggplot2`, `viridis`, `egg` | 3.5.1, 0.6.5, 0.4.5 |
| Web application | `shiny` | 1.9.1 |
| Web themes | `shinythemes` | 1.2.0 |---
## π **How to Use**
### Running Scripts
1. Open the R script in RStudio.
2. Update file paths and parameters as needed.
3. Run the script to analyze wax data.### Running the Shiny Application
1. Place `app.R`, `weighted_rf.rds`, and `test_data.xlsx` in the same folder.
2. In your R console, run:
```R
shiny::runApp("app.R") ```3. Use the web interface to:
- π **Upload** `.csv` or `.xlsx` data files.
- π οΈ **Preprocess** data using advanced filtering techniques.
- π€ **Predict** hydroprocessing grades with AI.---
### π **Example Dataset**
A sample dataset (`test_data.xlsx`) is included for demonstration purposes. It contains Vis-NIR spectral readings and hydroprocessing grades for various wax samples.---
### β¨ **Features**
- **Preprocessing**: SavitzkyβGolay smoothing and scatter correction.
- **Clustering**: HCA with dendrogram visualization.
- **Dimensionality Reduction**: PCA with eigenvalues, score, and loading plots.
- **Machine Learning**: SVM and Random Forest models for hydroprocessing classification.
- **Web Application**: Intuitive Shiny interface for non-technical users.---
### π€ **Contributors**
- **Nebux Cloud, S.L.**
- Experts in AI-driven data analysis solutions.
- **University of CΓ‘diz (AGR-291 Research Group)**
- Specializing in hydrocarbon characterization and spectroscopy.---
### π **License**
This project is licensed under the GNU GENERAL PUBLIC License. See `LICENSE` for details.