Skip to content

Commit a9aa744

Browse files
committed
Indexed the Linear Regression article in the main read.me file. Also made a code style change.
1 parent f3ee09e commit a9aa744

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Linear Regression/LinearRegression.playground/Contents.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ func predictedCarPrice(carAge: Double) -> Double {
1313

1414
// An iterative approach
1515

16-
let numberOfCarAdvertsWeSaw = carPrice.count - 1
16+
let numberOfCarAdvertsWeSaw = carPrice.count
1717
let numberOfIterations = 100
1818
let alpha = 0.0001
1919

2020
for n in 1...numberOfIterations {
21-
for i in 0...numberOfCarAdvertsWeSaw {
21+
for i in 0..<numberOfCarAdvertsWeSaw {
2222
let difference = carPrice[i] - predictedCarPrice(carAge[i])
2323
intercept += alpha * difference
2424
slope += alpha * difference * carAge[i]

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Bad sorting algorithms (don't use these!):
104104

105105
- [k-Means Clustering](K-Means/). Unsupervised classifier that partitions data into *k* clusters.
106106
- k-Nearest Neighbors
107-
- Linear Regression
107+
- [Linear Regression](Linear Regression/)
108108
- Logistic Regression
109109
- Neural Networks
110110
- PageRank

0 commit comments

Comments
 (0)