You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to run this on a dataset of my own. I did the prepare dataset part for my dataset. But when it tries to predict the point, I get the following error-
in
4 continuous_function_estimation=False,
5 returns_infos=True,
----> 6 path=path_data, sep=';', log=False)
/LORE/lore.py in explain(idx_record2explain, X2E, dataset, blackbox, ng_function, discrete_use_probabilities, continuous_function_estimation, returns_infos, path, sep, log)
38
39 dfx = build_df2explain(blackbox, x.reshape(1, -1), dataset).to_dict('records')[0]
---> 40 cc_outcome, rule, tree_path = pyyadt.predict_rule(dt, dfx, class_name, features_type, discrete, continuous)
41
42 # Apply Black Box and Decision Tree on neighborhood
/LORE/pyyadt.py in predict_rule(dt, x, class_name, features_type, discrete, continuous)
138
139 y, tree_path = predict_single_record(dt, x, class_name, edge_labels, node_labels, node_isleaf,
--> 140 features_type, discrete, continuous)
141 if y is None:
142 return None, None, None
/LORE/pyyadt.py in predict_single_record(dt, x, class_name, edge_labels, node_labels, node_isleaf, features_type, discrete, continuous, n_iter)
95 while not node_isleaf[node]:
96 att = node_labels[node]
---> 97 val = x[att]
98 for child in dt.neighbors(node):
99 count += 1
KeyError: '22'
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to run this on a dataset of my own. I did the prepare dataset part for my dataset. But when it tries to predict the point, I get the following error-
in
4 continuous_function_estimation=False,
5 returns_infos=True,
----> 6 path=path_data, sep=';', log=False)
/LORE/lore.py in explain(idx_record2explain, X2E, dataset, blackbox, ng_function, discrete_use_probabilities, continuous_function_estimation, returns_infos, path, sep, log)
38
39 dfx = build_df2explain(blackbox, x.reshape(1, -1), dataset).to_dict('records')[0]
---> 40 cc_outcome, rule, tree_path = pyyadt.predict_rule(dt, dfx, class_name, features_type, discrete, continuous)
41
42 # Apply Black Box and Decision Tree on neighborhood
/LORE/pyyadt.py in predict_rule(dt, x, class_name, features_type, discrete, continuous)
138
139 y, tree_path = predict_single_record(dt, x, class_name, edge_labels, node_labels, node_isleaf,
--> 140 features_type, discrete, continuous)
141 if y is None:
142 return None, None, None
/LORE/pyyadt.py in predict_single_record(dt, x, class_name, edge_labels, node_labels, node_isleaf, features_type, discrete, continuous, n_iter)
95 while not node_isleaf[node]:
96 att = node_labels[node]
---> 97 val = x[att]
98 for child in dt.neighbors(node):
99 count += 1
KeyError: '22'
The text was updated successfully, but these errors were encountered: