Skip to content

Commit

Permalink
golint'ed
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal committed Feb 21, 2018
1 parent e7de543 commit 25cc039
Show file tree
Hide file tree
Showing 9 changed files with 634 additions and 599 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gox
3 changes: 0 additions & 3 deletions base/GD.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ func (gd *GD) Fit(x [][]float64, y []float64) *GD {
for i := 0; i < gd.Epochs; i++ {
Shuffle(x, y)
predY := gd.Predict(x)
errorSum := 0.0
errorSum2 := 0.0
// compute errorSum for updating w[0] and errorSum2 for Tol check
for k := 0; k < n; k++ {
errors[k] = y[k] - predY[k]
errorSum += errors[k]
errorSum2 += math.Pow(errors[k], 2.)

}
//fmt.Printf("GD %v %v\n", w, errorSum)
// update w[1]..w[n]
Expand Down
Loading

0 comments on commit 25cc039

Please sign in to comment.