You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is fun to think about how deepening the neural net for the above example affects the quality of approximation
536
536
537
537
538
-
* If the network is too deep, you'll run into the [vanishing gradient problem](http://neuralnetworksanddeeplearning.com/chap5.html)
538
+
* If the network is too deep, you'll run into the [vanishing gradient problem](https://neuralnetworksanddeeplearning.com/chap5.html)
539
539
* Other parameters such as the step size and the number of epochs can be as important or more important than the number of layers in the situation considered in this lecture.
540
540
* Indeed, since $f$ is a linear function of $x$, a one-layer network with the identity map as an activation would probably work best.
Copy file name to clipboardExpand all lines: lectures/finite_markov.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,11 +213,11 @@ One natural way to answer questions about Markov chains is to simulate them.
213
213
214
214
(To approximate the probability of event $E$, we can simulate many times and count the fraction of times that $E$ occurs).
215
215
216
-
Nice functionality for simulating Markov chains exists in [QuantEcon.py](http://quantecon.org/quantecon-py).
216
+
Nice functionality for simulating Markov chains exists in [QuantEcon.py](https://quantecon.org/quantecon-py).
217
217
218
218
* Efficient, bundled with lots of other useful routines for handling Markov chains.
219
219
220
-
However, it's also a good exercise to roll our own routines --- let's do that first and then come back to the methods in [QuantEcon.py](http://quantecon.org/quantecon-py).
220
+
However, it's also a good exercise to roll our own routines --- let's do that first and then come back to the methods in [QuantEcon.py](https://quantecon.org/quantecon-py).
221
221
222
222
In these exercises, we'll take the state space to be $S = 0,\ldots, n-1$.
223
223
@@ -232,7 +232,7 @@ The Markov chain is then constructed as discussed above. To repeat:
232
232
233
233
To implement this simulation procedure, we need a method for generating draws from a discrete distribution.
234
234
235
-
For this task, we'll use `random.draw` from [QuantEcon](http://quantecon.org/quantecon-py), which works as follows:
235
+
For this task, we'll use `random.draw` from [QuantEcon](https://quantecon.org/quantecon-py), which works as follows:
236
236
237
237
```{code-cell} python3
238
238
ψ = (0.3, 0.7) # probabilities over {0, 1}
@@ -295,7 +295,7 @@ always close to 0.25, at least for the `P` matrix above.
295
295
296
296
### Using QuantEcon's Routines
297
297
298
-
As discussed above, [QuantEcon.py](http://quantecon.org/quantecon-py) has routines for handling Markov chains, including simulation.
298
+
As discussed above, [QuantEcon.py](https://quantecon.org/quantecon-py) has routines for handling Markov chains, including simulation.
299
299
300
300
Here's an illustration using the same P as the preceding example
301
301
@@ -307,7 +307,7 @@ X = mc.simulate(ts_length=1_000_000)
307
307
np.mean(X == 0)
308
308
```
309
309
310
-
The [QuantEcon.py](http://quantecon.org/quantecon-py) routine is [JIT compiled](https://python-programming.quantecon.org/numba.html#numba-link) and much faster.
310
+
The [QuantEcon.py](https://quantecon.org/quantecon-py) routine is [JIT compiled](https://python-programming.quantecon.org/numba.html#numba-link) and much faster.
311
311
312
312
```{code-cell} ipython
313
313
%time mc_sample_path(P, sample_size=1_000_000) # Our homemade code version
@@ -557,7 +557,7 @@ $$
557
557
It's clear from the graph that this stochastic matrix is irreducible: we can eventually
558
558
reach any state from any other state.
559
559
560
-
We can also test this using [QuantEcon.py](http://quantecon.org/quantecon-py)'s MarkovChain class
560
+
We can also test this using [QuantEcon.py](https://quantecon.org/quantecon-py)'s MarkovChain class
561
561
562
562
```{code-cell} python3
563
563
P = [[0.9, 0.1, 0.0],
@@ -776,7 +776,7 @@ One option is to regard solving system {eq}`eq:eqpsifixed` as an eigenvector pr
776
776
$\psi$ such that $\psi = \psi P$ is a left eigenvector associated
777
777
with the unit eigenvalue $\lambda = 1$.
778
778
779
-
A stable and sophisticated algorithm specialized for stochastic matrices is implemented in [QuantEcon.py](http://quantecon.org/quantecon-py).
779
+
A stable and sophisticated algorithm specialized for stochastic matrices is implemented in [QuantEcon.py](https://quantecon.org/quantecon-py).
780
780
781
781
This is the one we recommend:
782
782
@@ -867,7 +867,7 @@ The result tells us that the fraction of time the chain spends at state $x$ conv
867
867
(new_interp_sd)=
868
868
This gives us another way to interpret the stationary distribution --- provided that the convergence result in {eq}`llnfmc0` is valid.
869
869
870
-
The convergence asserted in {eq}`llnfmc0` is a special case of a law of large numbers result for Markov chains --- see [EDTC](http://johnstachurski.net/edtc.html), section 4.3.4 for some additional information.
870
+
The convergence asserted in {eq}`llnfmc0` is a special case of a law of large numbers result for Markov chains --- see [EDTC](https://johnstachurski.net/edtc.html), section 4.3.4 for some additional information.
871
871
872
872
(mc_eg1-2)=
873
873
### Example
@@ -1322,7 +1322,7 @@ $$
1322
1322
1323
1323
Tauchen's method {cite}`Tauchen1986` is the most common method for approximating this continuous state process with a finite state Markov chain.
1324
1324
1325
-
A routine for this already exists in [QuantEcon.py](http://quantecon.org/quantecon-py) but let's write our own version as an exercise.
1325
+
A routine for this already exists in [QuantEcon.py](https://quantecon.org/quantecon-py) but let's write our own version as an exercise.
1326
1326
1327
1327
As a first step, we choose
1328
1328
@@ -1363,13 +1363,13 @@ The exercise is to write a function `approx_markov(rho, sigma_u, m=3, n=7)` that
The class `Kalman` from the [QuantEcon.py](http://quantecon.org/quantecon-py) package implements the Kalman filter
509
+
The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package implements the Kalman filter
510
510
511
511
* Instance data consists of:
512
512
* the moments $(\hat x_t, \Sigma_t)$ of the current prior.
513
-
* An instance of the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class from [QuantEcon.py](http://quantecon.org/quantecon-py).
513
+
* An instance of the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class from [QuantEcon.py](https://quantecon.org/quantecon-py).
514
514
515
515
The latter represents a linear state space model of the form
516
516
@@ -530,7 +530,7 @@ $$
530
530
Q := CC' \quad \text{and} \quad R := HH'
531
531
$$
532
532
533
-
* The class `Kalman` from the [QuantEcon.py](http://quantecon.org/quantecon-py) package has a number of methods, some that we will wait to use until we study more advanced applications in subsequent lectures.
533
+
* The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package has a number of methods, some that we will wait to use until we study more advanced applications in subsequent lectures.
534
534
* Methods pertinent for this lecture are:
535
535
*`prior_to_filtered`, which updates $(\hat x_t, \Sigma_t)$ to $(\hat x_t^F, \Sigma_t^F)$
536
536
*`filtered_to_forecast`, which updates the filtering distribution to the predictive distribution -- which becomes the new prior $(\hat x_{t+1}, \Sigma_{t+1})$
Copy file name to clipboardExpand all lines: lectures/linear_models.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1334,7 +1334,7 @@ Weaker sufficient conditions for convergence associate eigenvalues equaling or
1334
1334
## Code
1335
1335
1336
1336
Our preceding simulations and calculations are based on code in
1337
-
the file [lss.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from the [QuantEcon.py](http://quantecon.org/quantecon-py) package.
1337
+
the file [lss.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from the [QuantEcon.py](https://quantecon.org/quantecon-py) package.
1338
1338
1339
1339
The code implements a class for handling linear state space models (simulations, calculating moments, etc.).
Copy file name to clipboardExpand all lines: lectures/markov_perf.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -335,7 +335,7 @@ This is the approach we adopt in the next section.
335
335
336
336
### Implementation
337
337
338
-
We use the function [nnash](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqnash.py) from [QuantEcon.py](http://quantecon.org/quantecon-py) that computes a Markov perfect equilibrium of the infinite horizon linear-quadratic dynamic game in the manner described above.
338
+
We use the function [nnash](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqnash.py) from [QuantEcon.py](https://quantecon.org/quantecon-py) that computes a Markov perfect equilibrium of the infinite horizon linear-quadratic dynamic game in the manner described above.
339
339
340
340
## Application
341
341
@@ -439,7 +439,7 @@ From these, we compute the infinite horizon MPE using the preceding code
439
439
440
440
Running the code produces the following output.
441
441
442
-
One way to see that $F_i$ is indeed optimal for firm $i$ taking $F_2$ as given is to use [QuantEcon.py](http://quantecon.org/quantecon-py)'s LQ class.
442
+
One way to see that $F_i$ is indeed optimal for firm $i$ taking $F_2$ as given is to use [QuantEcon.py](https://quantecon.org/quantecon-py)'s LQ class.
443
443
444
444
In particular, let's take F2 as computed above, plug it into {eq}`eq_mpe_p1p` and {eq}`eq_mpe_p1d` to get firm 1's problem and solve it using LQ.
445
445
@@ -520,7 +520,7 @@ Replicate the {ref}`pair of figures <mpe_vs_monopolist>` showing the comparison
520
520
521
521
Parameters are as in duopoly_mpe.py and you can use that code to compute MPE policies under duopoly.
522
522
523
-
The optimal policy in the monopolist case can be computed using [QuantEcon.py](http://quantecon.org/quantecon-py)'s LQ class.
523
+
The optimal policy in the monopolist case can be computed using [QuantEcon.py](https://quantecon.org/quantecon-py)'s LQ class.
Copy file name to clipboardExpand all lines: lectures/perm_income_cons.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ In this lecture, we'll
60
60
61
61
* show how the solution to the LQ permanent income model can be obtained using LQ control methods.
62
62
* represent the model as a linear state space system as in {doc}`this lecture <linear_models>`.
63
-
* apply [QuantEcon](http://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to characterize statistical features of the consumer's optimal consumption and borrowing plans.
63
+
* apply [QuantEcon](https://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to characterize statistical features of the consumer's optimal consumption and borrowing plans.
64
64
65
65
We'll then use these characterizations to construct a simple model of cross-section wealth and
66
66
consumption dynamics in the spirit of Truman Bewley {cite}`Bewley86`.
@@ -204,7 +204,7 @@ $$
204
204
205
205
Here we solve the same model using {doc}`LQ methods <lqcontrol>` based on dynamic programming.
206
206
207
-
After confirming that answers produced by the two methods agree, we apply [QuantEcon](http://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py)
207
+
After confirming that answers produced by the two methods agree, we apply [QuantEcon](https://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py)
0 commit comments