Skip to content

ClassHistogram().explain_data() having index error.... #274

@kumarprakashmani

Description

@kumarprakashmani

from interpret.data import ClassHistogram
hist = ClassHistogram().explain_data(X_train, y_train, name = 'ESR_Count')
show(hist)


IndexError Traceback (most recent call last)
in
----> 1 show(hist)

C:\anaconda\lib\site-packages\interpret\visual\interactive.py in show(explanation, key, **kwargs)
170 except Exception as e: # pragma: no cover
171 log.error(e, exc_info=True)
--> 172 raise e
173
174 return None

C:\anaconda\lib\site-packages\interpret\visual\interactive.py in show(explanation, key, **kwargs)
167
168 # Render
--> 169 this.visualize_provider.render(explanation, key=key, **kwargs)
170 except Exception as e: # pragma: no cover
171 log.error(e, exc_info=True)

C:\anaconda\lib\site-packages\interpret\provider\visualize.py in render(self, explanation, key, **kwargs)
222 from ..visual.inline import render
223
--> 224 render(
225 explanation,
226 default_key=key,

C:\anaconda\lib\site-packages\interpret\visual\inline.py in render(explanation, id_str, default_key, detected_envs, js_url)
214 viz_obj = _build_viz_err_obj(msg)
215 else:
--> 216 viz_obj = _build_viz_obj(explanation)
217
218 init_js, body_js = _build_javascript(

C:\anaconda\lib\site-packages\interpret\visual\inline.py in _build_viz_obj(explanation)
98 selector_obj = {"columns": [], "data": []}
99 else:
--> 100 specific = [
101 _build_viz_figure(explanation.visualize(i))
102 for i in range(len(explanation.selector))

C:\anaconda\lib\site-packages\interpret\visual\inline.py in (.0)
99 else:
100 specific = [
--> 101 _build_viz_figure(explanation.visualize(i))
102 for i in range(len(explanation.selector))
103 ]

C:\anaconda\lib\site-packages\interpret\data\response.py in visualize(self, key)
419 fig = plot_density(
420 data_dict,
--> 421 color=COLORS[idx],
422 name=str(current_class),
423 is_categorical=is_categorical,

IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions