class_docstr: Classification module for KDE-based anomaly detection.
  
  Args:
      n_pca_components (int, optional): Number of PCA components. Defaults to 16.
      feature_scaling_method (FeatureScalingMethod, optional): Scaling method applied to features before passing to
          KDE. Options are `norm` (normalize to unit vector length) and `scale` (scale to max length observed in
          training).
      max_training_points (int, optional): Maximum number of training points to fit the KDE model. Defaults to 40000.
class_docstr_tok: ["Classification","module","for","KDE-based","anomaly","detection",".","Args",":","n_pca_components","(","int",",","optional",")",":","Number","of","PCA","components",".","Defaults","to","16.","feature_scaling_method","(","FeatureScalingMethod",",","optional",")",":","Scaling","method","applied","to","features","before","passing","to","KDE",".","Options","are","`","norm","`","(","normalize","to","unit","vector","length",")","and","`","scale","`","(","scale","to","max","length","observed","in","training",")",".","max_training_points","(","int",",","optional",")",":","Maximum","number","of","training","points","to","fit","the","KDE","model",".","Defaults","to","40000","."]
docstr: Predicts the probability that the features belong to the anomalous class.
  
  Args:
    features (Tensor): Feature from which the output probabilities are detected.
  
  Returns:
    Detection probabilities
docstr_tok: ["Predicts","the","probability","that","the","features","belong","to","the","anomalous","class",".","Args",":","features","(","Tensor",")",":","Feature","from","which","the","output","probabilities","are","detected",".","Returns",":","Detection","probabilities"]
code: def predict(self, features: Tensor) -> Tensor:
      """Predicts the probability that the features belong to the anomalous class.
  
      Args:
        features (Tensor): Feature from which the output probabilities are detected.
  
      Returns:
        Detection probabilities
      """
  
      scores = self.compute_kde_scores(features, as_log_likelihood=True)
      probabilities = self.compute_probabilities(scores)
  
      return probabilities
  
file_path: anomalib/src/anomalib/models/components/classification/kde_classifier.py
imports: from __future__ import annotations
  import logging
  import random
  from enum import Enum
  import torch
  from torch import Tensor, nn
  from anomalib.models.components import PCA, GaussianKDE
label_desc: Use image node_id 6 for calling the KDEClassifier obj's underlying member method code with example usage: obj.predict(features) and returns: probabilities