Skip to content

Commit 935baff

Browse files
committed
Correct bullet lists. That should be it.
1 parent 9a336e8 commit 935baff

File tree

3 files changed

+45
-44
lines changed

3 files changed

+45
-44
lines changed

docs/source/estimation.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ The estimation process
4646
**********************
4747

4848
The estimation process is not directly implemented in ruspy. The package only contains
49-
the likelihood functions and in case of MPEC also the constraints. For the (minimization)
50-
maximization of the (negative) loglikelihood function, an external optimization library
51-
has to be used. Hence ruspy is a so called model package. OpenSourceEconomics offers
52-
several of these model packages, all for different models. More information can be found
53-
on our `homepage <https://open-econ.org>`_. The central function to get the criterion
54-
function, it's derivative and if applicable the constraint is the
55-
``get_criterion_function`` function. It's source code can be found here:
49+
the likelihood functions and in case of MPEC also the constraints. For the
50+
(minimization) maximization of the (negative) loglikelihood function, an external
51+
optimization library has to be used. Hence ruspy is a so called model package.
52+
OpenSourceEconomics offers several of these model packages, all for different models.
53+
More information can be found on our `homepage <https://open-econ.org>`_. The central
54+
function to get the criterion function, it's derivative and if applicable the constraint
55+
is the ``get_criterion_function`` function. It's source code can be found here:
5656

5757
.. currentmodule:: ruspy.estimation.criterion_function
5858

@@ -86,9 +86,11 @@ following mandatory keys:
8686

8787
- **num_states :** *(int)* The size of the state space as integer.
8888

89-
- **maint_cost_func :** *(string)* The name of the maintenance cost function. See :ref:`maint_func` for details.
89+
- **maint_cost_func :** *(string)* Name of the cost function. See :ref:`maint_func`
90+
for details.
9091

91-
- **cost_scale :** *(float)* The scale for the maintenance costs. See :ref:`scale` for details.
92+
- **cost_scale :** *(float)* The scale for the maintenance costs. See :ref:`scale`
93+
for details.
9294

9395

9496
Under the key **method** the method of estimation has to be specified as a *(string)*:
@@ -167,7 +169,7 @@ The dictionary containing the transition estimation results has the following ke
167169

168170
- **x :** *(numpy.array)* Estimated transition probabilities.
169171

170-
- ** trans_count :** *(numpy.array)* Counted state increases for each array index.
172+
- **trans_count :** *(numpy.array)* Counted state increases for each array index.
171173

172174

173175
So far only a pooled estimation of the transitions is possible. Hence, ``ruspy``
@@ -352,8 +354,8 @@ Demonstration
352354
In the tutorials are two demonstration jupyter notebooks of the cost estimation process.
353355
The `replication <tutorials/replication/replication.ipynb>`_ notebook allows to easily
354356
experiment with the methods described here as well as the implied demand function.
355-
The notebook can also be downloaded from the promotion folder of the
356-
`repository <https://github.com/OpenSourceEconomics/ruspy/tree/master/promotion/replication>`_.
357+
The notebook can also be downloaded from the tutorials folder of the
358+
`repository <https://github.com/OpenSourceEconomics/ruspy/tree/master/docs/source/replication>`_.
357359
If you have have everything setup, then it should be easy to run it.
358360
For a more advanced set up have a look at the `replication of Iskhakov et al. (2016)
359361
<tutorials/replication/replication_iskhakov_et_al_2016.ipynb>`_.

docs/source/model_code.rst

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,18 @@ allow to specify, when the algorithm switches from contraction to Newton-Kantoro
181181
iterations and general parameters, which let the algorithm stop. So far, there is no
182182
switching back implemented.
183183

184-
**max_cont_steps :** *(int)* The maximum number of contraction iterations before
185-
switching to Newton-Kantorovich iterations. Default is 20.
184+
- **max_cont_steps :** *(int)* The maximum number of contraction iterations before
185+
switching to Newton-Kantorovich iterations. Default is 20.
186186

187-
**switch_tol :** *(float)* If this threshold is reached by contraction iterations, then
188-
the algorithm switches to Newton-Kantorovich iterations. Default is :math:`10^{-3}`.
187+
- **switch_tol :** *(float)* If this threshold is reached by contraction iterations,
188+
then the algorithm switches to Newton-Kantorovich iterations. Default is
189+
:math:`10^{-3}`.
189190

190-
**max_newt_kant_steps :** *(int)* The maximum number of Newton-Kantorovich iterations
191-
before the algorithm stops. Default is 20.
191+
- **max_newt_kant_steps :** *(int)* The maximum number of Newton-Kantorovich iterations
192+
before the algorithm stops. Default is 20.
192193

193-
**threshold :** *(float)* If this threshold is reached by Newton-Kantorovich iterations,
194-
then the algorithm stops. Default is :math:`10^{-12}`.
194+
- **threshold :** *(float)* If this threshold is reached by Newton-Kantorovich
195+
iterations, then the algorithm stops. Default is :math:`10^{-12}`.
195196

196197
.. _ev:
197198

@@ -292,23 +293,22 @@ This dictionairy provides all the necessary information about how the demand
292293
function is supposed to look like and how precisely it is supposed to be calculated.
293294
It has to hold the following keys:
294295

295-
**RC_lower_bound :** *(float)* The lowest replacement cost for which the demand
296-
is supposed to be calculated.
296+
- **RC_lower_bound :** *(float)* The lowest replacement cost for which the demand is
297+
supposed to be calculated.
297298

298-
**RC_upper_bound :** *(float)* The highest replacement cost for which the demand
299-
is supposed to be calculated.
299+
- **RC_upper_bound :** *(float)* The highest replacement cost for which the demand is
300+
supposed to be calculated.
300301

301-
**demand_evaluations :** *(int)* The grid size of the replacement cost between
302-
RC_lower_bound and RC_upper_bound for which the demand level shall be calculated.
302+
- **demand_evaluations :** *(int)* The grid size of the replacement cost between
303+
RC_lower_bound and RC_upper_bound for which the demand level shall be calculated.
303304

304-
**tolerance :** *(float)* The stopping tolerance for the fixed point calculation
305-
needed to obtain each demand level.
305+
- **tolerance :** *(float)* The stopping tolerance for the fixed point calculation
306+
needed to obtain each demand level.
306307

307-
**num_periods :** *(int)* Number of months :math:`T` for which the expected demand
308-
is derived. Consequently, set it to 12 if you want to get the annual expected demand.
308+
- **num_periods :** *(int)* Number of months :math:`T` for which the expected demand
309+
is derived. Consequently, set it to 12 if you want to get the annual expected demand.
309310

310-
**num_buses :** *(int)* Number of buses :math:`M` for which the demand is
311-
calculated.
311+
- **num_buses :** *(int)* Number of buses :math:`M` for which the demand is calculated.
312312

313313

314314
.. _demand_params:
@@ -342,5 +342,4 @@ which indicates whether the fixed point algorithm converged successfully.
342342

343343

344344
The use of the ``get_demand`` function is shown in the following `replication
345-
<https://github.com/OpenSourceEconomics/ruspy/blob/kantevorich/promotion
346-
/replication/replication.ipynb>`_ notebook.
345+
<tutorials/replication/replication.ipynb>`_ notebook.

docs/source/simulation.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ Simulation initialization dictionary
2929

3030
The initialization dictionary contains the following keys:
3131

32-
**seed :** *(int)* A positive integer setting the random seed for drawing random
33-
numbers. If none given, some random seed is drawn.
32+
- **seed :** *(int)* A positive integer setting the random seed for drawing random
33+
numbers. If none given, some random seed is drawn.
3434

35-
**discount_factor :** *(float)* See :ref:`disc_fac` for more details.
35+
- **discount_factor :** *(float)* See :ref:`disc_fac` for more details.
3636

37-
**buses :** *(int)* The number of buses to be simulated.
37+
- **buses :** *(int)* The number of buses to be simulated.
38+
39+
- **periods :** *(int)* The number of periods to be simulated.
3840

39-
**periods :** *(int)* The number of periods to be simulated.
4041

4142

4243
The simulation process
@@ -82,8 +83,7 @@ data is a subset of the returned Dataframe.
8283
Demonstration
8384
-------------
8485

85-
The `simulation <tutorials/simulation/simulation_convergence.ipynb>`_ notebook allows to easily
86-
experiment with the estimation methods described here. The notebook can be downloaded
87-
from the `repository <https://github.com/OpenSourceEconomics/ruspy/blob/master/promotion
88-
/simulation/simulation_convergence.ipynb>`_. If you have have everything
89-
setup, then it should be easy to run it.
86+
The `simulation notebook <tutorials/simulation/simulation_convergence.ipynb>`_ allows to
87+
easily experiment with the estimation methods described here. The notebook can be
88+
downloaded from the `simulation folder <tutorials/simulation>`_ in the tutorials of
89+
ruspy. If you have have everything setup, then it should be easy to run it.

0 commit comments

Comments
 (0)