Categorical Covariates/Factors


#1

Hi,
How does one set categorical fixed effects in Edward? For example, in the tutorial lme model, how can the service binary variable be treated as a factor if now we have more than 2 levels (categories)? Does the design matrix need to be built by hand in this case?


#2

Yes. I’m not completely sure how tf.feature_column interfaces with tf.Tensors but you might be able to leverage TensorFlow functions to build the design matrix (see also https://www.tensorflow.org/tutorials/wide). This is the recommended approach.


#3

Thanks for the pointer!