<jupyter_start><jupyter_text>17 CLASSES : 0 to 16 Index Day Time : Total- Cycle { 'CYCLE' / 'cycle'} : 4,855- Two wheeler { '2W' / 'twowheeler' } : 74,016- Cycle Rickshaw { 'R_CYCLE' / 'cyclerickshaw' } : 283- E-Rickshaw { 'E-RICKSHAW' / 'erickshaw' } : 710- Hand Cart { 'HAND-CART' /  'handcart' } : 350- Auto Rickshaw { 'AUTO' / 'auto' } : 44,492- Commercial Auto { 'FREIGHT-AUTO' / 'commercialauto' } : 4,024- Four Wheeler { 'CAR-JEEP-VAN' / 'fourwheeler' } : 75,213- Mini Light Commercial Vehicle { 'MINI-LCV' / 'minilcv' } : 8,463- Light Commercial Vehicle { 'LCV' / 'lcv' } : 8,010- Bus { 'BUS' / 'bus' } : 3,311- Two Axle Trucks { '2AXLE' / 'twoaxle' } : 3,252- Three Axle Trucks { '3AXLE' / 'threeaxle' } : 1,655- Four to Six Axle Trucks { '4-6AXLE' / 'moreaxle' } : 2,112- More than Six Axle Trucks { OVERSIZE-AXLE' / 'containers' } : 17- Heavy Class Machinery - The Corps of Electronics and Mechanical Engineers ( Indian Army ) Vehicles { 'HCM-EME' / 'hcm' } : 2,326- Tractor with Trailer { 'WITH-TRAILER' / 'farmtractorwith' } : 209 Night Time : Total- Cycle { 'CYCLE' / 'cycle'} : 1,997- Two wheeler { '2W' / 'twowheeler' } : 26,799- Cycle Rickshaw { 'R_CYCLE' / 'cyclerickshaw' } : 209- E-Rickshaw { 'E-RICKSHAW' / 'erickshaw' } : 778- Hand Cart { 'HAND-CART' /  'handcart' } : 62- Auto Rickshaw { 'AUTO' / 'auto' } : 14,614- Commercial Auto { 'FREIGHT-AUTO' / 'commercialauto' } : 496- Four Wheeler { 'CAR-JEEP-VAN' / 'fourwheeler' } : 48,758- Mini Light Commercial Vehicle { 'MINI-LCV' / 'minilcv' } : 2,805- Light Commercial Vehicle { 'LCV' / 'lcv' } : 3,120- Mini Bus { 'MINI-BUS' / 'minibus } : 313- Bus { 'BUS' / 'bus' } : 1,915- Two Axle Trucks { '2AXLE' / 'twoaxle' } : 1,713- Three Axle Trucks { '3AXLE' / 'threeaxle' } : 888- Four to Six Axle Trucks { '4-6AXLE' / 'moreaxle' } : 1,034- Heavy Class Machinery - The Corps of Electronics and Mechanical Engineers ( Indian Army ) Vehicles { 'HCM-EME' / 'hcm' } : 9- Tractor with Trailer { 'WITH-TRAILER' / 'farmtractorwith' } : 0<jupyter_code>day_count_17_classes = [4885, 74016, 283, 710, 350, 44492, 4024, 75213, 8463, 8010, 3311, 3252, 1655, 2112, 17, 2326, 209]

night_count_17_classes = [ 1997, 26799, 209, 778, 62, 14614, 496, 48758, 2805, 3120, 313, 1915, 1713, 888, 1034, 7, 9, 0 ]
total_count_day_17_classes = sum(day_count_17_classes)

total_count_night_17_classes = sum(night_count_17_classes)
normalized_count_day_17_classes = []

normalized_count_night_17_classes = []

for i in range(17) :
    
    normalized_count_day_17_classes.append( day_count_17_classes[i] / total_count_day_17_classes )
    normalized_count_night_17_classes.append( night_count_17_classes[i] / total_count_night_17_classes )<jupyter_output><empty_output><jupyter_text>12 Classes : 0,1,3,5,6,7,8,9,11 Index- Cycle { 'CYCLE' / 'cycle'}- Two wheeler { '2W' / 'twowheeler' }- E-Rickshaw { 'E-RICKSHAW' / 'erickshaw' }- Auto Rickshaw { 'AUTO' / 'auto' }- Commercial Auto { 'FREIGHT-AUTO' / 'commercialauto' }- Four Wheeler { 'CAR-JEEP-VAN' / 'fourwheeler' }- Mini Light Commercial Vehicle { 'MINI-LCV' / 'minilcv' }- Light Commercial Vehicle { 'LCV' / 'lcv' }- Bus { 'BUS' / 'bus' }<jupyter_code>day_count_9_classes = []

night_count_9_classes = []

for i in (0,1,3,5,6,7,8,9,11) :
    
    day_count_9_classes.append(day_count_17_classes[i])
    night_count_9_classes.append(night_count_17_classes[i])
total_count_day_9_classes = sum(day_count_9_classes)

total_count_night_9_classes = sum(night_count_9_classes)
normalized_count_day_9_classes = []

normalized_count_night_9_classes = []

for i in range(9) :
    normalized_count_day_9_classes.append( day_count_9_classes[i] / total_count_day_9_classes )
    normalized_count_night_9_classes.append( night_count_9_classes[i] / total_count_night_9_classes )<jupyter_output><empty_output><jupyter_text>Ideal Confusion Matrix- During Testing of Confusion matrix diagonal for day and night respectively, the one with the lowest standard would be considered superior.- Standard : ( Weighted Standard Deviation ) * 100<jupyter_code>ideal_confusion_matrix_diagonal_17 = [1] * 20
                            
ideal_confusion_matrix_diagonal_9 = [1] * 12<jupyter_output><empty_output><jupyter_text>Calculate Standard for 17 Classes - Day<jupyter_code>confusion_matrix_diagonal = [0.27,0.51,0,0.93,0,0.75,0.57,0.70,0.46,0.40,0,0.67,0,0,0,0,0] 
standard = 0

for i in range(17) :
    
    standard = standard + normalized_count_day_17_classes[i] * ((ideal_confusion_matrix_diagonal_17[i] - confusion_matrix_diagonal[i])**2)
    
standard = math.sqrt(standard)

print(standard*100)<jupyter_output>44.70930602638602<jupyter_text>Calculate Standard for 17 Classes - Night<jupyter_code>confusion_matrix_diagonal = [0.07,0.22,0.04,0.15,0,0.33,0.04,0.39,0.17,0.07,0.09,0.39,0,0.06,0,0,0] 
standard = 0

for i in range(17) :
    
    standard = standard + normalized_count_night_17_classes[i] * ((ideal_confusion_matrix_diagonal_17[i] - confusion_matrix_diagonal[i])**2)
    
standard = math.sqrt(standard)

print(standard*100)<jupyter_output>70.97848141554444<jupyter_text>Calculate Standard for 9 Classes - Day<jupyter_code>confusion_matrix_diagonal = [0.11,0.11,0.38,0,0,0,0,0,0.03] 
standard = 0

for i in range(9) :
    
    standard = standard + normalized_count_day_9_classes[i] * ((ideal_confusion_matrix_diagonal_9[i] - confusion_matrix_diagonal[i])**2)
    
standard = math.sqrt(standard)

print(standard*100)<jupyter_output>96.10629769125913<jupyter_text>Calculate Standard for 9 Classes - Night<jupyter_code>confusion_matrix_diagonal = [0.27,0.19,0.49,0.50,0.23,0.58,0.17,0.11,0.21] 
standard = 0

for i in range(9) :
    
    standard = standard + normalized_count_night_9_classes[i] * ((ideal_confusion_matrix_diagonal_9[i] - confusion_matrix_diagonal[i])**2)
    
standard = math.sqrt(standard)

print(standard*100)<jupyter_output>60.43876729654879<jupyter_text>Calculate Accuracy - 17 Classes Day<jupyter_code>confusion_matrix_diagonal = [0.42,0.68,0,0.96,0,0.88,0.69,0.80,0.57,0.52,0,0.75,0,0,0,0,0] 
accuracy = 0

for i in range(17) :
    
    accuracy = accuracy + normalized_count_day_17_classes[i]*confusion_matrix_diagonal[i]

accuracy = accuracy

print(accuracy)<jupyter_output>0.713982933895632<jupyter_text>Calculate Accuracy - 9 Classes Night<jupyter_code>confusion_matrix_diagonal = [0.14,0.35,0.18,0.37,0.06,0.48,0.23,0.17,0.53] 
accuracy = 0

for i in range(9) :
    
    accuracy = accuracy + normalized_count_night_9_classes[i]*confusion_matrix_diagonal[i]

accuracy = accuracy

print(accuracy)<jupyter_output>0.40313728006950894
{'fraction_non_alphanumeric': 0.14224598930481283, 'fraction_numerical': 0.10435446906035141, 'mean_word_length': 4.907942238267148, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '337332', 'license': 'Apache-2.0', 'n_tokens_mistral': 3046, 'n_tokens_neox': 2592, 'n_words': 483, 'path': 'Training/Training Conclusions/Result Comparator.ipynb', 'repo_name': 'inofficialamanjha/Infratech-Traffic-Count-and-Classification-Application', 'size': '6545'}