0.3.2 Correlation

This commit is contained in:
Rob Tillaart 2024-01-02 16:55:45 +01:00
parent 92d5d59011
commit 40c877faaa
15 changed files with 33 additions and 29 deletions

View File

@ -6,10 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.0] - 2023-10-18
- update readme.md
## [0.3.2] - 2024-01-02
- fix examples
- removed some obsolete comments.
- minor edits
## [0.3.1] - 2023-10-18
- update readme.md
## [0.3.0] - 2023-01-22
- update GitHub actions
- update license 2023

View File

@ -1,7 +1,7 @@
//
// FILE: Correlation.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.1
// VERSION: 0.3.2
// PURPOSE: Arduino Library to determine correlation between X and Y dataset
// URL: https://github.com/RobTillaart/Correlation

View File

@ -2,7 +2,7 @@
//
// FILE: Correlation.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.1
// VERSION: 0.3.2
// PURPOSE: Calculate Correlation from a small dataset.
// URL: https://github.com/RobTillaart/Correlation
@ -10,7 +10,7 @@
#include "Arduino.h"
#define CORRELATION_LIB_VERSION (F("0.3.1"))
#define CORRELATION_LIB_VERSION (F("0.3.2"))
class Correlation
@ -55,7 +55,7 @@ public:
// Y = A + B * X
// note if no elements are added or calculate is not called
// the values for A and B are 0
// the values for A and B are 0
float getA() { return _a; };
float getB() { return _b; };
@ -102,9 +102,6 @@ public:
float getSumXY(); // replaces getSumXiYi()
float getSumX2(); // replaces getSumXi2()
float getSumY2(); // replaces getSumYi2()
// float getSumXiYi() { return _sumXiYi; }; // obsolete in version 0.3.0
// float getSumXi2() { return _sumXi2; }; // obsolete in version 0.3.0
// float getSumYi2() { return _sumYi2; }; // obsolete in version 0.3.0
private:

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2023 Rob Tillaart
Copyright (c) 2020-2024 Rob Tillaart
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -76,6 +76,7 @@ Returns false if nothing to calculate **count == 0**
- **void setE2Calculation(bool)** enables / disables the calculation of Esquared.
- **bool getE2Calculation()** returns the flag set.
After the calculation the following functions can be called to return the core values.
- **float getA()** returns the A parameter of formula **Y = A + B \* X**
- **float getB()** returns the B parameter of formula **Y = A + B \* X**

View File

@ -2,7 +2,7 @@
// FILE: correlation_debugging.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-17
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation
@ -59,7 +59,7 @@ void setup()
for (int i = 0; i < SIZE; i++)
{
C.setXY(i, 0, 0); // create flatliner;
C.setXY(i, 0, 0); // create flatliner;
}
Serial.println("cnt\tX\tY");
for (int i = 0; i < SIZE; i++)

View File

@ -2,7 +2,7 @@
// FILE: demo0.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-17
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation

View File

@ -2,7 +2,7 @@
// FILE: correlation_demo1.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-17
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation
@ -49,5 +49,5 @@ void loop()
}
// -- END OF FILE --
// -- END OF FILE --

View File

@ -2,7 +2,7 @@
// FILE: correlation_performance.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-18
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation
// performance test: only ADD and CALCULATE as these are the most used
@ -141,5 +141,5 @@ void loop()
}
// -- END OF FILE --
// -- END OF FILE --

View File

@ -2,7 +2,7 @@
// FILE: correlation_statistical.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-17
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation

View File

@ -2,7 +2,7 @@
// FILE: correlation_test.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-18
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation
// performance test:
@ -73,7 +73,7 @@ void setup()
Serial.print("R: ");
Serial.println(R, 6);
// test();
// test();
Serial.println("\nDone...");
}

View File

@ -2,7 +2,7 @@
// FILE: demo_running_correlation.ino.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-05-18
// PUPROSE: demo of the Correlation Library
// PURPOSE: demo of the Correlation Library
// URL: https://github.com/RobTillaart/Correlation
@ -16,8 +16,8 @@ void setup()
Serial.begin(115200);
Serial.println(__FILE__);
// when internal table is full, no new values are added
// resulting in stabilization of the regression params A and B
// when internal table is full, no new values are added
// resulting in stabilization of the regression params A and B
C.clear();
C.setRunningCorrelation(false);
for (int i = 0; i <= 1000; i++)
@ -28,8 +28,8 @@ void setup()
Serial.println();
Serial.println();
// when internal table is full, values are overwritten and
// there is no stabilization of the regression params A and B
// when internal table is full, values are overwritten and
// there is no stabilization of the regression params A and B
C.clear();
C.setRunningCorrelation(true);
for (int i = 0; i <= 1000; i++)
@ -64,5 +64,5 @@ void loop()
}
// -- END OF FILE --
// -- END OF FILE --

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/Correlation.git"
},
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT",
"frameworks": "*",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=Correlation
version=0.3.1
version=0.3.2
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino Library to determine correlation between X and Y dataset

View File

@ -184,5 +184,6 @@ unittest(test_calculate_flags)
unittest_main()
// --END OF FILE --
// -- END OF FILE --