0

Seeking guidance please. I have a dataset of street-view image_ids and their detected road surface features. The feature values represent the percentage of pixels covering the road in each image.

I want to calculate a trafficability weight (between 0 and 1) for each image based on the road surface (paved, asphalt, unpaved) and condition (e.g. pothole, cracks) characteristics. The weights will be assigned to a road network graph to find routes with the lowest overall weight (learning purposes only)

The problem: each variable has a different importance (e.g. potholes more significant than cracks) AND thresholds that make them important (e.g. potholes covering 15% more significant than cracks covering 40%).

Any advise and coding examples would be fantastic. Thanks.

Reproducable DataFrame (small sample):

import pandas as pd
df = pd.DataFrame.from_dict({'asphalt': {'1354704464893032': 69.35, '1110259192820420': 0.29, '1129522210846922': 0.14, '134922235340926': 59.93, '1234568927001440': 88.1, '1343267016047413': 17.5, '108589737975130': 88.44, '1344795442571013': 11.87, '1171784776987789': 37.94, '1154804128315853': 43.75}, 'paved': {'1354704464893032': 17.98, '1110259192820420': 15.91, '1129522210846922': 0.03, '134922235340926': 23.86, '1234568927001440': 3.8, '1343267016047413': 70.55, '108589737975130': 0.0, '1344795442571013': 24.5, '1171784776987789': 1.65, '1154804128315853': 24.93}, 'unpaved': {'1354704464893032': 0.01, '1110259192820420': 81.49, '1129522210846922': 95.73, '134922235340926': 5.13, '1234568927001440': 2.52, '1343267016047413': 1.02, '108589737975130': 8.93, '1344795442571013': 57.59, '1171784776987789': 44.74, '1154804128315853': 4.67}, 'marking': {'1354704464893032': 12.29, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 5.57, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 5.81, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'speed_bump': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'cats_eye': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'drain': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 8.01, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'manhole_cover': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'patch': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'water_puddle': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'pothole': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 0.0, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 0.0, '1154804128315853': 0.0}, 'crack': {'1354704464893032': 0.0, '1110259192820420': 0.0, '1129522210846922': 0.0, '134922235340926': 6.05, '1234568927001440': 0.0, '1343267016047413': 0.0, '108589737975130': 0.0, '1344795442571013': 0.0, '1171784776987789': 8.14, '1154804128315853': 22.81}})

sample of results

taylort139
  • 11
  • 2

0 Answers0