dedupeio / rlr

Regularized Logistic Regression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rlr

L2 Regularized Logistic Regression With Case Weighting

Minimal dependency logistic regression classifer with L2 Regularization and optional case weighting.

Part of the Dedupe.io cloud service and open source toolset for de-duplicating and finding fuzzy matches in your data.

Build Status

labels = numpy.array([1] * 6 + [0] * 6)
examples = numpy.array([1, 0] * 6).reshape(12, 1)

case_weights = numpy.arange(1, 13) * 1./12
case_weights = numpy.array([0.5] * 12)

classifier = rlr.RegularizedLogisticRegression(alpha = 0)
classifier.fit(examples, labels, case_weights=case_weights)

classifier.predict_proba(examples)
[0.5, ... 0.5]

About

Regularized Logistic Regression

License:Other


Languages

Language:Python 100.0%