Skip to content

Pranq-lgtm/HydroSpark-ML-Quest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•―οΈ HydroSpark: Physics-Driven Burn Rate Prediction

Overview

This project was developed for the HydroSpark ML Quest, a challenge centered on predicting the exact time a burning candle will extinguish. Unlike standard "black-box" ML approaches, this repository utilizes Physical Logicβ€”specifically fluid dynamics and thermodynamicsβ€”to engineer features that make predictions more stable and explainable.

🧠 The Methodology: Why Volume Matters

A common pitfall in candle modeling is focusing solely on the vertical height drop. However, height change is dependent on the candle's diameter. To create a robust model, we shifted the focus to Volumetric Burn Rate ($dV/dt$).

  1. Feature Engineering: We calculate the cross-sectional area ($A$) using the diameter ($d$): $$A = \pi \cdot \left(\frac{d}{2}\right)^2$$
  2. Universal Metric: We convert height measurements into Volume Consumed ($V_c$): $$V_c = A \cdot (H_{initial} - H_{current})$$
  3. Modeling: We apply Linear and 2nd-Degree Polynomial Regression to the pooled volumetric data. This allows the model to generalize across different candle shapes and sizes, even if the specific wax type is unknown.

✨ Key Features

  • Multi-Wax Support: Individual profiles for Paraffin, Soy, and Beeswax.
  • Generalized Model: A pooled dataset approach that calculates a "Universal Volumetric Burn Rate" for mystery candles.
  • Physics-Informed: Respects the material density and cross-sectional constraints of the physical setup.
  • Visual Analysis: Includes matplotlib visualizations to track prediction curves vs. actual burn data.

πŸ› οΈ Tech Stack

  • Language: Python 3.x
  • ML Framework: Scikit-Learn (Linear & Polynomial Regression)
  • Data Handling: NumPy
  • Visualization: Matplotlib

πŸ“Š Results & Performance

The model successfully predicts extinction times for variable diameters (e.g., transitioning from a 20mm training candle to a 9mm test candle) by normalizing for the volumetric drop rate, significantly outperforming simple time-series height models.


πŸ“ Repository Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main_prediction.py      # The core modeling and prediction script
β”‚   β”œβ”€β”€ data_visualizer.py      # Script for plotting burn curves
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ sample_measurements.csv  # Training data for Paraffin, Soy, and Beeswax
β”œβ”€β”€ README.md                   # Project documentation
└── requirements.txt            # Necessary Python libraries

About

πŸ“A physics-informed Machine Learning model designed to predict candle extinction time across different wax types (Paraffin, Soy, Beeswax) using volumetric burn rate analysis and regression modeling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors