logistic_regression

package
v0.0.0-...-90b3c1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 16 Imported by: 0

README

Logistic Regression

Let's say that we have two classes, A and B, that we are trying to predict. Let's also suppose that we are trying to predict A or B based on a variable x.

We need some function that goes to and stays at A for low values of x, and goes to and stays at B for higher values of x.

There is such a function. The function is called the logistic function, and it gives logistic regression its name. It has the following form:

Plot this function

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlotHistogramWithCleanedData

func PlotHistogramWithCleanedData(b io.Reader)

func PlotLogisticFunction

func PlotLogisticFunction()
Example
PlotLogisticFunction()

func TestTrainedData

func TestTrainedData(b io.Reader)
Example
TestTrainedData(data.GetCleanLoanCSVData())
Output:

Accuracy = 0.83

func TrainModel

func TrainModel(b io.Reader)
Example
TrainModel(data.GetCleanLoanCSVData())
Output:

p = 1 / ( 1 + exp(- m1 * FICO.score - m2) )

m1 = 13.65
m2 = -4.89

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL