Skip to content
An implementation of logistic regression with the Newton-Raphson method.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs
newton_raphson
tests
.editorconfig
.gitignore
.travis.yml
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.md
requirements.txt
requirements_dev.txt
setup.cfg
setup.py
tox.ini

README.md

Newton-Raphson Logistic Regression

https://zenodo.org/badge/latestdoi/127929528 https://travis-ci.org/abrahamnunes/newton_raphson https://newton-raphson.readthedocs.io/en/latest/?badge=latest

A simple and fast Python 3+ implementation of logistic regression for association analyses using the Newton-Raphson method.

Installation

pip install git+https://github.com/abrahamnunes/newton-raphson

Basic use case

import numpy as np
from sklearn.datasets import make_classification
from newton_raphson import logistic_regression

# Generate synthetic data
X, y = make_classification(n_samples=100, n_features=5)

# Perform logistic regression
res = logistic_regression(X, y)

# Print results
res.summary()

To-Do

  • Add unit tests for Hessian scaling factor
  • Add unit test for Hessian conditioning
  • Add capability to monitor each optimization iteration step

How to Cite

If you use Newton-Raphson in your work, we would very much appreciate the citation, which can be done as follows:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.