scales¶
Functions to perform conversions between the different Confidence scales. As specified in STIX™ Version 2.1. Part 1: STIX Core Concepts  Appendix B

admiralty_credibility_to_value
(scale_value)¶ This method will transform a string value from the Admiralty Credibility scale to its confidence integer representation.
The scale for this confidence representation is the following:
¶ Admiralty Credibility STIX Confidence Value 6  Truth cannot be judged (Not present) 5  Improbable 10 4  Doubtful 30 3  Possibly True 50 2  Probably True 70 1  Confirmed by other sources 90 Parameters: scale_value (str) – A string value from the scale. Accepted strings are “6  Truth cannot be judged”, “5  Improbable”, “4  Doubtful”, “3  Possibly True”, “2  Probably True” and “1  Confirmed by other sources”. Argument is case sensitive. Returns: int –  The numerical representation corresponding to values in the
 Admiralty Credibility scale.
Raises: ValueError
– If scale_value is not within the accepted strings.

dni_to_value
(scale_value)¶ This method will transform a string value from the DNI scale to its confidence integer representation.
The scale for this confidence representation is the following:
¶ DNI Scale STIX Confidence Value Almost No Chance / Remote 5 Very Unlikely / Highly Improbable 15 Unlikely / Improbable 30 Roughly Even Chance / Roughly Even Odds 50 Likely / Probable 70 Very Likely / Highly Probable 85 Almost Certain / Nearly Certain 95 Parameters: scale_value (str) – A string value from the scale. Accepted strings are “Almost No Chance / Remote”, “Very Unlikely / Highly Improbable”, “Unlikely / Improbable”, “Roughly Even Chance / Roughly Even Odds”, “Likely / Probable”, “Very Likely / Highly Probable” and “Almost Certain / Nearly Certain”. Argument is case sensitive. Returns: int –  The numerical representation corresponding to values in the DNI
 scale.
Raises: ValueError
– If scale_value is not within the accepted strings.

none_low_med_high_to_value
(scale_value)¶ This method will transform a string value from the None / Low / Med / High scale to its confidence integer representation.
The scale for this confidence representation is the following:
¶ None/ Low/ Med/ High STIX Confidence Value Not Specified Not Specified None 0 Low 15 Med 50 High 85 Parameters: scale_value (str) – A string value from the scale. Accepted strings are “None”, “Low”, “Med” and “High”. Argument is case sensitive. Returns: int –  The numerical representation corresponding to values in the
 None / Low / Med / High scale.
Raises: ValueError
– If scale_value is not within the accepted strings.

value_to_admiralty_credibility
(confidence_value)¶ This method will transform an integer value into the Admiralty Credibility scale string representation.
The scale for this confidence representation is the following:
¶ Range of Values Admiralty Credibility N/A 6  Truth cannot be judged 019 5  Improbable 2039 4  Doubtful 4059 3  Possibly True 6079 2  Probably True 80100 1  Confirmed by other sources Parameters: confidence_value (int) – An integer value between 0 and 100. Returns: str – A string corresponding to the Admiralty Credibility scale. Raises: ValueError
– If confidence_value is out of bounds.

value_to_dni
(confidence_value)¶ This method will transform an integer value into the DNI scale string representation.
The scale for this confidence representation is the following:
¶ Range of Values DNI Scale 09 Almost No Chance / Remote 1019 Very Unlikely / Highly Improbable 2039 Unlikely / Improbable 4059 Roughly Even Chance / Roughly Even Odds 6079 Likely / Probable 8089 Very Likely / Highly Probable 90100 Almost Certain / Nearly Certain Parameters: confidence_value (int) – An integer value between 0 and 100. Returns: str – A string corresponding to the DNI scale. Raises: ValueError
– If confidence_value is out of bounds.

value_to_none_low_medium_high
(confidence_value)¶ This method will transform an integer value into the None / Low / Med / High scale string representation.
The scale for this confidence representation is the following:
¶ Range of Values None/ Low/ Med/ High 0 None 129 Low 3069 Med 70100 High Parameters: confidence_value (int) – An integer value between 0 and 100. Returns: str – A string corresponding to the None / Low / Med / High scale. Raises: ValueError
– If confidence_value is out of bounds.

value_to_wep
(confidence_value)¶ This method will transform an integer value into the WEP scale string representation.
The scale for this confidence representation is the following:
¶ Range of Values WEP 0 Impossible 119 Highly Unlikely/Almost Certainly Not 2039 Unlikely/Probably Not 4059 Even Chance 6079 Likely/Probable 8099 Highly likely/Almost Certain 100 Certain Parameters: confidence_value (int) – An integer value between 0 and 100. Returns: str – A string corresponding to the WEP scale. Raises: ValueError
– If confidence_value is out of bounds.

value_to_zero_ten
(confidence_value)¶ This method will transform an integer value into the 010 scale string representation.
The scale for this confidence representation is the following:
¶ Range of Values 010 Scale 04 0 514 1 1524 2 2534 3 3544 4 4554 5 5564 6 6574 7 7584 8 9594 9 95100 10 Parameters: confidence_value (int) – An integer value between 0 and 100. Returns: str – A string corresponding to the 010 scale. Raises: ValueError
– If confidence_value is out of bounds.

wep_to_value
(scale_value)¶ This method will transform a string value from the WEP scale to its confidence integer representation.
The scale for this confidence representation is the following:
¶ WEP STIX Confidence Value Impossible 0 Highly Unlikely/Almost Certainly Not 10 Unlikely/Probably Not 20 Even Chance 50 Likely/Probable 70 Highly likely/Almost Certain 90 Certain 100 Parameters: scale_value (str) – A string value from the scale. Accepted strings are “Impossible”, “Highly Unlikely/Almost Certainly Not”, “Unlikely/Probably Not”, “Even Chance”, “Likely/Probable”, “Highly likely/Almost Certain” and “Certain”. Argument is case sensitive. Returns: int –  The numerical representation corresponding to values in the WEP
 scale.
Raises: ValueError
– If scale_value is not within the accepted strings.

zero_ten_to_value
(scale_value)¶ This method will transform a string value from the 010 scale to its confidence integer representation.
The scale for this confidence representation is the following:
¶ 010 Scale STIX Confidence Value 0 0 1 10 2 20 3 30 4 40 5 50 6 60 7 70 8 80 9 90 10 100 Parameters: scale_value (str) – A string value from the scale. Accepted strings are “0” through “10” inclusive. Returns: int –  The numerical representation corresponding to values in the 010
 scale.
Raises: ValueError
– If scale_value is not within the accepted strings.