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
There seems to be a problem with SmallMultinomialLogitStep(). I created a random table to simulate a common choice scenario. Each observation has 2 attributes age and income. There are 4 choice is choice set (1,2,3,4). I run a model based on this table with the same specification in pylogit, statmodels and urbansim templates. Pylogit and statmodels estimate the same coefficients.
# Importing libraries
import pandas as pd
import numpy as np
import orca
import random
from collections import OrderedDict
from urbansim_templates import modelmanager as mm
from urbansim_templates.models import SmallMultinomialLogitStep
from statsmodels.discrete.discrete_model import MNLogit
import pylogit as pl
# Creating the table
X = pd.DataFrame({'interc': 1,
'age': [random.randint(1,20) for x in range(1000)] })
x_1 = pd.concat([X, pd.get_dummies([random.randint(1,5) for x in range(1000)], prefix='income', prefix_sep='_')], axis=1)
x_1['y'] = [random.randint(1,4) for x in range(1000)]
x_1.head()
There seems to be a problem with SmallMultinomialLogitStep(). I created a random table to simulate a common choice scenario. Each observation has 2 attributes age and income. There are 4 choice is choice set (1,2,3,4). I run a model based on this table with the same specification in pylogit, statmodels and urbansim templates. Pylogit and statmodels estimate the same coefficients.
Urbansim Template
Statmodels MNLogit
Pylogit
`
The text was updated successfully, but these errors were encountered: