Skip to content

Commit

Permalink
format core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kyosek committed Jul 26, 2023
1 parent 6c77145 commit 05df472
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cfxplorer/focus/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ class Focus:
Examples
--------
- Initialize FOCUS with default parameters
- Initialize FOCUS on default parameters
- Generate counterfactual explanations
cfxplorer = Focus()
focus = Focus()
cfe_features = cfxplorer.generate(model, X)
cfe_features = focus.generate(model, X)
"""

def __init__(
Expand Down Expand Up @@ -475,16 +475,16 @@ def filter_hinge_loss(
Calculates the filtered probabilities of each data point for the given model.
Args:
- n_class (int): Number of classes.
- mask_vector (np.ndarray): A boolean mask indicating which data points should be considered.
- X (tf.Tensor): The feature input for the model.
- sigma (float): The value of sigma for computing the probabilities.
- temperature (float): The temperature to be used for the softmax function.
- model: The machine learning model;
n_class (int): Number of classes.
mask_vector (np.ndarray): A boolean mask indicating which data points should be considered.
X (tf.Tensor): The feature input for the model.
sigma (float): The value of sigma for computing the probabilities.
temperature (float): The temperature to be used for the softmax function.
model: The machine learning model;
e.g., DecisionTreeClassifier, RandomForestClassifier, AdaBoostClassifier.
Returns:
- hinge_loss (tf.Tensor): The filtered probabilities of each data point.
hinge_loss (tf.Tensor): The filtered probabilities of each data point.
"""
n_input = X.shape[0]

Expand Down

0 comments on commit 05df472

Please sign in to comment.