-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I would like to have a weighted sum without any normalization, but that doesn't seem to be possible.
As can be seen here, normalization is still applied to the weighted sum range at the end:
parasol-es/src/api/weightedSum.js
Lines 48 to 55 in 31fcdae
| // normalize all values against total weight and assign values | |
| const extents = arr.extents(row_totals); | |
| data.forEach((d, i) => { | |
| config.data[i]['weighted sum'] = ( | |
| (d.score - extents[0]) / | |
| (extents[1] - extents[0]) | |
| ).toString(); | |
| }); |
Whereas the norm parameter only controls normalization of the input data normalization.
In my opinion the default behavior should be to normalize neither, because it isn't something that I as a user would expect when I call a "weightedSum" operation. At the very least there should be an option to disable both forms of normalization
Edit: Just noticed there's the additional "score" property that isn't normalized. I guess that does what I want, but still think this behavior is strange