Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions on masking process for UCI dataset #1

Open
raghuramdr opened this issue Nov 15, 2021 · 0 comments
Open

Questions on masking process for UCI dataset #1

raghuramdr opened this issue Nov 15, 2021 · 0 comments

Comments

@raghuramdr
Copy link

In the file notmiwae.py, consider the following function

´´´
def bernoulli_decoder_miss(self, z):

    if self.missing_process == 'selfmasking':

        self.W = tf.get_variable('W', shape=[1, 1, self.d])
        self.b = tf.get_variable('b', shape=[1, 1, self.d])

        logits = - self.W * (z - self.b)

    elif self.missing_process == 'selfmasking_known':

        self.W = tf.get_variable('W', shape=[1, 1, self.d])
        self.W = tf.nn.softplus(self.W)
        self.b = tf.get_variable('b', shape=[1, 1, self.d])

        logits = - self.W * (z - self.b)

    elif self.missing_process == 'linear':

        logits = keras.layers.Dense(units=self.d, activation=None, name='y')(z)

    elif self.missing_process == 'nonlinear':

        z = keras.layers.Dense(units=self.n_hidden, activation=tf.nn.tanh, name='y')(z)
        logits = keras.layers.Dense(units=self.d, activation=None, name='y')(z)

    else:
        print("use 'selfmasking', 'selfmasking_known', 'linear' or 'nonlinear' as 'missing_process'")
        logits = None

    # ---- return logits since it goes better with tfp bernoulli
    return logits

´´´

  1. Do the nonlinear and linear options correspond to the agnostic process described in the paper?
  2. selfmasking_known should correspond to the third approach described in the paper, which reads where the sign of the weights in the logistic regression is known. I don't follow how doing a tf.nn.softplus is linked to the knowledge of the sign of the weights. Can you please elaborate?

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant