GetMLModelEvaluation

Finds a threshold for ML model, and performs an evaluation based on it.

python · Base

Details

IDGetMLModelEvaluation
Languagepython
From Version5.0.0
Docker Imagedemisto/ml:1.0.0.12042988
Tagsml

README

Finds a threshold for ML model, and performs an evaluation based on it

Script Data


Name Description
Script Type python3
Tags ml
Cortex XSOAR Version 5.0.0

Inputs


Argument Name Description
yTrue A list of labels of the test set
yPred A list of dictionaries contain probability predictions for all classes
targetPrecision minimum precision of all classes, ranges 0-1
targetRecall minimum recall of all classes, ranges 0-1
detailedOutput if set to ‘true’, the output will include a full explanation of the confidence threshold meaning

Outputs


Path Description Type
GetMLModelEvaluation.Threshold The found thresholds which meets the conditions of precision and recall String
GetMLModelEvaluation.ConfusionMatrixAtThreshold The model evaluation confusion matrix for mails above the threshold. Unknown
GetMLModelEvaluation.Metrics Metrics per each class (includes precision, true positive, coverage, etc.) Unknown
args:
- description: A list of labels of the test set.
  isArray: true
  name: yTrue
  required: true
- description: A list of dictionaries contain probability predictions for all classes.
  isArray: true
  name: yPred
  required: true
- defaultValue: '0.5'
  description: minimum precision of all classes, ranges 0-1.
  name: targetPrecision
- defaultValue: '0.0'
  description: minimum recall of all classes, ranges 0-1.
  isArray: true
  name: targetRecall
- defaultValue: 'true'
  description: if set to 'true', the output will include a full explanation of the confidence threshold meaning.
  isArray: true
  name: detailedOutput
  predefined:
  - 'true'
  - 'false'
comment: Finds a threshold for ML model, and performs an evaluation based on it.
commonfields:
  id: GetMLModelEvaluation
  version: -1
enabled: true
name: GetMLModelEvaluation
outputs:
- contextPath: GetMLModelEvaluation.Threshold
  description: The found thresholds which meets the conditions of precision and recall.
  type: String
- contextPath: GetMLModelEvaluation.ConfusionMatrixAtThreshold
  description: The model evaluation confusion matrix for mails above the threshold.
  type: Unknown
- contextPath: GetMLModelEvaluation.Metrics
  description: Metrics per each class (includes precision, true positive, coverage, etc.)
  type: Unknown
script: '-'
subtype: python3
tags:
- ml
timeout: 60µs
type: python
dockerimage: demisto/ml:1.0.0.12042988
tests:
- Create Phishing Classifier V2 ML Test
fromversion: 5.0.0
runas: DBotWeakRole