项目作者: jain-ruchi

项目描述 :
Train a Logistic Regression model using Gradient Descent or Newton's Method
高级语言: Matlab
项目地址: git://github.com/jain-ruchi/logistic-regression.git
创建时间: 2017-03-25T01:11:41Z
项目社区:https://github.com/jain-ruchi/logistic-regression

开源协议:

下载


Logistic Regression With Gradient Descent & Newton’s Method

Train and test a Logistic Regression model using Gradient Descent and Newton’s Method.

Requirements:

  • GNU Octave

The Model:

  • Binary classifier (can be adapted for multiclass)
  • Uses the regularized cross-entropy error function

The Dataset:

Source Files:

  • main.m: contains demo of Gradient Descent and Newton’s Method on Ionosphere dataset.
  • gradient_descent.m: trains logistic model using Batch Gradient Descent and returns two variables, w, the weight vector, and b the bias term.
  • newton.m: trains logistic model using Newton’s Method, returning same variables as above.
  • testLogisticRegression.m: reports the accuracy of the logistic model.

Auxiliary Files and Functions:

  • sigmoid.m: computes Sigmoid of given value.
  • bgradient.m: computes gradient with respect to the bias term
  • wgradient.m: computes gradient with respect to the weight vector

Instructions:

  • Run main in Octave.