Giter Club home page Giter Club logo

Comments (8)

richardwu avatar richardwu commented on August 17, 2024

I've also tried the same thing with categorical variables and the model seems to suffer from mode collapse (within a categorical variable). Seeking some guidance on this.

from gain.

redfungus avatar redfungus commented on August 17, 2024

HI!

Thank you for providing the code to your paper.
I've realized that in the implementation, the loss function used for the reconstruction loss only considers continuous variables in contrast with the paper that considers both cases.
Do you happen to have the code for the categorical variables too?

from gain.

HaoXiao2018 avatar HaoXiao2018 commented on August 17, 2024

Don't have the code but these are the tips from the author.

On top of one-hot encoding, to make categorical variable work:
(1) Activation function: use softmax activation for each spanned categorical vector (instead of sigmoid activation)
(2) Change the MSE loss to the cross-entropy loss for the categorical variable.

from gain.

jsyoon0823 avatar jsyoon0823 commented on August 17, 2024

Thanks, HaoXiao2018.
This is exactly what I did for the categorical variables.
As can be seen in the paper, I used cross-entropy for categorical variable and mse for continuous variable.
But more important thing is that we need to use separate output layer (activation function with softmax).

from gain.

redfungus avatar redfungus commented on August 17, 2024

So, is it possible to have both categorical and continuous features in a dataset?

from gain.

jsyoon0823 avatar jsyoon0823 commented on August 17, 2024

Yes. It would be better if you modify the codes based on the comments from HaoXiao2018 above and apply GAIN for your mixed-type data.

from gain.

samyakag avatar samyakag commented on August 17, 2024

If I have categorical data, does that mean I also have to change the dimensions of all the network layers, etc as well?

from gain.

jsyoon0823 avatar jsyoon0823 commented on August 17, 2024

Network parameters should be updated for different datasets.
Even for the datasets which only have continuous variables, those hyper-parameters should be optimized to maximize the performance.

from gain.

Related Issues (20)

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.