https://github.com/policyengine/statsmodels-sgd
Reimplementation of statsmodels using stochastic gradient descent
https://github.com/policyengine/statsmodels-sgd
Last synced: 7 months ago
JSON representation
Reimplementation of statsmodels using stochastic gradient descent
- Host: GitHub
- URL: https://github.com/policyengine/statsmodels-sgd
- Owner: PolicyEngine
- License: mit
- Created: 2024-10-10T21:55:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-19T14:28:49.000Z (over 1 year ago)
- Last Synced: 2025-08-30T00:59:15.959Z (7 months ago)
- Language: Python
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# statsmodels-sgd
Reimplementation of statsmodels using stochastic gradient descent
Use just like statsmodels, but with stochastic gradient descent.
## Installation
```bash
pip install git+https://github.com/PolicyEngine/statsmodels-sgd.git
```
## Example
```python
import statsmodels_sgd.api as sm_sgd
# Fit OLS model
model = sm_sgd.OLS(n_features=X.shape[1])
model.fit(X, y)
# Fit Logit model
model = sm_sgd.Logit(n_features=X.shape[1])
model.fit(X, y)
```