Giter Site home page Giter Site logo

Comments (4)

gluc avatar gluc commented on August 19, 2024

@RP87 : Hmm, unfortunately I have no access to the paper. I did double check though, and I can confirm your results. I did check 2 things, though:

  • I ran the same problem with the pmr package, using the ahp function. The results are very comparable to the ones from the ahp package
  • I re-calculated some problems from public sources, e.g. the Car Example on Wikipedia, and again the results are the same

To be completely honest with you, I'm far from being the ultimate capacity in the field, so any feedback from the community is more than welcome.

from ahp.

RP87 avatar RP87 commented on August 19, 2024

Hi,
I'm myself no maths star. But I suppose will improve while digging into this.

It troubles me that you confirmed my results with the previously proposed matrix.
On my side I checked wikipedia's case (here below) and thought the issue was from my ahp (and dependencies) installation. But then you should have get a different result from mine on Saaty's example.

> cost = c(1,3,3,7)
> safety = c(1.0/3,1,1,9)
> capacity = c(1.0/3,1,1,7)
> style = c(1.0/7,1.0/9,1.0/7,1)
> mat = data.frame(cost,safety,capacity,style)
> PrioritiesFromPairwiseMatrixEigenvalues(mat, allowedConsistency = 1)
$priority
        1         2         3         4
0.0561392 0.1148294 0.1201882 0.7088432

$consistency
[1] 0.07379078

> PrioritiesFromPairwiseMatrixMeanNormalization(mat)
$priority
[1] 0.05970684 0.12230233 0.12798415 0.69000668

$consistency
[1] NA

> PrioritiesFromPairwiseMatrixGeometricMean(mat)
$priority
[1] 0.05455313 0.11678162 0.12435425 0.70431100

$consistency
[1] NA

I also looked at the pmr documentation and something puzzles me in the arguments :

dset
an “A” matrix. It should be a square matrix with diagonal values equal 1 and $a_ij = 1/a_ij$.
It has no interaction with the current divergent results (this condition is ok with the example from table 3 in Saaty's publication) but it could be an issue for me when a_ij != 1/a_ij. (ex : 4 vs 1/5 instead of 1/4).

I'll send you a spreadsheet with alternative checking.

CU
Rudy

from ahp.

gluc avatar gluc commented on August 19, 2024

Hi, I only have little time to check today, but I think you have your matrix transposed, because the data.frame will assemble by column. Try this instead:

cost = c(1,3,3,7)
safety = c(1.0/3,1,1,9)
capacity = c(1.0/3,1,1,7)
style = c(1.0/7,1.0/9,1.0/7,1)
nms <- c("cost", "safety", "capacity", "style")
mat <- matrix(c(cost, safety, capacity, style), nrow = 4, byrow = TRUE, dimnames = list(nms, nms))

PrioritiesFromPairwiseMatrixEigenvalues(mat)

And you should get:

$priority
      cost     safety   capacity      style 
0.51007502 0.23435219 0.21505404 0.04051875 

$consistency
[1] 0.07379078

from ahp.

RP87 avatar RP87 commented on August 19, 2024

You nailed it.

It was the use of data.frame that puts data in column.

Thanks.

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.