All Projects → pyAHP → pyAHP

pyAHP / pyAHP

Licence: MIT license
Python library to perform Analytic Hierarchy Process.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyAHP

ProcessInjector.NET
Learning Process Injection and Hollowing techniques
Stars: ✭ 23 (-78.1%)
Mutual labels:  process
tracetree
A tool for capturing the execution of an entire process tree
Stars: ✭ 40 (-61.9%)
Mutual labels:  process
OrgChart
Organization chart layout library
Stars: ✭ 16 (-84.76%)
Mutual labels:  hierarchy
multi-ctx
Multiple Spring Contexts Showcase
Stars: ✭ 16 (-84.76%)
Mutual labels:  hierarchy
ansible-process exporter
Provision process exporter for prometheus monitoring tool
Stars: ✭ 16 (-84.76%)
Mutual labels:  process
ReGraph
Tool for building graph-based hierarchical knowledge representation systems
Stars: ✭ 54 (-48.57%)
Mutual labels:  hierarchy
pwatch
Process watcher(pwatch)
Stars: ✭ 33 (-68.57%)
Mutual labels:  process
pscircle
https://gitlab.com/mildlyparallel/pscircle visualizes Linux processes in a form of radial tree.
Stars: ✭ 33 (-68.57%)
Mutual labels:  process
quickstep
Quickstep project
Stars: ✭ 22 (-79.05%)
Mutual labels:  analytic
zenaton-node
⚡ Node.js library to run and orchestrate background jobs with Zenaton Workflow Engine
Stars: ✭ 50 (-52.38%)
Mutual labels:  process
pidswallow
A swallower script using process hierarchy.
Stars: ✭ 40 (-61.9%)
Mutual labels:  process
not-enough-standards
A modern header-only C++ library that provides platform-independent utilities.
Stars: ✭ 197 (+87.62%)
Mutual labels:  process
Storing TreeView Structures WithMongoDB
Educational repository demonstrating approaches for storing tree structures with NoSQL database MongoDB
Stars: ✭ 95 (-9.52%)
Mutual labels:  hierarchy
workflower-bundle
A Symfony bundle for Workflower
Stars: ✭ 23 (-78.1%)
Mutual labels:  process
react
Basic Primitives Diagrams for React. Data visualization components library that implements organizational chart and multi-parent dependency diagrams.
Stars: ✭ 15 (-85.71%)
Mutual labels:  hierarchy
ogrep-rs
Outline grep — search in indentation-structured texts (Rust version)
Stars: ✭ 32 (-69.52%)
Mutual labels:  hierarchy
MODIS
Download and processing framework for MODIS imagery. The package provides automated access to the global online data archives LP DAAC, LAADS and NSIDC as well as processing capabilities such as file conversion, mosaicking, subsetting and time series.
Stars: ✭ 48 (-54.29%)
Mutual labels:  process
mackerel-plugin-linux-proc-stats
Linux processes metrics plugin for mackerel.io agent.
Stars: ✭ 13 (-87.62%)
Mutual labels:  process
AHPy
A Python implementation of the Analytic Hierarchy Process
Stars: ✭ 47 (-55.24%)
Mutual labels:  ahp
fine
🧹 Gracefully shutdown Node.js application: help you handle exit signals and cleanup
Stars: ✭ 20 (-80.95%)
Mutual labels:  process

Analytic Hierarchy Process Solver

The analytic hierarchy process (AHP) is a structured technique for organizing and analyzing complex decisions, based on mathematics and psychology. It was developed by Thomas L. Saaty in the 1970s and has been extensively studied and refined since then.[1]

The Wikipedia [2] page on AHP references two full examples of AHP and many more can be found on the internet.

pyAHP provides a flexible interface to build AHP models and solve them using a plethora of methods. Checkout the documentation here.

license CircleCI

Installation

To install pyAHP, simply:

pip install pyahp

Getting Started

Using as a python module

import json
from pyahp import parse

with open('model.json') as json_model:
    # model can also be a python dictionary
    model = json.load(json_model)

ahp_model = parse(model)
priorities = ahp_model.get_priorities()

Using on the command line

$> python -m pyahp -f examples/television.json
    [+] Television Model
	    Method: eigenvalue
	    Results:
		    Samsung: 0.243
		    Sony: 0.106
		    Panasonic: 0.27
		    Toshiba: 0.38
	    Recommended is Toshiba

Model Schema

The models supplied to the library are in JSON format. The model has to follow a specific schema and a number of errors are raised in case the schema validation fails. A very simple model with three criteria and one criteria with two subcriteria and three alternatives is as follows:

{
  "name": "Sample Model",
  "method": "approximate",
  "criteria": ["critA", "critB", "critC"],
  "subCriteria": {
    "critA": ["subCritA", "subCritB"]
  },
  "alternatives": ["altA", "altB", "altC"],
  "preferenceMatrices": {
    "criteria": [
      [1, 1, 1],
      [1, 1, 1],
      [1, 1, 1]
    ],
    "subCriteria:critA": [
      [1, 1],
      [1, 1]
    ],
    "alternatives:subCritA": [
      [1, 1, 1],
      [1, 1, 1],
      [1, 1, 1]
    ],
    "alternatives:subCritB": [
      [1, 1, 1],
      [1, 1, 1],
      [1, 1, 1]
    ],
    "alternatives:critB": [
      [1, 1, 1],
      [1, 1, 1],
      [1, 1, 1]
    ],
    "alternatives:critC": [
      [1, 1, 1],
      [1, 1, 1],
      [1, 1, 1]
    ]
  }
}

Supported Methods

There are a wide variety of methods available for calculating the priorities from preference matrices. This library currently supports the following methods:

  • Approximate (approximate)
  • Geometric (geometric)
  • Eigenvalue (eigenvalue)

Fields in the model

Field Type Description
name string Name of the model. It is used when the library is called from the command line and ignored when used as a python library. Defaults to the filename in the command line mode.
method string The method/algorithm used to calculate the priority vectors from the preference matrices. It should be one of the supported methods. required
criteria array An array of strings containing the names of all the top level criteria. All the names should be unique. required
subCriteria object It contains the sub-criteria definitions with criterion as the key and an array of strings as the sub-criteria.
alternatives array An array of strings containing the names of all the alternatives. All the strings should be unique. required
preferenceMatrices object An object with key of the form criteria or subCriteria:<criteriaName> or alternative:<criteriaName> and the value is a 2D square matrix with integer elements. required

In the sample model above, due to the design of the model and hierarchy, critA has two sub-criteria. Hence, we need to provide a preference matrix for the sub-criteria of critA, named subCriteria:critA, and two alternative preferences matrices with the name alternatives:subCritA and alternatives:subCritB. All the other criteria have corresponding preference matrices.

Maintainer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].