Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
You are viewing the development documentation (main). Switch to the stable release docs.
probly 0.9.2.dev42+g3a47ecf5d documentation
Light Logo Dark Logo

Table of Contents

  • Introduction
  • Installation
  • User Guide
    • 1. Transformation
    • 2. Representation
    • 3. Quantification
    • 4. Evaluation
    • 5. Visualization
  • Examples and Tutorials
    • Examples
      • Active Learning
        • Active Learning with sklearn - Margin vs Random
        • Active Learning with PyTorch - BADGE Selection
      • Conformal Prediction
        • Regression Conformal Prediction — sklearn
        • Classification Conformal Prediction — sklearn
        • Quantile Regression Conformal Prediction — sklearn
        • Classification Conformal Prediction — PyTorch
        • Regression Conformal Prediction — PyTorch
        • Conformalized Credal Set Prediction — PyTorch.
        • Quantile Regression Conformal Prediction — PyTorch
      • Integrations
        • Uncertainty for Hugging Face vision transformers
        • Depth estimation uncertainty with transformers
        • Mixing torch-uncertainty and probly
        • Uncertainty for Hugging Face transformers
        • Forecast uncertainty with transformers
        • LoRA adapter ensembles with peft
      • Method
        • SWAG on Two Moons
        • DARE on Two Moons
        • Laplace Approximation on Two Moons
        • Generative Variational Bayesian Last Layers on Two Moons
        • Mahalanobis OOD on Two Moons
        • Variational Bayesian Last Layers on Two Moons
        • DUQ on Two Moons
        • DDU on Two Moons
        • Het-Net on Two Moons
        • Credal Net Visualization
        • Evidential on Two Moons
        • Student-t Variational Bayesian Last Layers on Two Moons
        • Credal Wrapper Output Visualization
        • Credal Ensembling Visualization
        • Heteroscedastic Variational Bayesian Last Layers on Two Moons
        • Credal BNN Visualization
        • Credal DRO Output Visualization
        • DARE on MNIST
        • SNGP Distance Awareness on 2D Toys
        • Laplace on MNIST
        • G-VBLL on MNIST
        • Credal BNN on MNIST
        • VBLL on MNIST
        • SWAG on MNIST
        • Student-t VBLL on MNIST
        • Heteroscedastic VBLL on MNIST
        • Credal Wrapper on MNIST
        • Credal Ensembling on MNIST
        • Credal Net on MNIST
        • SNGP on MNIST
        • Mahalanobis OOD on MNIST
        • Het-Net on MNIST
        • DUQ on MNIST
        • DDU on MNIST
        • Credal Relative Likelihood Visualization
        • Evidential on MNIST
        • Credal Relative Likelihood on MNIST
        • DEUP on Two Moons
        • Dirichlet Calibration on MNIST
        • DEUP on MNIST
      • Plot
        • Visualising OOD detection results
        • Plotting credal sets on the simplex
        • Plotting binary credal sets on an interval
        • Plotting credal sets on a spider (radar) chart
      • Pytraverse
        • A Brief Introduction to PyTraverse
      • Quantification
        • Uncertainty Quantification
        • Ensemble Regression Uncertainty
        • Ensemble Ordinal Classification Uncertainty
      • Release Highlights
      • Representation
        • Singleton credal set
        • Convex credal set
        • Discrete credal set
        • Distance-based credal set
        • Probability-intervals credal set
        • Working with NumpySample
      • Streaming
        • Streaming uncertainty with ARFRegressor
        • Streaming uncertainty with ARFClassifier
        • MC-Dropout uncertainty on a 2-D stream
      • Transformation
        • DropConnect on Two Moons
        • Deep Ensemble on Two Moons
        • MC Dropout on Two Moons
        • Masksembles on Two Moons
        • Natural Posterior Network on Two Moons
        • Posterior Network on Two Moons
        • Bayesian Neural Network on Two Moons
        • Sub-Ensemble on Two Moons
        • Bayesian Ensemble on Two Moons
        • BatchEnsemble on Two Moons
        • MC Dropout on MNIST
        • DropConnect on MNIST
        • Deep Ensemble on MNIST
        • Bayesian Neural Network on MNIST
        • Natural Posterior Network on MNIST
        • Bayesian Ensemble on MNIST
        • Posterior Network on MNIST
        • Sub-Ensemble on MNIST
        • BatchEnsemble on MNIST
        • Masksembles on MNIST
  • API Reference
    • probly
      • calibrator
      • conformal_scores
        • absolute_error
          • absolute_error.jax
          • absolute_error.torch
            • torch_compute_absolute_error_score
            • torch_compute_absolute_error_score_sample
        • aps
          • aps.jax
          • aps.torch
            • torch_compute_aps_score
        • cqr
          • cqr.jax
          • cqr.torch
            • torch_compute_cqr_score
        • cqr_r
          • cqr_r.jax
          • cqr_r.torch
            • torch_compute_cqr_r_score
        • dirichlet_relative_likelihood
          • dirichlet_relative_likelihood.jax
            • jax_compute_dirichlet_rl_score
            • jax_compute_dirichlet_rl_score_dirichlet
          • dirichlet_relative_likelihood.torch
            • torch_compute_dirichlet_rl_score
            • torch_compute_dirichlet_rl_score_dirichlet
        • inner_product
          • inner_product.jax
            • jax_compute_inner_product_score
          • inner_product.torch
            • torch_compute_inner_product_score
        • kullback_leibler
          • kullback_leibler.jax
            • jax_compute_kl_divergence_score
          • kullback_leibler.torch
            • torch_compute_kl_divergence_score
        • lac
          • lac.jax
            • jax_compute_lac_score
          • lac.torch
            • torch_compute_lac_score
            • torch_compute_lac_score_categorical
            • torch_compute_lac_score_sample
        • raps
          • raps.jax
          • raps.torch
            • torch_compute_raps_score
        • saps
          • saps.jax
          • saps.torch
            • torch_compute_saps_score
        • total_variation
          • total_variation.jax
            • jax_compute_tv_score
          • total_variation.torch
            • torch_compute_tv_score
        • uacqr
          • uacqr.jax
          • uacqr.torch
            • torch_compute_uacqr_score_func
        • wasserstein_distance
          • wasserstein_distance.jax
            • jax_compute_wasserstein_distance_score
          • wasserstein_distance.torch
            • torch_compute_wasserstein_distance_score
      • datasets
        • torch
          • Benthic
          • CIFAR10C
          • CIFAR10H
          • CIFAR10HDCIC
          • DCICDataset
          • ImageNetReaL
          • MedMNISTC
          • MiceBone
          • Pig
          • Plankton
          • QualityMRI
          • Synthetic
          • TinyImageNet
          • Treeversity1
          • Treeversity6
          • Turkey
      • decider
        • categorical_distribution
          • categorical_distribution.numpy
          • categorical_distribution.torch
      • evaluation
        • active_learning
          • active_learning.loop
            • ALState
            • active_learning_steps
          • active_learning.metrics
            • compute_nauc
          • active_learning.pool
            • active_learning.pool.numpy
              • NumpyActiveLearningPool
            • active_learning.pool.torch
              • TorchActiveLearningPool
          • active_learning.strategies
            • active_learning.strategies.numpy
            • active_learning.strategies.torch
          • active_learning.torch_metrics
        • ood
          • evaluate_ood
          • out_of_distribution_detection_aupr
          • out_of_distribution_detection_auroc
          • out_of_distribution_detection_fnr_at_x_tpr
          • out_of_distribution_detection_fpr_at_x_tpr
          • parse_dynamic_metric
        • selective_prediction
          • selective_prediction.jax
            • jax_selective_prediction
          • selective_prediction.numpy
            • numpy_selective_prediction
          • selective_prediction.torch
            • torch_selective_prediction
      • integrations
        • peft
        • torch_uncertainty
          • TorchUncertaintyCalibratedLogitRepresenter
          • TorchUncertaintyConformalRepresenter
          • TorchUncertaintySampleRepresenter
        • transformers
          • extract_predictions
      • layers
        • flax
          • BatchEnsembleConv
          • BatchEnsembleLinear
          • DropConnectLinear
        • numpy
          • CovarianceEstimator
          • NumpyMahalanobisHead
        • torch
          • BatchEnsembleConv2d
          • BatchEnsembleLinear
          • BayesConv2d
          • BayesLinear
          • DropConnectLinear
          • GVBLLLayer
          • GaussianMixtureHead
          • HetVBLLLayer
          • HeteroscedasticLayer
          • IRDHead
          • IntBatchNorm1d
          • IntBatchNorm2d
          • IntConv2d
          • IntLinear
          • IntSoftmax
          • MahalanobisHead
          • Masksembles2D
          • MasksemblesLinear
          • NatPNClassHead
          • NatPNRegHead
          • NormalInverseGammaLinear
          • RadialNormalizingFlow
          • RadialNormalizingFlowStack
          • RegressionHead
          • SNCoeffParametrization
          • SNGPLayer
          • SharedMaskDropout
          • TVBLLLayer
          • VBLLLayer
          • apply_spectral_norm_to_encoder
          • pack_interval
          • unpack_interval
      • lazy_types
      • losses
        • torch
          • cvar_ce_loss
          • der_loss
          • disc_vbll_loss
          • elbo_loss
          • evidential_ce_loss
          • evidential_kl_divergence
          • evidential_log_loss
          • evidential_mse_loss
          • evidential_nignll_loss
          • evidential_regression_regularization
          • focal_loss
          • g_vbll_loss
          • het_vbll_loss
          • intersection_probability_ce_loss
          • ird_loss
          • label_relaxation_loss
          • lop_gpn_loss
          • lp_fn
          • make_in_domain_target_alpha
          • make_ood_target_alpha
          • mixture_uce_loss
          • natpn_loss
          • normal_wishart_log_prob
          • pn_loss
          • postnet_loss
          • regularization_fn
          • rpn_distillation_loss
          • rpn_loss
          • rpn_ng_kl
          • rpn_prior
          • t_vbll_loss
      • method
        • batchensemble
        • bayesian
        • calibration
        • cast
        • conformal
        • conformal_credal_set
        • credal_bnn
        • credal_dro
        • credal_ensembling
        • credal_net
          • CredalNetPredictor
        • credal_relative_likelihood
        • credal_wrapper
        • dare
        • ddu
        • deup
          • deup.torch
            • ErrorPredictionHead
            • LogDUEVariance
            • LogGMMDensity
            • LogMAFDensity
            • LogMCDropoutVariance
            • StationarizingFeatureProvider
            • TorchDEUPPredictor
            • TorchDEUPRepresentation
        • dropconnect
        • dropout
        • duq
        • efficient_credal_prediction
        • ensemble
        • evidential
          • evidential.classification
          • evidential.regression
        • g_vbll
        • graph_posterior_network
        • het_net
        • laplace
          • laplace.torch
            • LaplaceRepresenter
        • mahalanobis
        • masksembles
        • natural_posterior_network
        • posterior_network
        • prior_network
          • PriorNetworkPredictor
        • sngp
        • subensemble
        • swag
        • vbll
      • metrics
        • jax
          • jax_accuracy
          • jax_auc
          • jax_average_precision_score
          • jax_classwise_ece
          • jax_expected_calibration_error
          • jax_false_negative_rate
          • jax_false_positive_rate
          • jax_precision_recall_curve
          • jax_roc_auc_score
          • jax_roc_curve
        • numpy
          • numpy_accuracy
          • numpy_auc
          • numpy_average_precision_score
          • numpy_categorical_accuracy
          • numpy_categorical_classwise_ece
          • numpy_categorical_expected_calibration_error
          • numpy_classwise_ece
          • numpy_expected_calibration_error
          • numpy_false_negative_rate
          • numpy_false_positive_rate
          • numpy_precision_recall_curve
          • numpy_roc_auc_score
          • numpy_roc_curve
        • torch
          • torch_accuracy
          • torch_auc
          • torch_average_precision_score
          • torch_classwise_ece
          • torch_expected_calibration_error
          • torch_false_negative_rate
          • torch_false_positive_rate
          • torch_precision_recall_curve
          • torch_roc_auc_score
          • torch_roc_curve
      • plot
        • config
          • PlotConfig
        • credal
          • credal.plot
            • plot_credal_set
        • ood
          • plot_histogram
          • plot_pr_curve
          • plot_roc_curve
        • utils
      • predictor
        • laplace
        • sklearn
          • sklearn_predict_raw
      • quantification
        • decomposition
          • decomposition.decomposition
            • AdditiveDecomposition
            • AleatoricDecomposition
            • AleatoricEpistemicDecomposition
            • AleatoricEpistemicTotalDecomposition
            • AleatoricTotalDecomposition
            • CachingDecomposition
            • ConstantTotalDecomposition
            • Decomposer
            • Decomposition
            • EpistemicDecomposition
            • EpistemicTotalDecomposition
            • TotalDecomposition
          • decomposition.entropy
          • decomposition.ordinal
          • decomposition.scoring_rule
          • decomposition.spectral
          • decomposition.variance
          • decomposition.wasserstein
          • decomposition.zero_one
        • measure
        • notion
          • AleatoricUncertainty
          • EpistemicUncertainty
          • Notion
          • TotalUncertainty
        • scoring_rule
          • scoring_rule.jax
            • jax_brier_loss_vector
            • jax_log_loss_vector
            • jax_spherical_loss_vector
            • jax_zero_one_loss_vector
          • scoring_rule.numpy
            • numpy_brier_loss_vector
            • numpy_log_loss_vector
            • numpy_spherical_loss_vector
            • numpy_zero_one_loss_vector
          • scoring_rule.torch
            • torch_brier_loss_vector
            • torch_log_loss_vector
            • torch_spherical_loss_vector
            • torch_zero_one_loss_vector
      • representation
        • array_like
          • ArrayFlagsLike
          • ArrayLike
          • NumpyArrayLike
          • NumpyArrayLikeConvertible
          • NumpyArrayLikeImplementation
        • conformal_set
          • conformal_set.jax
            • JaxIntervalConformalSet
            • JaxOneHotConformalSet
          • conformal_set.numpy
            • NumpyIntervalConformalSet
            • NumpyOneHotConformalSet
          • conformal_set.torch
            • TorchIntervalConformalSet
            • TorchOneHotConformalSet
        • credal_set
          • credal_set.jax
            • JaxCategoricalCredalSet
            • JaxConvexCredalSet
            • JaxDirichletLevelSetCredalSet
            • JaxDistanceBasedCredalSet
            • JaxProbabilityIntervalsCredalSet
          • credal_set.numpy
            • NumpyCategoricalCredalSet
            • NumpyConvexCredalSet
            • NumpyDiscreteCredalSet
            • NumpyDistanceBasedCredalSet
            • NumpyProbabilityIntervalsCredalSet
            • NumpySingletonCredalSet
          • credal_set.numpy_functions
          • credal_set.torch
            • TorchCategoricalCredalSet
            • TorchConvexCredalSet
            • TorchDirichletLevelSetCredalSet
            • TorchDistanceBasedCredalSet
            • TorchProbabilityIntervalsCredalSet
        • distribution
          • distribution.jax_bernoulli
            • JaxBernoulliDistribution
            • JaxBernoulliDistributionSample
            • JaxLogitBernoulliDistribution
            • JaxProbabilityBernoulliDistribution
          • distribution.jax_categorical
            • JaxCategoricalDistribution
            • JaxCategoricalDistributionSample
            • JaxLogitCategoricalDistribution
            • JaxProbabilityCategoricalDistribution
          • distribution.jax_dirichlet
            • JaxDirichletDistribution
          • distribution.jax_gaussian
            • JaxGaussianDistribution
            • JaxGaussianDistributionSample
          • distribution.numpy_bernoulli
            • NumpyBernoulliDistribution
            • NumpyBernoulliDistributionSample
            • NumpyLogitBernoulliDistribution
            • NumpyProbabilityBernoulliDistribution
          • distribution.numpy_categorical
            • NumpyCategoricalDistribution
            • NumpyCategoricalDistributionSample
            • NumpyLogitCategoricalDistribution
            • NumpyProbabilityCategoricalDistribution
          • distribution.numpy_dirichlet
            • NumpyDirichletDistribution
          • distribution.numpy_gaussian
            • NumpyGaussianDistribution
            • NumpyGaussianDistributionSample
          • distribution.torch_bernoulli
            • TorchBernoulliDistribution
            • TorchBernoulliDistributionSample
            • TorchLogitBernoulliDistribution
            • TorchProbabilityBernoulliDistribution
          • distribution.torch_categorical
            • TorchCategoricalDistribution
            • TorchCategoricalDistributionSample
            • TorchLogitCategoricalDistribution
            • TorchProbabilityCategoricalDistribution
          • distribution.torch_dirichlet
            • TorchDirichletDistribution
          • distribution.torch_gaussian
            • TorchGaussianDistribution
            • TorchGaussianDistributionSample
          • distribution.torch_mixture
            • TorchDirichletMixtureDistribution
            • TorchMixtureDistribution
          • distribution.torch_sparse_log_categorical
            • TorchSparseLogCategoricalDistribution
            • TorchSparseLogCategoricalDistributionSample
        • embedding
          • embedding.torch
            • TorchEmbedding
            • TorchEmbeddingSample
            • TorchEmbeddingSampleSample
        • jax_functions
          • SupportsJaxFunction
          • handle_jax_function
          • has_jax_function
          • jax_absolute
          • jax_add
          • jax_astype
          • jax_average
          • jax_bitwise_and
          • jax_bitwise_or
          • jax_bitwise_xor
          • jax_concatenate
          • jax_conj
          • jax_copy
          • jax_divmod
          • jax_equal
          • jax_expand_dims
          • jax_floor_divide
          • jax_function_dispatch
          • jax_greater
          • jax_greater_equal
          • jax_invert
          • jax_left_shift
          • jax_less
          • jax_less_equal
          • jax_matmul
          • jax_matrix_transpose
          • jax_mean
          • jax_moveaxis
          • jax_multiply
          • jax_negative
          • jax_not_equal
          • jax_positive
          • jax_power
          • jax_remainder
          • jax_reshape
          • jax_right_shift
          • jax_squeeze
          • jax_stack
          • jax_std
          • jax_subtract
          • jax_sum
          • jax_swapaxes
          • jax_take_along_axis
          • jax_transpose
          • jax_true_divide
          • jax_var
          • try_jax_function
        • jax_like
          • JaxLike
          • JaxLikeConvertible
          • JaxLikeImplementation
        • jax_operators
          • JaxOperatorsMixin
        • representation
          • Representation
        • sample
          • sample.axis_tracking
            • ArrayIndex
            • AxisTrackingResult
            • track_axis
          • sample.jax
            • JaxSample
          • sample.jax_axis_tracking
          • sample.jax_functions
            • JaxSampleCreator
            • JaxSampleInternals
            • jax_concatenate_function
            • jax_conj_function
            • jax_copy_function
            • jax_expand_dims_function
            • jax_function_override
            • jax_internals_override
            • jax_matrix_transpose_function
            • jax_moveaxis_function
            • jax_reduction_function
            • jax_reshape_function
            • jax_sample_internals
            • jax_squeeze_function
            • jax_stack_function
            • jax_swapaxes_function
            • jax_take_along_axis_function
            • jax_transpose_function
          • sample.numpy
            • NumpySample
          • sample.numpy_functions
            • NumpySampleCreator
            • NumpySampleInternals
            • numpy_apply_along_axis_function
            • numpy_concatenate_function
            • numpy_copy_function
            • numpy_expand_dims_function
            • numpy_function_override
            • numpy_internals_override
            • numpy_matrix_transpose
            • numpy_reduction_function
            • numpy_reshape_function
            • numpy_sample_axis_preserving_function
            • numpy_sample_internals
            • numpy_squeeze_function
            • numpy_stack_function
            • numpy_swapaxes_function
            • numpy_transpose
            • track_sample_axis_after_reduction
          • sample.torch
            • TorchSample
          • sample.torch_axis_tracking
          • sample.torch_functions
            • TorchSampleCreator
            • TorchSampleInternals
            • torch_adjoint_function
            • torch_cat_function
            • torch_function_override
            • torch_internals_override
            • torch_movedim_function
            • torch_permute_function
            • torch_reduction_function
            • torch_sample_internals
            • torch_stack_function
            • torch_transpose_function
            • track_sample_dim_after_reduction
        • text_generation
          • text_generation.torch
            • TorchTextGeneration
            • TorchTextGenerationSample
            • TorchTextGenerationSampleSample
            • TorchTokenGeneration
        • torch_functions
          • torch_average
        • torch_like
          • TorchLike
          • TorchLikeConvertible
          • TorchLikeImplementation
      • representer
        • clarifier
          • clarifier.huggingface
            • HFQuestionClarifier
        • credal_set
          • ConvexCredalSetRepresenter
          • ProbabilityIntervalsRepresenter
          • RepresentativeConvexCredalSetRepresenter
          • SampleMeanConvexCredalSetRepresenter
        • embedder
          • embedder.huggingface
            • HFTextEmbedder
            • SentenceTransformerLike
        • sampler
          • sampler.flax
            • register_forced_train_mode
          • sampler.huggingface
            • HFTextGenerationSampler
            • load_model
          • sampler.sklearn
            • register_forced_fitted_already_mode
          • sampler.torch
            • register_forced_train_mode
        • semantic_clustering
          • semantic_clustering.huggingface
            • HFGreedySemanticClusterer
            • HFSemanticClusterer
        • torch_credal_set
          • torch_compute_representative_sample
      • train
      • transformation
        • batchensemble
        • bayesian
        • bayesian_ensemble
        • calibration
          • calibration.flax
            • FlaxAffineLogitCalibrationPredictor
            • FlaxDirichletCalibrationPredictor
            • FlaxIdentityLogitModel
            • FlaxIsotonicCalibrationPredictor
            • flax_calibration_generator
          • calibration.sklearn
            • SklearnIdentityLogitEstimator
            • SklearnVectorScalingPredictor
            • sklearn_calibrated_classifier_cv_calibrate
            • sklearn_calibration_generator
          • calibration.torch
            • TorchAffineLogitCalibrationPredictor
            • TorchDirichletCalibrationPredictor
            • TorchIdentityLogitModel
            • TorchIsotonicCalibrationPredictor
            • torch_calibration_generator
          • flax_identity_logit_model
          • sklearn_identity_logit_estimator
          • torch_identity_logit_model
        • cast
        • class_bias_ensemble
        • conformal
          • conformal.flax
            • FlaxConformalSetPredictor
          • conformal.sklearn
            • SklearnConformalSetPredictor
          • conformal.torch
            • TorchConformalSetPredictor
        • conformal_credal_set
          • conformal_credal_set.torch
            • TorchConformalCredalSetPredictor
        • dirichlet_clipped_exp_one_activation
        • dirichlet_exp_activation
        • dirichlet_softplus_activation
        • dropconnect
        • dropout
        • ensemble
        • interval_classifier
        • masksembles
        • natural_posterior_network
          • natural_posterior_network.torch
            • TorchNaturalPosteriorNetwork
        • normal_inverse_gamma_head
        • posterior_network
        • subensemble
        • transformation
          • PredictorTransformation
          • PredictorTransformationDecorator
          • predictor_transformation
      • traverse_nn
        • flax
        • reset_traverser
        • torch
        • torch_utils
        • utils
          • find_layer
          • find_layers
          • get_output_dim
          • layer_finder
      • utils
        • iterable
          • first_element
        • jax
          • jax_entropy
          • jax_fresh_prng_key
          • jax_intersection_probability
        • quantile
          • quantile.jax
          • quantile.torch
        • switchdispatch
        • torch
          • torch_collect_outputs
          • torch_entropy
          • torch_head_dimension
          • torch_intersection_probability
          • torch_reset_all_parameters
          • torch_temperature_softmax
  • Adding a New Method
  • References and Further Reading
  • FAQ and Troubleshooting
Back to top
Copyright © 2026, probly team
Made with Sphinx and @pradyunsg's Furo