Disclaimer: This is a very very difficult question about mathematics and algorithms (in my opinion) - so respect to anyone who makes this. I admire you.
I would like to evaluate the performance of my employees. I would like to do this by measuring the following parameters as percentages of the amount of time they spend working:
1. % of Time spent working
2. % of Time spent in meetings
3. % of Time spent travelling
I have a "preferred" set of percentages for each of these. This represents the ideal time that I would LIKE my employees to spend their time.
% Time spent in Meetings -> 30%
% Time spent Travelling -> 10%
% Time Spent Working -> 60%
total time spent on activities: 100%
So in words, I would like my employees to spend 30% of their time in meetings, 10% time travelling and 60% on a desk working.
I would ALSO like to add weights to these different percentages. The weight would represent how "lenient" I am with each percentage being different to what I desire. In other words, how important I find it for each variable to be closest to the desired percentages (30, 10, 60). I would like to apply the weights on a scale of.1 to 10, 10 being most important, 1 being least important.
Meetings -> 3
Travelling -> 9
Working -> 5
So given the percentage of time spent by an employee, and the weight of the importance of the time spent being close to the desired time spent, I would like to generate an index between 0 and 100 where 100 is the perfect time percentages and 0 is the worst. So a score of 100 would give the "preferred" percentages:
% Time spent in Meetings -> 30%
% Time spent Travelling -> 10%
% Time Spent Working -> 60%
How I would try to approach this:
- Find out what the minimum and maximum ratios are
- Calculate a value to tell how far away each value is from the desired value using the minimum and maximum ratios. Make sure this value is in the ratio 0-1 (corresponding to 0-100)
- Calculate a weighted average.
question from:
https://stackoverflow.com/questions/65877840/algorithm-to-show-how-far-away-a-value-is-from-another 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…