Translate proportional percentages to a fixed interval

radu.d

New member
Joined
Sep 3, 2020
Messages
3
Hi there,

I have a math challenge that I cannot figure for couple of days. Any help is more than welcomed.

A driver is driving the car and our device records the speed + the g force.
Having this information we translate into 3 categories for each time slot: "safe", "moderate" and "aggressive".
Then for the whole road we have 3 percentages:
- driving safe percentage 0 -> 1
- driving moderate percentage 0-> 1
- driving aggressive percentage 0 -> 1

Having all these percentages we would like to compute a score for the whole drive between 1 and 10
Aggressive driving should get more close to 10, safe should get more close to 1.

Many thanks,
Radu
 

Dr.Peterson

Elite Member
Joined
Nov 12, 2017
Messages
9,222
Are the three categories exhaustive and mutually exclusive, so that the three percentages add up to 100%, or can the sum be more or less than that? (I'm assuming the percentages are the percent of the time in each category.)

And what do you think should be the score if someone drives 50% safe and 50% aggressive? Should it be the same as 100% moderate, or 33% of each?
 

radu.d

New member
Joined
Sep 3, 2020
Messages
3
Are the three categories exhaustive and mutually exclusive, so that the three percentages add up to 100%, or can the sum be more or less than that? (I'm assuming the percentages are the percent of the time in each category.)

And what do you think should be the score if someone drives 50% safe and 50% aggressive? Should it be the same as 100% moderate, or 33% of each?
Good questions. I would say that 50% 50% should get to a 7 Aggesinve should be cored twice as moderate. Moderate should be scored twice as safe.
So it is a weighted ration. I would define it like this:
1 drive safe unit has weight 1
1 drive moderate unit hs weight 2
1 drive aggressive unit has weight 4

Does this make sense?

Percentages add to 100%
 

Dr.Peterson

Elite Member
Joined
Nov 12, 2017
Messages
9,222
My first thought (without yet actually thinking) is to calculate S+2M+4A (S, M, and A being the percentages of time at each level), and normalize that so that the minimum is 1 (0 would have been easier!) and the maximum is 10. Since the raw value varies between 1 (for S=1) and 4 (for A=1), the normalization (scaling) would be a linear function taking 1 to 1 and 4 to 10. Can you carry that out? Then we can see whether the results seem reasonable. (I don't have time at the moment to do that.)
 

radu.d

New member
Joined
Sep 3, 2020
Messages
3
My first thought (without yet actually thinking) is to calculate S+2M+4A (S, M, and A being the percentages of time at each level), and normalize that so that the minimum is 1 (0 would have been easier!) and the maximum is 10. Since the raw value varies between 1 (for S=1) and 4 (for A=1), the normalization (scaling) would be a linear function taking 1 to 1 and 4 to 10. Can you carry that out? Then we can see whether the results seem reasonable. (I don't have time at the moment to do that.)
Thank you Dr. Peterson,

Your approach makes sense. I can normalize the scale. Now that I have a rough idea of how to approach it I will try multiple combinations of params to see which one works better. In real life, our algorithm gives aggressive driving 2 - 3 %, so it will need much hight weight to have it representative.
 
Top