We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot use "feature_weights" on DICE, I am getting the error below, please assist:
Code: query_instance = denied_loans.drop(columns="predicted") dice_exp = exp.generate_counterfactuals(query_instance, total_CFs=1, desired_class="opposite", features_to_vary=vary_feature, proximity_weight=1, diversity_weight=0, categorical_penalty=1, . feature_weights=feature_weights, random_seed=42, verbose=True, method="genetic")
dice_exp.visualize_as_dataframe()
Error:
TypeError Traceback (most recent call last) in <cell line: 2>() 1 query_instance = denied_loans.drop(columns="predicted") ----> 2 dice_exp = exp.generate_counterfactuals(query_instance, 3 total_CFs=1, 4 desired_class="opposite", 5 features_to_vary=vary_feature,
/usr/local/lib/python3.10/dist-packages/dice_ml/explainer_interfaces/explainer_base.py in generate_counterfactuals(self, query_instances, total_CFs, desired_class, desired_range, permitted_range, features_to_vary, stopping_threshold, posthoc_sparsity_param, proximity_weight, sparsity_weight, diversity_weight, categorical_penalty, posthoc_sparsity_algorithm, verbose, **kwargs) 184 for query_instance in tqdm(query_instances_list): 185 self.data_interface.set_continuous_feature_indexes(query_instance) --> 186 res = self._generate_counterfactuals( 187 query_instance, total_CFs, 188 desired_class=desired_class,
TypeError: DiceRandom._generate_counterfactuals() got an unexpected keyword argument 'feature_weights
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I cannot use "feature_weights" on DICE, I am getting the error below, please assist:
Code:
query_instance = denied_loans.drop(columns="predicted")
dice_exp = exp.generate_counterfactuals(query_instance,
total_CFs=1,
desired_class="opposite",
features_to_vary=vary_feature,
proximity_weight=1,
diversity_weight=0,
categorical_penalty=1, .
feature_weights=feature_weights,
random_seed=42,
verbose=True,
method="genetic")
dice_exp.visualize_as_dataframe()
Error:
TypeError Traceback (most recent call last)
in <cell line: 2>()
1 query_instance = denied_loans.drop(columns="predicted")
----> 2 dice_exp = exp.generate_counterfactuals(query_instance,
3 total_CFs=1,
4 desired_class="opposite",
5 features_to_vary=vary_feature,
/usr/local/lib/python3.10/dist-packages/dice_ml/explainer_interfaces/explainer_base.py in generate_counterfactuals(self, query_instances, total_CFs, desired_class, desired_range, permitted_range, features_to_vary, stopping_threshold, posthoc_sparsity_param, proximity_weight, sparsity_weight, diversity_weight, categorical_penalty, posthoc_sparsity_algorithm, verbose, **kwargs)
184 for query_instance in tqdm(query_instances_list):
185 self.data_interface.set_continuous_feature_indexes(query_instance)
--> 186 res = self._generate_counterfactuals(
187 query_instance, total_CFs,
188 desired_class=desired_class,
TypeError: DiceRandom._generate_counterfactuals() got an unexpected keyword argument 'feature_weights
The text was updated successfully, but these errors were encountered: