Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bjoern-hempel/js-regression-framework
This is a javascript regression framework.
https://github.com/bjoern-hempel/js-regression-framework
javascript linear-regression mathematics mit-license regression regression-algorithms regression-analysis statistics
Last synced: about 1 month ago
JSON representation
This is a javascript regression framework.
- Host: GitHub
- URL: https://github.com/bjoern-hempel/js-regression-framework
- Owner: bjoern-hempel
- License: mit
- Created: 2018-08-21T22:05:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T22:54:13.000Z (about 6 years ago)
- Last Synced: 2024-11-07T03:44:22.464Z (3 months ago)
- Topics: javascript, linear-regression, mathematics, mit-license, regression, regression-algorithms, regression-analysis, statistics
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# A Javascript regression framework
This is a javascript regression analysis framework.
## 0. Introduction
Regression analysis is a statistical analysis technique that aims to model relationships between a dependent variable and one or more independent variables.
## 1. Linear regression (2D)
Linear regression, which is a special case of the general concept of regression analysis, is a statistical technique that attempts to explain an observed dependent variable by one or more independent variables.
### 1.1 Preliminary considerations
#### 1.1.1 Calculation of the slope m
#### 1.1.2 Calculation of the intercept b
#### 1.1.3 Calculation of the scope R2
### 1.2 Usage
Linear regression in 2-dimensional space, which is a special case of the general concept of regression analysis, is a statistical method that attempts to explain an observed dependent variable by one or more independent variables.
```javascript
var regression = Regression.linear();regression.addRecord(20, 0);
regression.addRecord(16, 3);
regression.addRecord(15, 7);
regression.addRecord(16, 4);
regression.addRecord(13, 6);
regression.addRecord(10, 10);var mn = regression.calculate();
console.log(String('y(x) = %s * x + %s').replace(/%s/, mn.m).replace(/%s/, mn.n));
```**It returns:**
```javascript
y(x) = -0.9821428571428571 * x + 19.732142857142854
```## A. Authors
* Björn Hempel - _Initial work_ - [https://github.com/bjoern-hempel](https://github.com/bjoern-hempel)
## B. Licence
This tutorial is licensed under the MIT License - see the [LICENSE.md](/LICENSE.md) file for details
## C. Closing words
Have fun! :)