Skip to content

Commit

Permalink
adding regression to TabularExplainer
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotcr committed Nov 27, 2018
1 parent 059b133 commit 1e12bcd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lime/lime_tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ class RecurrentTabularExplainer(LimeTabularExplainer):
"""

def __init__(self, training_data, training_labels=None, feature_names=None,
def __init__(self, training_data, mode="classification",
training_labels=None, feature_names=None,
categorical_features=None, categorical_names=None,
kernel_width=None, kernel=None, verbose=False, class_names=None,
feature_selection='auto', discretize_continuous=True,
Expand All @@ -467,6 +468,7 @@ def __init__(self, training_data, training_labels=None, feature_names=None,
Args:
training_data: numpy 3d array with shape
(n_samples, n_timesteps, n_features)
mode: "classification" or "regression"
training_labels: labels for training data. Not required, but may be
used by discretizer.
feature_names: list of names (strings) corresponding to the columns
Expand Down Expand Up @@ -514,6 +516,7 @@ def __init__(self, training_data, training_labels=None, feature_names=None,
# Send off the the super class to do its magic.
super(RecurrentTabularExplainer, self).__init__(
training_data,
mode=mode,
training_labels=training_labels,
feature_names=feature_names,
categorical_features=categorical_features,
Expand Down

0 comments on commit 1e12bcd

Please sign in to comment.