Skip to content

Commit

Permalink
Merge pull request #61 from UDST/release
Browse files Browse the repository at this point in the history
[0.2] Release
  • Loading branch information
smmaurer authored Jan 30, 2019
2 parents a142560 + d20e63d commit a9e16f0
Show file tree
Hide file tree
Showing 26 changed files with 18 additions and 24,889 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
data/

# Jupyter checkpoints
**/.ipynb_checkpoints
.pytest_cache/*
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChoiceModels change log

### 0.2 (2019-01-25)

- production release

### 0.2.dev10 (2019-01-25)

- moves the `choicemodels.tools.distancematrix` functions directly into `choicemodels.tools`
Expand Down
2 changes: 1 addition & 1 deletion choicemodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

from .mnl import MultinomialLogit, MultinomialLogitResults

version = __version__ = '0.2.dev10'
version = __version__ = '0.2'
15 changes: 6 additions & 9 deletions choicemodels/mnl.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ class MultinomialLogit(object):
and the alternatives. Attributes of a particular alternative may vary for different
choosers (distance, for example), but this must be set up manually in the input data.
[TO DO: comparison of the estimation engines]
[TO DO: testing and input validation]
Note that prediction methods are in a separate class: see MultinomialLogitResults().
Parameters
Expand Down Expand Up @@ -250,7 +247,7 @@ class MultinomialLogitResults(object):
If not provided, these will be extracted from the raw results.
estimation_engine : str, optional
'ChoiceModels' (default) or 'PyLogit'. # TO DO - infer from model_expression?
'ChoiceModels' (default) or 'PyLogit'.
"""
def __init__(self, model_expression, results=None, fitted_parameters=None,
Expand Down Expand Up @@ -287,11 +284,6 @@ def probabilities(self, data):
Generate predicted probabilities for a table of choice scenarios, using the fitted
parameters stored in the results object.
TO DO - make sure this handles pylogit case
TO DO - does MergedChoiceTable guarantee that alternatives for a single scenario
are consecutive? seems like a requirement here; should document it
Parameters
----------
data : choicemodels.tools.MergedChoiceTable
Expand All @@ -307,6 +299,11 @@ def probabilities(self, data):
pandas.Series with indexes matching the input
"""
# TO DO - make sure this handles pylogit case

# TO DO - does MergedChoiceTable guarantee that alternatives for a single scenario
# are consecutive? seems like a requirement here; should document it

df = data.to_frame()
numalts = data.sample_size # TO DO - make this an official MCT param

Expand Down
6 changes: 3 additions & 3 deletions choicemodels/tools/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def iterative_lottery_choices(choosers, alternatives, mct_callable, probs_callab
all choosers are matched or no alternatives remain.
chooser_batch_size : int or None, optional
Size of the batches for processing smaller groups of choosers one at a time. Useful
when the anticipated size of the merged choice tables (choosers X alternatives
X covariates) will be too large for python/pandas to handle.
Size of the batches for processing smaller groups of choosers one at a time.
Useful when the anticipated size of the merged choice tables (choosers X
alternatives X covariates) will be too large for python/pandas to handle.
Returns
-------
Expand Down
4 changes: 0 additions & 4 deletions data/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions data/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ChoiceModels

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).

v0.2.dev10, released January 25, 2019
v0.2, released January 25, 2019


Contents
Expand Down
Loading

0 comments on commit a9e16f0

Please sign in to comment.