https://github.com/dirkschumacher/tfjs-glm
Generalized linear models in tensorflow.js (WIP)
https://github.com/dirkschumacher/tfjs-glm
generalized-linear-models statistics tensorflow tensorflow-js
Last synced: 2 months ago
JSON representation
Generalized linear models in tensorflow.js (WIP)
- Host: GitHub
- URL: https://github.com/dirkschumacher/tfjs-glm
- Owner: dirkschumacher
- License: mit
- Created: 2019-06-23T19:21:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T03:15:53.000Z (about 2 years ago)
- Last Synced: 2025-03-10T15:11:31.106Z (2 months ago)
- Topics: generalized-linear-models, statistics, tensorflow, tensorflow-js
- Language: JavaScript
- Size: 20.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tfjs-glm
Generalized linear models in tensorflow.js using Iteratively Re-Weighted Least Squares (WIP)Experimental and work in progress. Use at own risk. Still numerical problems, especially with log link.
## Families
* Gaussian (links: identity)
* Binomial (links: logit)
* Poisson (links: log)## API
```js
const {glm, gaussian, binomial, poisson} = require("tfjs-glm")// linear regression
const coefficents = glm(designMatrix, response, gaussian("identity"))// logistic regression
const coefficents = glm(designMatrix, response, binomial("logit"))// poisson regression
const coefficents = glm(designMatrix, response, poisson("log"))
```## References
1: Arnold, T., Kane, M., & Lewis, B. W. (2019). A Computational Approach to Statistical Learning. CRC Press.