dowhy.gcm.ml package

Submodules

dowhy.gcm.ml.autolguon module

dowhy.gcm.ml.classification module

Functions and classes in this module should be considered experimental, meaning there might be breaking API changes in the future.

class dowhy.gcm.ml.classification.SklearnClassificationModel(sklearn_mdl: Any)[source]

Bases: SklearnRegressionModel, ClassificationModel

property classes: List[str]
clone()[source]

Clones the prediction model using the same hyper parameters but not fitted. :return: An unfitted clone of the prediction model.

predict_probabilities(X: array) ndarray[source]
dowhy.gcm.ml.classification.create_ada_boost_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_extra_trees_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_gaussian_nb_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_gaussian_process_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_hist_gradient_boost_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_knn_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_logistic_regression_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_polynom_logistic_regression_classifier(degree: int = 3, **kwargs_logistic_regression) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_random_forest_classifier(**kwargs) SklearnClassificationModel[source]
dowhy.gcm.ml.classification.create_support_vector_classifier(**kwargs) SklearnClassificationModel[source]

dowhy.gcm.ml.regression module

Functions and classes in this module should be considered experimental, meaning there might be breaking API changes in the future.

class dowhy.gcm.ml.regression.InvertibleExponentialFunction[source]

Bases: InvertibleFunction

evaluate(X: ndarray) ndarray[source]

Applies the function on the input.

evaluate_inverse(X: ndarray) ndarray[source]

Returns the outcome of applying the inverse of the function on the inputs.

class dowhy.gcm.ml.regression.InvertibleIdentityFunction[source]

Bases: InvertibleFunction

evaluate(X: ndarray) ndarray[source]

Applies the function on the input.

evaluate_inverse(X: ndarray) ndarray[source]

Returns the outcome of applying the inverse of the function on the inputs.

class dowhy.gcm.ml.regression.InvertibleLogarithmicFunction[source]

Bases: InvertibleFunction

evaluate(X: ndarray) ndarray[source]

Applies the function on the input.

evaluate_inverse(X: ndarray) ndarray[source]

Returns the outcome of applying the inverse of the function on the inputs.

class dowhy.gcm.ml.regression.SklearnRegressionModel(sklearn_mdl: Any)[source]

Bases: PredictionModel

General wrapper class for sklearn models.

clone()[source]

Clones the prediction model using the same hyper parameters but not fitted. :return: An unfitted clone of the prediction model.

fit(X: ndarray, Y: ndarray) None[source]
predict(X: array) ndarray[source]
property sklearn_model: Any
dowhy.gcm.ml.regression.create_ada_boost_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_elastic_net_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_extra_trees_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_gaussian_process_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_hist_gradient_boost_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_knn_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_lasso_lars_ic_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_lasso_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_linear_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_linear_regressor_with_given_parameters(coefficients: ndarray, intercept: float = 0, **kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_polynom_regressor(degree: int = 3, **kwargs_linear_model) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_random_forest_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_ridge_regressor(**kwargs) SklearnRegressionModel[source]
dowhy.gcm.ml.regression.create_support_vector_regressor(**kwargs) SklearnRegressionModel[source]

Module contents

This module defines implementations of PredictionModel used by the different FunctionalCausalModel implementations, such as PostNonlinearModel or AdditiveNoiseModel.