ceml.model¶
ceml.model.counterfactual¶
-
class
ceml.model.counterfactual.Counterfactual(**kwds)¶ Bases:
abc.ABCBase class for computing a counterfactual.
Note
The class
Counterfactualcan not be instantiated because it contains an abstract method.-
abstract
compute_counterfactual()¶ Compute a counterfactual.
Abstract method for computing a counterfactual.
Note
All derived classes must implement this method.
-
abstract
ceml.model.model¶
-
class
ceml.model.model.Model(**kwds)¶ Bases:
abc.ABCBase class of a model.
Note
The class
Modelcan not be instantiated because it contains an abstract method.-
abstract
predict(x)¶ Predict the output of a given input.
Abstract method for computing a prediction.
Note
All derived classes must implement this method.
-
abstract
-
class
ceml.model.model.ModelWithLoss(**kwds)¶ Bases:
ceml.model.model.ModelBase class of a model that comes with its own loss function.
Note
The class
ModelWithLosscan not be instantiated because it contains an abstract method.-
abstract
get_loss(y_target, pred=None)¶ Creates and returns a loss function.
Builds a cost function where the target is y_target.
- Returns
The cost function.
- Return type
ceml.costfunctions.costfunction.Cost
Note
All derived classes must implement this method.
-
abstract