File tree Expand file tree Collapse file tree 5 files changed +22
-9
lines changed
Expand file tree Collapse file tree 5 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,18 @@ class Classifier {
4040
4141 /* *
4242 * @brief Perform classification of one flow
43+ * Only flowFeatures fields set by setFeatureSourceIDs() are processed
4344 *
4445 * @param flowFeatures flow features to classify
45- * @return double classification result
46+ * @return ClfResult classification result
4647 */
4748 virtual ClfResult classify (const FlowFeatures& flowFeatures) = 0;
4849
4950 /* *
5051 * @brief Perform classification of burst of flows
5152 *
5253 * @param burstOfFlowFeatures burst of flow features to classify
53- * @return std::vector<double > classification results
54+ * @return std::vector<ClfResult > classification results
5455 */
5556 virtual std::vector<ClfResult> classify (const std::vector<FlowFeatures>& burstOfFlowFeatures)
5657 = 0;
Original file line number Diff line number Diff line change @@ -48,8 +48,10 @@ class IpPrefixClassifier : public Classifier {
4848
4949 /* *
5050 * @brief Classify single flowFeature object
51- * ClfResult contains non-zero double value if flowFeatures contained a field with IP from
52- * blocklist, otherwise the double value is set to zero
51+ * Source fields of flowFeatures objects must hold a value of type WIF::IpAddress
52+ *
53+ * ClfResult contains a single non-zero double value if flowFeatures contained a field with IP
54+ * from blocklist, otherwise the double value is set to zero
5355 *
5456 * @param flowFeatures flow features to classify
5557 * @return ClfResult result of the classification
Original file line number Diff line number Diff line change @@ -36,17 +36,22 @@ class RegexClassifier : public Classifier {
3636
3737 /* *
3838 * @brief Classify single flowFeature object
39+ * Source fields of flowFeatures objects must hold a value of type std::string
40+ * If more source fields is set, the sub-results are combined together by a Combinator obtained
41+ * in the constructor
42+ *
43+ * ClfResult contains a single double value obtained from the combinator
3944 *
4045 * @param flowFeatures
41- * @return double
46+ * @return ClfResult
4247 */
4348 ClfResult classify (const FlowFeatures& flowFeatures) override ;
4449
4550 /* *
4651 * @brief Classify a burst of flow features
4752 *
4853 * @param burstOfFlowsFeatures
49- * @return std::vector<double >
54+ * @return std::vector<ClfResult >
5055 */
5156 std::vector<ClfResult> classify (const std::vector<FlowFeatures>& burstOfFlowsFeatures) override ;
5257
Original file line number Diff line number Diff line change @@ -50,17 +50,22 @@ class ScikitMlClassifier : public Classifier {
5050
5151 /* *
5252 * @brief Classify single flowFeature object
53+ * Source fields of flowFeatures objects must hold a value of type double
54+ * Fields are passed to the ML model in the order of passed source feature IDs
55+ *
56+ * ClfResult contains std::vector<double> representing output of predict_proba() call
57+ * with probabilities of each class
5358 *
5459 * @param flowFeatures
55- * @return double
60+ * @return ClfResult
5661 */
5762 ClfResult classify (const FlowFeatures& flowFeatures) override ;
5863
5964 /* *
6065 * @brief Classify a burst of flow features
6166 *
6267 * @param burstOfFlowsFeatures
63- * @return std::vector<double >
68+ * @return std::vector<ClfResult >
6469 */
6570 std::vector<ClfResult> classify (const std::vector<FlowFeatures>& burstOfFlowsFeatures) override ;
6671
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class BinaryDSTCombinator : public Combinator {
3131 * together and the resulting probability of the positive hypothesis is returned.
3232 *
3333 * @param valuesToCombine vector of doubles to combine
34- * @return double DST combination of input values
34+ * @return double belief of the positive hypothesis after DST combination
3535 */
3636 double combine (const std::vector<double >& valuesToCombine) override ;
3737};
You can’t perform that action at this time.
0 commit comments