A simple Arduino library for linear regression modeling with coefficient updates based on feedback.
- Predict
waktu
based onvolume
andtarget deltapH
. - Update model coefficients using gradient descent with feedback.
- Easy to integrate with Arduino projects.
- Download this repository as a ZIP file.
- Open Arduino IDE.
- Go to
Sketch > Include Library > Add .ZIP Library
. - Select the downloaded ZIP file.
Here’s an example of how to use this library:
#include <LinearRegressionModel.h>
// Initialize the model with initial coefficients and learning rate
LinearRegressionModel model(0.5, 0.2, 1.0, 0.01);
void setup() {
Serial.begin(9600);
float volume = 10.0;
float targetDeltapH = 7.0;
float waktu = model.predictWaktu(volume, targetDeltapH);
Serial.print("Predicted waktu: ");
Serial.println(waktu);
}
void loop() {}