explainy.utils package¶
Submodules¶
explainy.utils.category_mapper module¶
Created on Mon Apr 19 19:39:26 2021
@author: maurol
-
class
explainy.utils.category_mapper.CategoryMapper(path, feature)[source]¶ Bases:
objectmap the integer of the categorical variables back to the orginal string using the saved json file
-
get_map_index_dict()[source]¶ create the dictionary containing the index as key and the string as value
- Returns
None.
-
explainy.utils.surrogate_plot module¶
Created on Sat Dec 19 12:15:31 2020
@author: mauro
-
class
explainy.utils.surrogate_plot.SurrogatePlot(precision=2, impurity=False, rounded=True, class_names=True)[source]¶ Bases:
objectThis class create the graphviz based surrogate plot using the trained sklearn DecisionTree
explainy.utils.surrogate_text module¶
Created on Sat Dec 19 11:41:28 2020
@author: mauro
-
class
explainy.utils.surrogate_text.SurrogateText(text: str, model: object, X: numpy.array, feature_names: list)[source]¶
explainy.utils.utils module¶
Created on Sun Jan 17 19:34:15 2021
@author: maurol
-
explainy.utils.utils.create_one_hot_sentence(feature_name, feature_value, sentence)[source]¶ Create sentence from one-hot-encoded feature value, split the column name into feature and value and create sentence based on if the value was 1 = True, or 0 = False
- Parameters
feature_name (TYPE) – DESCRIPTION.
feature_value (TYPE) – DESCRIPTION.
sentence (TYPE) – DESCRIPTION.
- Returns
DESCRIPTION.
- Return type
sentence_filled (TYPE)