Comments (3)
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:
- 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
- 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.
I was thinking of a third way, some sort of hybrid:
- keep simple structure of AHP problem in file, with default preferences
- manipulate preferences in code, as per report
This gist illustrates how this works: https://gist.github.com/gluc/b03520be946a6d8dcff7b014ae2cfbc7
from ahp.
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:
- Manually removing the single quote from the file
- then understood (or believed to understand) that I need to define a
pairwiseFunction
within the children of the Goal in order to process the pairwise define within the preferences../
Result is here: https://github.com/unhcr-mena/analytic-hierarchy-process/blob/gh-pages/data/test.ahp
It's not working... Any hint?
Thanks a lot
Edouard
from ahp.
Related Issues (20)
- Add Consistency Checks to All Priority Calculation Methods HOT 3
- Add Ideal Mode AHP Option HOT 5
- problem in calculate ahp file HOT 1
- How can I resolve a problem with more than 8 alternatives? HOT 1
- Actually loading file from a working directory HOT 3
- Cannot load AHP file HOT 1
- how to support utf-8 character in yaml file? HOT 3
- How to handle "car.ahp" file? HOT 1
- Windows HOT 1
- Problems with YAML
- Why does the online yaml visualizer not work? HOT 1
- node$field will soon deprecate and therefore Visualize() needs update
- loadFile HOT 2
- Priorities derivation difference with Saaty's publication HOT 4
- Sensitivity analysis HOT 4
- Visualize does not complete HOT 2
- Load() is not reading pairwise HOT 4
- Is it possible to have a hierarchy of alternatives besides a criteria hierarchy? HOT 1
- problem in writing ahp HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahp.