cassiopeia.solver.dissimilarity_functions.hamming_similarity_normalized_over_missing#
- cassiopeia.solver.dissimilarity_functions.hamming_similarity_normalized_over_missing(s1, s2, missing_state_indicator, weights=None)[source]#
A function to return the number of (non-missing) character/state mutations shared by two samples, normalized over the amount of missing data.
- Parameters:
- s1
List
[int
] Character states of the first sample
- s2
List
[int
] Character states of the second sample
- missing_state_indicator
int
The character representing missing values
- weights {
int
: {int
:float
}} |None
Optional
[Dict
[int
,Dict
[int
,float
]]] (default:None
) A set of optional weights to weight the similarity of a mutation
- s1
- Return type:
- Returns:
- The number of shared mutations between two samples normalized over the
number of missing data events, weighted or unweighted