Update confidence docstrings

stix2.1
Emmanuelle Vargas-Gonzalez 2017-10-11 13:16:59 -04:00
parent 2ec8205f1e
commit b99d9e4132
1 changed files with 121 additions and 90 deletions

View File

@ -7,12 +7,16 @@ def none_low_med_high_to_value(scale_value):
This method will transform a string value from the None / Low / Med / This method will transform a string value from the None / Low / Med /
High scale to its confidence integer representation. High scale to its confidence integer representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. ==================== =====================
"None" -> 0 None/ Low/ Med/ High STIX Confidence Value
"Low" -> 15 ==================== =====================
"Med" -> 50 Not Specified Not Specified
"High" -> 85 None 0
Low 15
Med 50
High 85
==================== =====================
Args: Args:
scale_value: A string value from the scale. Accepted strings are scale_value: A string value from the scale. Accepted strings are
@ -42,12 +46,15 @@ def value_to_none_low_medium_high(confidence_value):
This method will transform an integer value into the None / Low / Med / This method will transform an integer value into the None / Low / Med /
High scale string representation. High scale string representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. =============== ====================
0 -> "None" Range of Values None/ Low/ Med/ High
1-29 -> "Low" =============== ====================
30-69 -> "Med" 0 None
70-100 -> "High" 1-29 Low
30-69 Med
70-100 High
=============== ====================
Args: Args:
confidence_value: An integer value between 0 and 100. confidence_value: An integer value between 0 and 100.
@ -76,19 +83,22 @@ def zero_ten_to_value(scale_value):
This method will transform a string value from the 0-10 scale to its This method will transform a string value from the 0-10 scale to its
confidence integer representation. confidence integer representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. ==================== =====================
"0" -> 0 0-10 Scale STIX Confidence Value
"1" -> 10 ==================== =====================
"2" -> 20 0 0
"3" -> 30 1 10
"4" -> 40 2 20
"5" -> 50 3 30
"6" -> 60 4 40
"7" -> 70 5 50
"8" -> 80 6 60
"9" -> 90 7 70
"10" -> 100 8 80
9 90
10 100
==================== =====================
Args: Args:
scale_value: A string value from the scale. Accepted strings are "0" scale_value: A string value from the scale. Accepted strings are "0"
@ -133,19 +143,22 @@ def value_to_zero_ten(confidence_value):
This method will transform an integer value into the 0-10 scale string This method will transform an integer value into the 0-10 scale string
representation. representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. =============== ==========
0-4 -> "0" Range of Values 0-10 Scale
5-14 -> "1" =============== ==========
15-24 -> "2" 0-4 0
25-34 -> "3" 5-14 1
35-44 -> "4" 15-24 2
45-54 -> "5" 25-34 3
55-64 -> "6" 35-44 4
65-74 -> "7" 45-54 5
75-84 -> "8" 55-64 6
85-94 -> "9" 65-74 7
95-100 -> "10" 75-84 8
85-94 9
95-100 10
=============== ==========
Args: Args:
confidence_value: An integer value between 0 and 100. confidence_value: An integer value between 0 and 100.
@ -188,14 +201,17 @@ def admiralty_credibility_to_value(scale_value):
This method will transform a string value from the Admiralty Credibility This method will transform a string value from the Admiralty Credibility
scale to its confidence integer representation. scale to its confidence integer representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. ============================== =====================
"6 - Truth cannot be judged" -> N/A Admiralty Credibility STIX Confidence Value
"5 - Improbable" -> 10 ============================== =====================
"4 - Doubtful" -> 30 6 - Truth cannot be judged (Not present)
"3 - Possibly True" -> 50 5 - Improbable 10
"2 - Probably True" -> 70 4 - Doubtful 30
"1 - Confirmed by other sources" -> 90 3 - Possibly True 50
2 - Probably True 70
1 - Confirmed by other sources 90
============================== =====================
Args: Args:
scale_value: A string value from the scale. Accepted strings are scale_value: A string value from the scale. Accepted strings are
@ -232,14 +248,17 @@ def value_to_admiralty_credibility(confidence_value):
This method will transform an integer value into the Admiralty Credibility This method will transform an integer value into the Admiralty Credibility
scale string representation. scale string representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. =============== ==============================
N/A -> "6 - Truth cannot be judged" Range of Values Admiralty Credibility
0-19 -> "5 - Improbable" =============== ==============================
20-39 -> "4 - Doubtful" N/A 6 - Truth cannot be judged
40-59 -> "3 - Possibly True" 0-19 5 - Improbable
60-79 -> "2 - Probably True" 20-39 4 - Doubtful
80-100 -> "1 - Confirmed by other sources" 40-59 3 - Possibly True
60-79 2 - Probably True
80-100 1 - Confirmed by other sources
=============== ==============================
Args: Args:
confidence_value: An integer value between 0 and 100. confidence_value: An integer value between 0 and 100.
@ -271,15 +290,18 @@ def wep_to_value(scale_value):
This method will transform a string value from the WEP scale to its This method will transform a string value from the WEP scale to its
confidence integer representation. confidence integer representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. ==================================== =====================
"Impossible" -> 0 WEP STIX Confidence Value
"Highly Unlikely/Almost Certainly Not" -> 10 ==================================== =====================
"Unlikely/Probably Not" -> 20 Impossible 0
"Even Chance" -> 50 Highly Unlikely/Almost Certainly Not 10
"Likely/Probable" -> 70 Unlikely/Probably Not 20
"Highly likely/Almost Certain" -> 90 Even Chance 50
"Certain" -> 100 Likely/Probable 70
Highly likely/Almost Certain 90
Certain 100
==================================== =====================
Args: Args:
scale_value: A string value from the scale. Accepted strings are scale_value: A string value from the scale. Accepted strings are
@ -319,15 +341,18 @@ def value_to_wep(confidence_value):
This method will transform an integer value into the WEP scale string This method will transform an integer value into the WEP scale string
representation. representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. =============== ====================================
0 -> "Impossible" Range of Values WEP
1-19 -> "Highly Unlikely/Almost Certainly Not" =============== ====================================
20-39 -> "Unlikely/Probably Not" 0 Impossible
40-59 -> "Even Chance" 1-19 Highly Unlikely/Almost Certainly Not
60-79 -> "Likely/Probable" 20-39 Unlikely/Probably Not
80-99 -> "Highly likely/Almost Certain" 40-59 Even Chance
100 -> "Certain" 60-79 Likely/Probable
80-99 Highly likely/Almost Certain
100 Certain
=============== ====================================
Args: Args:
confidence_value: An integer value between 0 and 100. confidence_value: An integer value between 0 and 100.
@ -362,15 +387,18 @@ def dni_to_value(scale_value):
This method will transform a string value from the DNI scale to its This method will transform a string value from the DNI scale to its
confidence integer representation. confidence integer representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. ======================================= =====================
"Almost No Chance / Remote" -> 5 DNI Scale STIX Confidence Value
"Very Unlikely / Highly Improbable" -> 15 ======================================= =====================
"Unlikely / Improbable" -> 30 Almost No Chance / Remote 5
"Roughly Even Change / Roughly Even Odds" -> 50 Very Unlikely / Highly Improbable 15
"Likely / Probable" -> 70 Unlikely / Improbable 30
"Very Likely / Highly Probable" -> 85 Roughly Even Change / Roughly Even Odds 50
"Almost Certain / Nearly Certain" -> 95 Likely / Probable 70
Very Likely / Highly Probable 85
Almost Certain / Nearly Certain 95
======================================= =====================
Args: Args:
scale_value: A string value from the scale. Accepted strings are scale_value: A string value from the scale. Accepted strings are
@ -410,15 +438,18 @@ def value_to_dni(confidence_value):
This method will transform an integer value into the DNI scale string This method will transform an integer value into the DNI scale string
representation. representation.
Notes: The scale for this confidence representation is the following:
The scale for this confidence representation is the following. =============== =======================================
0-9 -> "Almost No Chance / Remote" Range of Values DNI Scale
10-19 -> "Very Unlikely / Highly Improbable" =============== =======================================
20-39 -> "Unlikely / Improbable" 0-9 Almost No Chance / Remote
40-59 -> "Roughly Even Change / Roughly Even Odds" 10-19 Very Unlikely / Highly Improbable
60-79 -> "Likely / Probable" 20-39 Unlikely / Improbable
80-89 -> "Very Likely / Highly Probable" 40-59 Roughly Even Change / Roughly Even Odds
90-100 -> "Almost Certain / Nearly Certain" 60-79 Likely / Probable
80-89 Very Likely / Highly Probable
90-100 Almost Certain / Nearly Certain
=============== =======================================
Args: Args:
confidence_value: An integer value between 0 and 100. confidence_value: An integer value between 0 and 100.