apply.MARA: Apply the MARA (Magnitude of the Area for the Ranking of...

View source: R/MARA.R

apply.MARAR Documentation

Apply the MARA (Magnitude of the Area for the Ranking of Alternatives) Method

Description

MARA ranks alternatives based on multiple criteria, each weighted. Columns in beneficial.vector are treated as "max" (beneficial), and columns not in beneficial.vector are treated as "min" (cost).

Usage

apply.MARA(mat, weights, beneficial.vector)

Arguments

mat

A numeric matrix with each row an alternative and each column a criterion.

weights

A numeric vector of weights for each criterion (same length as number of columns).

beneficial.vector

An integer vector of column indices for the beneficial (max) criteria.

Details

The following function is the R implementation of the python function mara from the pyDecision package Source: https://github.com/Valdecy/pyDecision/blob/master/pyDecision/algorithm/mara.py

Value

A numeric vector of MARA scores for each alternative.

Examples

# Example
mat <- matrix(c(10, 2,
                20, 4,
                15, 5),
              nrow = 3, byrow = TRUE)
weights <- c(0.7, 0.3)
beneficial.vector <- c(1)  # First column is beneficial (max); second is cost (min)
apply.MARA(mat, weights, beneficial.vector)


RMCDA documentation built on June 8, 2025, 11:14 a.m.