Git Product home page Git Product logo

tastenet-mnl's People

Contributors

deborahmit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tastenet-mnl's Issues

Splitting the data at the level of choice situations or individuals?

Dear Yafei Han,

First of all, thank you for providing the replication files of your paper publicly available. I am checking your procedures to apply your model to a paper we are working on with some colleagues, and I have a question regarding how you split the data into training, development, and testing.

In this line of code, as far as I can see, you split the data at the level of choice set (or choice situations) that are available on the data and not at the level of individuals, because len(x) corresponds to the number of choice sets in the entire sample.

"train_ind, dev_ind, test_ind = split(len(x))\n",

Then, when you split the data, you use:

train_ind, dev_test_ind = model_selection.train_test_split(range(N), train_size = 0.7, test_size = 0.3, random_state=8)

which, I think, uses a range() over the number of choice situations.

Hence, as far as I understand, this is not preserving the panel structure of the data since the different answers from a single individual (choice sets) can be assigned to training, development, or testing.

This seems even more problematic given that later you benchmarked your model with a Mixed Logit model in which we should account for the panel structure of the data. In particular, repeated choice situations from the same individual have special treatment as the product of Logit formulas for the entire sequences of choices of the same individual (see equations (6.2) and (6.3) of Kenneth Train's book Chapter 6)

Sadly, I couldn't find the code that replicates the Multinomial Logit (MNL) or Mixed Logit (MIXL) models reported in your article in this repository, so, unfortunately, I cannot reproduce your results.

Am I interpreting your programs correctly, or am I missing something here?

Thank you for your time :)!
Best regards,
Álvaro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.