Skip to main content

EvaluateMLModllAtProduction

This Script is part of the Machine Learning Pack.#

Evaluates an ML model in production.

Script Data#


NameDescription
Script Typepython3
Tagsml
Cortex XSOAR Version5.0.0

Dependencies#


This script uses the following commands and scripts.

  • GetIncidentsByQuery
  • GetMLModelEvaluation

Used In#


This script is used in the following playbooks and scripts.

  • EvaluateMLModllAtProduction-Test

Inputs#


Argument NameDescription
incidentTypesA common-separated list of incident types by which to filter.
incidentsQueryThe incident query to fetch the training data for the model.
emailTagKeyThe field name with the email tag. Supports a comma-separated list, the first non-empty value will be taken.
emailPredictionKeyThe field name with the model prediction.
emailPredictionProbabilityKeyThe field name with the model prediction probability.
modelTargetAccuracyThe model target accuracy, between 0 and 1.
phishingLabelsA comma-separated list of email tags values and mapping. The script considers only the tags specified in this field. You can map label to another value by using this format: LABEL:MAPPED_LABEL. For example, for 4 values in email tag: malicious, credentials harvesting, inner communitcation, external legit email, unclassified. While training, we want to ignore "unclassified" tag, and refer to "credentials harvesting" as "malicious" too. Also, we want to merge "inner communitcation" and "external legit email" to one tag called "non-malicious". The input will be: malicious, credentials harvesting:malicious, inner communitcation:non-malicious, external legit email:non-malicious
additionalFieldsA comma-separated list of incident field names to include in the results file.

Outputs#


PathDescriptionType
EvaluateMLModllAtProduction.EvaluationScoresThe model evaluation scores (precision, coverage, etc.) for the found threshold.Unknown
EvaluateMLModllAtProduction.ConfusionMatrixThe model evaluation confusion matrix for the found threshold.Unknown
EvaluateMLModllAtProductionNoThresh.EvaluationScoresThe model evaluation scores (precision, coverage, etc.) for threshold = 0.Unknown
EvaluateMLModllAtProductionNoThresh.ConfusionMatrixThe model evaluation confusion matrix for threshold = 0.Unknown