Skip to content

Commit a9e16f0

Browse files
authored
Merge pull request #61 from UDST/release
[0.2] Release
2 parents a142560 + d20e63d commit a9e16f0

26 files changed

+18
-24889
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
data/
2+
13
# Jupyter checkpoints
24
**/.ipynb_checkpoints
35
.pytest_cache/*

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ChoiceModels change log
22

3+
### 0.2 (2019-01-25)
4+
5+
- production release
6+
37
### 0.2.dev10 (2019-01-25)
48

59
- moves the `choicemodels.tools.distancematrix` functions directly into `choicemodels.tools`

choicemodels/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
from .mnl import MultinomialLogit, MultinomialLogitResults
55

6-
version = __version__ = '0.2.dev10'
6+
version = __version__ = '0.2'

choicemodels/mnl.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ class MultinomialLogit(object):
7676
and the alternatives. Attributes of a particular alternative may vary for different
7777
choosers (distance, for example), but this must be set up manually in the input data.
7878
79-
[TO DO: comparison of the estimation engines]
80-
[TO DO: testing and input validation]
81-
8279
Note that prediction methods are in a separate class: see MultinomialLogitResults().
8380
8481
Parameters
@@ -250,7 +247,7 @@ class MultinomialLogitResults(object):
250247
If not provided, these will be extracted from the raw results.
251248
252249
estimation_engine : str, optional
253-
'ChoiceModels' (default) or 'PyLogit'. # TO DO - infer from model_expression?
250+
'ChoiceModels' (default) or 'PyLogit'.
254251
255252
"""
256253
def __init__(self, model_expression, results=None, fitted_parameters=None,
@@ -287,11 +284,6 @@ def probabilities(self, data):
287284
Generate predicted probabilities for a table of choice scenarios, using the fitted
288285
parameters stored in the results object.
289286
290-
TO DO - make sure this handles pylogit case
291-
292-
TO DO - does MergedChoiceTable guarantee that alternatives for a single scenario
293-
are consecutive? seems like a requirement here; should document it
294-
295287
Parameters
296288
----------
297289
data : choicemodels.tools.MergedChoiceTable
@@ -307,6 +299,11 @@ def probabilities(self, data):
307299
pandas.Series with indexes matching the input
308300
309301
"""
302+
# TO DO - make sure this handles pylogit case
303+
304+
# TO DO - does MergedChoiceTable guarantee that alternatives for a single scenario
305+
# are consecutive? seems like a requirement here; should document it
306+
310307
df = data.to_frame()
311308
numalts = data.sample_size # TO DO - make this an official MCT param
312309

choicemodels/tools/simulation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def iterative_lottery_choices(choosers, alternatives, mct_callable, probs_callab
139139
all choosers are matched or no alternatives remain.
140140
141141
chooser_batch_size : int or None, optional
142-
Size of the batches for processing smaller groups of choosers one at a time. Useful
143-
when the anticipated size of the merged choice tables (choosers X alternatives
144-
X covariates) will be too large for python/pandas to handle.
142+
Size of the batches for processing smaller groups of choosers one at a time.
143+
Useful when the anticipated size of the merged choice tables (choosers X
144+
alternatives X covariates) will be too large for python/pandas to handle.
145145
146146
Returns
147147
-------

data/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

data/README.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ChoiceModels
88

99
ChoiceModels is a Python library for discrete choice modeling, with utilities for sampling, simulation, and other ancillary tasks. It's part of the `Urban Data Science Toolkit <https://github.com/udst>`__ (UDST).
1010

11-
v0.2.dev10, released January 25, 2019
11+
v0.2, released January 25, 2019
1212

1313

1414
Contents

0 commit comments

Comments
 (0)