Matrix.
rate_choice
Given a choice, assign ratings (dictionary values) to given criteria (dictionary keys).
choice (str) – The name of the choice to be evaluated.
**criteria_to_ratings (float) – The criterion-rating pairs.
ValueError – If any of the given criteria is not continuous.
ValueError
Examples
>>> import matrix >>> m = matrix.Matrix( ... # choices=('apple',), # No need to add choice here! ... criteria=('taste', 'color'), ... weights=(7, 3) ... ) >>> m.rate_choice('apple', taste=7, color=5) >>> m | | taste | color | Percentage | |:-------|--------:|--------:|:-------------| | Weight | 7 | 3 | | | apple | 7 | 5 | 64.0 |