An open API service indexing awesome lists of open source software.

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

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)
```