API reference

The main module where everything is.

Todo

  • API
    • In methods that adds criteria, criteria names and weights should be a dictionary

  • Names
    • Better terminology overall; improve parameter names

    • Better name for adding criteria values and their scores for continuous criteria. They should start with the word ‘add’

    • Better name for ‘add_data’

Warning

Avoid nonsensical values for all floats, such as nan, inf, and extremely large numbers that can cause an overflow in numpy.

Matrix(*choices, **kwargs)

Matrix.__repr__()

Provides a view to the final decision matrix

Matrix.criteria

The names of the criteria that are not added as continuous.

Matrix.all_choices

Returns a view of the current choices in the matrix

Matrix.all_criteria

Returns a view of the current criteria in the matrix

Matrix.add_choices(*choices)

Add items to choose from into the matrix.

Matrix.add_criteria(*criteria, weights, …)

Add multiple criteria into the matrix to evaluate each choice against.

Matrix.add_continuous_criteria(*criteria, …)

Add multiple continuous criteria into the matrix to evaluate each choice against.

Matrix.add_criterion(criterion, *, weight, …)

Add a criterion into the matrix to evaluate each choice against.

Matrix.add_continuous_criterion(criterion, …)

Add a continuous criterion into the matrix to evaluate each choice against.

Matrix.rate_criterion(criterion, …)

Given a criterion, assign ratings (dictionary values) to given choices (dictionary keys).

Matrix.rate_choice(choice, **criteria_to_ratings)

Given a choice, assign ratings (dictionary values) to given criteria (dictionary keys).

Matrix.rate_choices(…)

Given some choices, assign ratings (dictionary values) to given criteria (dictionary keys).

Matrix.if_(**criterion_to_value)

The first method in the if-then chain syntatic sugar for declaring what score should a choice receive given the values for the criterion.

Matrix.then(*, score)

The last method in the if-then chain syntatic sugar for declaring what score should a choice receive given the values for the criterion.

Matrix.criteria_values_to_scores(…)

For multiple continuous criteria, declare what score should a choice receive given values for that criterion.

Matrix.values_to_score_from_record(…)

For multiple continuous criteria, declare what score should a choice receive given values for that criterion.

Matrix.criterion_value_to_score(…)

Declare what score should a choice receive for a continuous criterion, given the values for that criterion.

Matrix.add_data(choice, values_dict, …)

Adds criterion data for the given choice, which is used to calculate their score.

Matrix.batch_add_data(choices_and_values, …)

For multiple choices, add criterion data.

Matrix.update_weight(criterion, weight)

Update the weight of a given criterion

Matrix.rename_criteria(criterion, name, …)

Update the name of a given criterion

Matrix.rename_choices(choice, name, …)

Update the name of a given choice

Matrix.update_rating(choice, criterion, rating)

Update the rating given to the choice in the criterion

Matrix.update_criterion_value_to_score(…)

Update the value and/or score pair of a given continuous criterion

Matrix.remove_criterion_value_to_score(row)

Remove a criterion value-score pair by row/index number.

Matrix.plot()

Visualise the percentages of all choices.

Matrix.plot_interpolator(criterion_name[, …])

Visualize the interpolator function used.