We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba0d755 commit c505f18Copy full SHA for c505f18
Linear Regression/README.markdown
@@ -58,12 +58,12 @@ Now for the code which will perform the iterations:
58
59
```swift
60
let numberOfCarAdvertsWeSaw = carPrice.count
61
-let iterations = 2000
+let numberOfIterations = 100
62
let alpha = 0.0001
63
64
-for n in 1...iterations {
+for n in 1...numberOfIterations {
65
for i in 0..<numberOfCarAdvertsWeSaw {
66
- let difference = carPrice[i] - predictedCarPrice(carAge[i])
+ let difference = carPrice[i] - predictedCarPrice(carAge: carAge[i])
67
intercept += alpha * difference
68
slope += alpha * difference * carAge[i]
69
}
0 commit comments