Skip to content

Commit 41b70e8

Browse files
committed
2 parents 90e2c1a + 6ef7440 commit 41b70e8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/source/content/overview/linear-regression.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ shows a data set with a linear relationship.
3232

3333
**Figure 1. A sample data set with a linear relationship** [`code`__]
3434

35-
.. __: /code/overview/linear_regression/linear_regression.py
35+
.. __: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/linear_regression.py
3636

3737
Our goal is to find the line that best models the path of the data points
3838
called a line of best fit. The equation in *Equation 1*, is an example of a
@@ -49,7 +49,7 @@ through it.
4949

5050
**Figure 2. The data set from Figure 1 with a line of best fit** [`code`__]
5151

52-
.. __: /code/overview/linear_regression/linear_regression_lobf.py
52+
.. __: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/linear_regression_lobf.py
5353

5454
Let’s break it down. We already know that x is the input value and y is our
5555
predicted output. a₀ and a₁ describe the shape of our line. a₀ is called the
@@ -80,7 +80,7 @@ relationship so linear regression would not be a good choice.
8080

8181
**Figure3. A sample data set without a linear relationship** [`code`__]
8282

83-
.. __: /code/overview/linear_regression/not_linear_regression.py
83+
.. __: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/not_linear_regression.py
8484

8585
It is worth noting that sometimes you can apply transformations to data so
8686
that it appears to be linear. For example, you could apply a logarithm to
@@ -97,7 +97,7 @@ transformed to have a linear relationship.
9797

9898
**Figure 4. A sample data set that follows an exponential curve** [`code`__]
9999

100-
.. __: /code/overview/linear_regression/exponential_regression.py
100+
.. __: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/exponential_regression.py
101101

102102
*Figure 5* is the same data after transforming the output variable with a
103103
logarithm.
@@ -107,7 +107,7 @@ logarithm.
107107
**Figure 5. The data set from Figure 4 after applying a logarithm to the
108108
output variable** [`code`__]
109109

110-
.. __: /code/overview/linear_regression/exponential_regression_transformed.py
110+
.. __: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/exponential_regression_transformed.py
111111

112112

113113
*************
@@ -124,7 +124,7 @@ for one such prediction.
124124
**Figure 6. The plot from Figure 2 with the cost of one prediction
125125
emphasized** [`code`__]
126126

127-
.. __: /code/overview/linear_regression/linear_regression_cost.py
127+
.. __: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/linear_regression_cost.py
128128

129129
Two common terms that appear in cost functions are the **error** and
130130
**squared error**. The error [*Equation 2*] is how far away from the actual
@@ -206,12 +206,12 @@ Code
206206
****
207207
This module's main code is available in the linear_regression_lobf.py_ file.
208208

209-
.. _linear_regression_lobf.py: /code/overview/linear_regression/linear_regression_lobf.py
209+
.. _linear_regression_lobf.py: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/linear_regression_lobf.py
210210

211211
All figures in this module were created with simple modifications of the
212212
linear_regression.py_ code.
213213

214-
.. _linear_regression.py: /code/overview/linear_regression/linear_regression.py
214+
.. _linear_regression.py: https://github.com/machinelearningmindset/machine-learning-course/blob/master/code/overview/linear_regression/linear_regression.py
215215

216216
In the code, we analyze a data set with a linear relationship. We split the
217217
data into a training set to train our model and a testing set to test its

0 commit comments

Comments
 (0)