This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Logistic regression naive grad descent implementation | |
| // | |
| // The LaTex format formula is: | |
| // | |
| // H_{\theta} ( \begin{bmatrix}X_{1},&...,&X_{N}\end{bmatrix}) | |
| // = 1 / | |
| // (1 + | |
| // e^{ -(\begin{bmatrix}\theta_{1}\\...\\\theta_{N}\end{bmatrix} * | |
| // \begin{bmatrix}X_{1},&...,&X_{N}\end{bmatrix}) }) | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/gonum/matrix/mat64" | |
| ) | |
| func main() { | |
| m := mat64.NewDense(2, 2, []float64{7.0, 0.5, 0.5, 1.0}) | |
| fmt.Printf("%#v\n", *m) |