Giter Site home page Giter Site logo

Comments (3)

gluc avatar gluc commented on August 19, 2024

Hi Edouard,

Unfortunately I do not have such a script. Doing it generically for all possible problems might be difficult.

But if you have a specific problem at hand, it's certainly feasible.

I can think of the following possibilities:

  1. you can do what you suggest, i.e. create the YAML file programmatically from the responses collected. The definition of the YAML file is here: https://cran.r-project.org/web/packages/ahp/vignettes/file-format.html
  2. you can create the ahp data.tree structure directly. This is easier than it sounds, at least once you have read the data.tree documentation. Starting points to understand the ahp structure are the Load process, and the ahp:::GetPreferences_2 function

Personally, I would probably go for 2, as it's probably quicker to implement. Either way, depending on the structure of your input data, and the complexity of your problem, this might be a bit of work.

Good luck!

Christoph

from ahp.

gluc avatar gluc commented on August 19, 2024

I was thinking of a third way, some sort of hybrid:

  1. keep simple structure of AHP problem in file, with default preferences
  2. manipulate preferences in code, as per report

This gist illustrates how this works: https://gist.github.com/gluc/b03520be946a6d8dcff7b014ae2cfbc7

from ahp.

Edouard-Legoupil avatar Edouard-Legoupil commented on August 19, 2024

Dear Christoph,

Thanks for your reply.. I went for option 1 as I am looking at building a work-flow from the expert consultation survey till the compilation of results...

I have made various test: my script is here: https://github.com/unhcr-mena/analytic-hierarchy-process/blob/gh-pages/code/2-build-hierarchy.R

as of now, it creates a YAML file: https://github.com/unhcr-mena/analytic-hierarchy-process/blob/gh-pages/data/4-write-test-final.ahp (still need to take out the single quote wrapping)

I tried to tweak this file here:

It's not working... Any hint?

Thanks a lot
Edouard

from ahp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.