RealApp#

RealApp#

RealApp(models[, X_train_orig, y_train, ...])

Maintains all information about a Pyreal application to generate explanations

RealApp.add_model(model[, model_id])

Add a model

RealApp.set_active_model_id(active_model_id)

Set a new active model

RealApp.get_active_model()

Return the active model

RealApp.predict(x[, model_id, as_dict, format])

Predict on x using the active model or model specified by model_id

RealApp.predict_proba(x[, model_id, ...])

Return the predicted probabilities of x using the active model or model specified by model_id, only if the model has a predict_proba method

RealApp.prepare_feature_contributions([...])

Initialize and fit a local feature contribution explainer

RealApp.produce_feature_contributions(x_orig)

Produce a feature contribution explanation

RealApp.produce_narrative_feature_contributions(x_orig)

Produce a feature contribution explanation, formatted in natural language sentence format using LLMs.

RealApp.train_feature_contribution_llm([...])

Run the training process for the LLM model used to generate narrative feature contribution explanations.

RealApp.prepare_feature_importance([...])

Initialize and fit a global feature importance explainer

RealApp.produce_feature_importance([...])

Produce a GlobalFeatureImportance explainer

RealApp.prepare_similar_examples([...])

Initialize and fit a nearest neighbor explainer

RealApp.produce_similar_examples(x_orig[, ...])

Produce a SimilarExamples explainer

RealApp.from_sklearn([pipeline, model, ...])

Create a RealApp from a sklearn pipeline or model and transformers. Must provide one of: - just pipeline - just model - model and transformers.