Open hkhanal opened 3 years ago
Can you print out what categorical_names
is?
@marcotcr In explain_instance method for RecurrentTabularExplainer, in this loop:
name = int(data_row[i])
if i in self.categorical_names:
name = self.categorical_names[i][name]
The variable name will have an incorrect index because data_row is flattened (n_timesteps * n_features). Therefore, in my opinion, it should be replaced with:
name = int(data_row[i * self.n_timesteps])
if i in self.categorical_names:
name = self.categorical_names[i][name]
Perhaps (i'm not sure, how u can do it ...), it is necessary to redefine this class method to make it compatible with each tabular method.
My inputdata looks like
X_train = (6697, 6, 23), and last seven columns are categorical variables.
I got the following error massage.
Highly appreciated for any help.