-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Enable PDF book style build via LaTeX #193
base: main
Are you sure you want to change the base?
Changes from all commits
10d0d9d
3099b49
b09df2b
1cf42fe
e3a1290
3af0edc
c944329
a286759
cde5d36
51875b9
dcbe5e7
c9e7606
f18da1a
90925f0
3c52d1f
854da9c
a11426a
5b4f69a
ea7eb99
95c34ca
3700fe2
2a1a92c
1023fca
2e7b312
e59096e
06219e7
fa94e47
138d170
0c702dd
1f4f0c8
e35a921
aa37ac0
8571bb8
ea50268
4c1c2cd
78167d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,7 @@ only the livable square footage of the home. | |
The linear regression model for this situation is | ||
|
||
$$ | ||
\log(\text{price}) = \beta_0 + \beta_1 \text{sqft_living} + \epsilon | ||
\log(\text{price}) = \beta_0 + \beta_1 \text{sqft\_living} + \epsilon | ||
$$ | ||
|
||
$\beta_0$ and $\beta_1$ are called parameters (also coefficients or | ||
|
@@ -132,14 +132,14 @@ that best fit the data. | |
|
||
$\epsilon$ is the error term. It would be unusual for the observed | ||
$\log(\text{price})$ to be an exact linear function of | ||
$\text{sqft_living}$. The error term captures the deviation of | ||
$\log(\text{price})$ from a linear function of $\text{sqft_living}$. | ||
$\text{sqft\_living}$. The error term captures the deviation of | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AakashGfude just for clarity for when I update the This change QuantEcon/quantecon-book-theme@ec8d8c8 will then enable the correct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if we want to write a literal underscore, then we will have to escape it like that. http://docs.mathjax.org/en/latest/input/tex/extensions/textmacros.html#quoted-special-characters . I was about to comment about mentioning textmacros in the style guide as well http://docs.mathjax.org/en/latest/input/tex/extensions/textmacros.html There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that would be great -- can you remind me or open an issue on: QuantEcon.manual There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mmcky what is QuantEcon.manual ? |
||
$\log(\text{price})$ from a linear function of $\text{sqft\_living}$. | ||
|
||
The linear regression algorithm will choose the parameters that minimize the | ||
*mean squared error* (MSE) function, which for our example is written. | ||
|
||
$$ | ||
\frac{1}{N} \sum_{i=1}^N \left(\log(\text{price}_i) - (\beta_0 + \beta_1 \text{sqft_living}_i) \right)^2 | ||
\frac{1}{N} \sum_{i=1}^N \left(\log(\text{price}_i) - (\beta_0 + \beta_1 \text{sqft\_living}_i) \right)^2 | ||
$$ | ||
|
||
The output of this algorithm is the straight line (hence linear) that passes as | ||
|
@@ -218,7 +218,7 @@ Suppose that in addition to `sqft_living`, we also wanted to use the `bathrooms` | |
In this case, the linear regression model is | ||
|
||
$$ | ||
\log(\text{price}) = \beta_0 + \beta_1 \text{sqft_living} + | ||
\log(\text{price}) = \beta_0 + \beta_1 \text{sqft\_living} + | ||
\beta_2 \text{bathrooms} + \epsilon | ||
$$ | ||
|
||
|
@@ -227,7 +227,7 @@ We could keep adding one variable at a time, along with a new $\beta_{j}$ coeffi | |
Let's write this equation in vector/matrix form as | ||
|
||
$$ | ||
\underbrace{\begin{bmatrix} \log(\text{price}_1) \\ \log(\text{price}_2) \\ \vdots \\ \log(\text{price}_N)\end{bmatrix}}_Y = \underbrace{\begin{bmatrix} 1 & \text{sqft_living}_1 & \text{bathrooms}_1 \\ 1 & \text{sqft_living}_2 & \text{bathrooms}_2 \\ \vdots & \vdots & \vdots \\ 1 & \text{sqft_living}_N & \text{bathrooms}_N \end{bmatrix}}_{X} \underbrace{\begin{bmatrix} \beta_0 \\ \beta_1 \\ \beta_2 \end{bmatrix}}_{\beta} + \epsilon | ||
\underbrace{\begin{bmatrix} \log(\text{price}_1) \\ \log(\text{price}_2) \\ \vdots \\ \log(\text{price}_N)\end{bmatrix}}_Y = \underbrace{\begin{bmatrix} 1 & \text{sqft\_living}_1 & \text{bathrooms}_1 \\ 1 & \text{sqft\_living}_2 & \text{bathrooms}_2 \\ \vdots & \vdots & \vdots \\ 1 & \text{sqft\_living}_N & \text{bathrooms}_N \end{bmatrix}}_{X} \underbrace{\begin{bmatrix} \beta_0 \\ \beta_1 \\ \beta_2 \end{bmatrix}}_{\beta} + \epsilon | ||
$$ | ||
|
||
Notice that we can add as many columns to $X$ as we'd like and the linear | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AakashGfude I presume these aren't required for
datascience
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are already added in
quantecon-book-theme
for mathjax v3. https://github.com/QuantEcon/quantecon-book-theme/blob/master/quantecon_book_theme/layout.html#L10 .Since, there is no variable in sphinx to add configuration for mathjax3 in config file. I think it should be introduced in sphinxv4 though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new variable in sphinx version 4+ is
mathjax3_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AakashGfude I have opened a issue to track that inclusion
QuantEcon/quantecon-book-theme#167