-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from akkoyun/01.04.15
01.04.15 - Regresion model updated, R2 function added.
- Loading branch information
Showing
11 changed files
with
245 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include <Statistical.h> | ||
|
||
Statistical DataSet; | ||
|
||
void setup() { | ||
|
||
// Start Serial | ||
Serial.begin(115200); | ||
|
||
} | ||
|
||
void loop() { | ||
|
||
// Set Data | ||
Serial.println("Learning Data..."); | ||
|
||
// Set Precision | ||
uint8_t Linear_Regression_Precision = 5; | ||
|
||
// Set Array | ||
float Data[Linear_Regression_Precision][2]; | ||
|
||
// Learn Data | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 1, 220.14); | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 2, 221.36); | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 3, 218.21); | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 4, 217.06); | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 5, 220.14); | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 6, 222.14); | ||
DataSet.Array_FILO(Data, Linear_Regression_Precision, 7, 225.14); | ||
|
||
// Print FILO Array | ||
Serial.print("Regression Data Array : "); | ||
for (uint8_t i = 0; i < Linear_Regression_Precision; i++) { | ||
Serial.print("["); | ||
Serial.print(Data[i][0]); | ||
Serial.print(","); | ||
Serial.print(Data[i][1]); | ||
Serial.print("] "); | ||
} | ||
Serial.println(""); | ||
|
||
// Print Calculated Data | ||
Serial.print("Regression Data Count : "); Serial.println(Linear_Regression_Precision); | ||
Serial.print("Regression Slope : "); Serial.println(DataSet.Linear_Regression_Slope(Data, Linear_Regression_Precision), 4); | ||
Serial.print("Regression Offset : "); Serial.println(DataSet.Linear_Regression_Offset(Data, Linear_Regression_Precision), 4); | ||
Serial.print("Regression R2 : "); Serial.println(DataSet.Linear_Regression_R2(Data, Linear_Regression_Precision), 4); | ||
Serial.println("------------------------"); | ||
|
||
delay(10000); | ||
|
||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=Statistical | ||
version=1.4.14 | ||
version=1.4.15 | ||
author=Gunce Akkoyun <[email protected]> | ||
maintainer=Gunce Akkoyun <[email protected]> | ||
sentence=Statistic, Sum, Max, Min, Sq_Sum, Arithmetic Average, Geometric Average, RMS Average, Ext RMS Average, Bubble Sort, Median, Standard Deviation, Standard Deviation Error, Coefficient Factor, Average, Stream, Regression, Slope, Data, Analyse | ||
|
Oops, something went wrong.