ceml.model¶
ceml.model.counterfactual¶
-
class
ceml.model.counterfactual.
Counterfactual
(**kwds)¶ Bases:
abc.ABC
Base class for computing a counterfactual.
Note
The class
Counterfactual
can 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.ABC
Base class of a model.
Note
The class
Model
can 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.Model
Base class of a model that comes with its own loss function.
Note
The class
ModelWithLoss
can 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