![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
An ONNX model that scores a feature vector. The model must take one float tensor of shape [1, FEATURE_COUNT] (or [N, FEATURE_COUNT]) and output a float tensor whose last value is the malicious probability: [1, 1] or [1, 2] (benign, malicious). See README.md. More...
#include <PanoptesML.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| MlModel (const std::wstring &ModelPath) | |
| Loads the model. Throws Ort::Exception or std::runtime_error when it can't be loaded or doesn't take FEATURE_COUNT features. | |
| MlModel (const void *Data, size_t Size, const std::string &Name) | |
| The same, from the model's bytes in memory. Name is what results report as the model. | |
| ~MlModel () | |
| MlModel (const MlModel &)=delete | |
| MlModel & | operator= (const MlModel &)=delete |
| float | Score (const std::vector< float > &Features) |
| Runs the model on one file's features. Returns the malicious probability. | |
| const std::string & | Name () const |
An ONNX model that scores a feature vector. The model must take one float tensor of shape [1, FEATURE_COUNT] (or [N, FEATURE_COUNT]) and output a float tensor whose last value is the malicious probability: [1, 1] or [1, 2] (benign, malicious). See README.md.
Definition at line 73 of file PanoptesML.h.
|
explicit |
Loads the model. Throws Ort::Exception or std::runtime_error when it can't be loaded or doesn't take FEATURE_COUNT features.
Definition at line 44 of file ml_model.cpp.
Referenced by MlModel(), and operator=().
| MlModel::MlModel | ( | const void * | Data, |
| size_t | Size, | ||
| const std::string & | Name ) |
The same, from the model's bytes in memory. Name is what results report as the model.
Definition at line 52 of file ml_model.cpp.
References Name().
|
default |
|
inline |
Definition at line 87 of file PanoptesML.h.
Referenced by MlModel(), PanoEntry(), and PanoMlScoreFile().
| float MlModel::Score | ( | const std::vector< float > & | Features | ) |
Runs the model on one file's features. Returns the malicious probability.
Definition at line 99 of file ml_model.cpp.
References FEATURE_COUNT.
Referenced by PanoEntry(), and PanoMlScoreFile().