dams-mcda / Dams-MCDA

Emma Fox R/Shiny Project with a docker server configuration
1 stars 0 forks source link

Weighted score matrix in WSM #117

Closed sythel closed 5 years ago

sythel commented 5 years ago

on branch RebuildWSM

file WSM.R

WeightedScoreMatrix <- (Ind_NormalizedMatrix*PrefMatrix)

shiny_server_1 | Warning: Error in *: non-conformable arrays

PrefMatrix is 8x14x995 and Ind_NormalizedMatrix is 5x14x8

might have to do with line that has comment

PrefMatrix <- array(data=rep(PrefMatrix,995), dim=c(dim(PrefMatrix), 995)) #will address this later
sythel commented 5 years ago

i see changes in GraphChecking so I will try them out

elbfox commented 5 years ago

Hm...in GraphChecking I have:

Ind_WeightedScoreMatrix is now a 40(8dams, 5 alternatives) x14 criteria Ind_WeightedScoreMatrix <- as.data.frame(rbind(Dam1Results, Dam2Results, Dam3Results, Dam4Results, Dam5Results, Dam6Results, Dam7Results, Dam8Results)) colnames(Ind_WeightedScoreMatrix)<- criteria_inputs

This was the result of the 5x14x8 Ind_NormalizedMatrix * WestEnf_PrefMatrix (for example). This PrefMatrix is 5x14.

and

WeightedScoreMatrix WeightedScoreMatrix <- (NormalizedMatrix*PrefMatrix)

NormalizedMatrix here is 8x14x995. PrefMatrix is a 8x14 that is repeated for 995 levels (turning it into the 8x14x995).

sythel commented 5 years ago

yeah that did the trick