class_docstr: Evaluator for binary classification, which expects input columns prediction and label.
  Supported metrics are 'areaUnderROC' and 'areaUnderPR'.
  
  .. versionadded:: 3.5.0
  
  Examples
  --------
  >>> from pyspark.ml.connect.evaluation import BinaryClassificationEvaluator
  >>> eva = BinaryClassificationEvaluator(metricName='areaUnderPR')
  >>> dataset = spark.createDataFrame(
  ...     [(1, 0.6), (0, 0.55), (0, 0.1), (1, 0.6), (1, 0.4)],
  ...     schema=['label', 'probability']
  ... )
  >>> eva.evaluate(dataset)
  0.9166666865348816
  >>> eva.isLargerBetter()
  True
class_docstr_tok: ["Evaluator","for","binary","classification",",","which","expects","input","columns","prediction","and","label",".","Supported","metrics","are","'areaUnderROC","'","and","'areaUnderPR","'",".","..","versionadded",":",":","3.5.0","Examples","--","--","--","--",">",">",">","from","pyspark.ml.connect.evaluation","import","BinaryClassificationEvaluator",">",">",">","eva","=","BinaryClassificationEvaluator","(","metricName='areaUnderPR","'",")",">",">",">","dataset","=","spark.createDataFrame","(","...","[","(","1",",","0.6",")",",","(","0",",","0.55",")",",","(","0",",","0.1",")",",","(","1",",","0.6",")",",","(","1",",","0.4",")","]",",","...","schema=","[","'label","'",",","'probability","'","]","...",")",">",">",">","eva.evaluate","(","dataset",")","0.9166666865348816",">",">",">","eva.isLargerBetter","(",")","True"]
code: def _get_metric_update_inputs(
      self, dataset: "pd.DataFrame"
  ) -> Tuple[Any, Any]:
      import torch
  
      values = np.stack(dataset[self.getProbabilityCol()].values)  # type: ignore[call-overload]
      preds_tensor = torch.tensor(values)
      if preds_tensor.dim() == 2:
          preds_tensor = preds_tensor[:, 1]
      labels_tensor = torch.tensor(dataset[self.getLabelCol()].values)
      return preds_tensor, labels_tensor
  
imports: from typing import Any, Union, List, Tuple
  import numpy
  import pandas
  from pyspark import keyword_only
  from pyspark.ml.param import Param, Params, TypeConverters
  from pyspark.ml.param.shared import HasLabelCol, HasPredictionCol, HasProbabilityCol
  from pyspark.ml.connect.base import Evaluator
  from pyspark.ml.connect.io_utils import ParamsReadWrite
  from pyspark.ml.connect.util import aggregate_dataframe
  from pyspark.sql import DataFrame
label_desc: Use image node_id 4 for calling the BinaryClassificationEvaluator obj's underlying member method code with example usage: obj._get_metric_update_inputs(dataset) and returns: preds_tensor,  labels_tensor