Skip to content

Instantly share code, notes, and snippets.

@izzuddin91
Last active December 18, 2017 04:13
Show Gist options
  • Select an option

  • Save izzuddin91/47b7ccee6ad04f237b1af273b5b710ea to your computer and use it in GitHub Desktop.

Select an option

Save izzuddin91/47b7ccee6ad04f237b1af273b5b710ea to your computer and use it in GitHub Desktop.
for calculator windshield claim
from xml.dom import minidom
from datetime import datetime
import csv
import xml.dom.minidom
workshops = minidom.parse('list_of_workshops.xml')
policy_holder_rules = minidom.parse('policy_holder_rules.xml')
cars_model_exclude_honda = minidom.parse('carlist_exclude_honda.xml')
honda_cars = minidom.parse('carlist_model_honda.xml')
## LIST OF METHODS TO TAKES VALUE FROM XML -- OPEN
# ########################################################################
# # TAKES IN BETA AND WEIGHT VALUE FROM RULES LISTS
#method to check the xml value
def search_value(rule_no, index):
nodes = policy_holder_rules.getElementsByTagName('rule')
result = 0.00
for node in nodes:
if node.attributes['id'].value == str(rule_no):
prices=node.getElementsByTagName('item')[index]
result = float(prices.firstChild.nodeValue)
return result
# ########################################################################
# # CHECK IF THE WORKSHOP IS IN THE LIST
def check_workshop_panel(workshop_name):
array_of_workshop = []
nodes = workshops.getElementsByTagName('name')
for node in nodes:
# print node.firstChild.nodeValue
array_of_workshop.append(node.firstChild.nodeValue)
if workshop_name in array_of_workshop:
print("workshop panel result - green")
else:
print("workshop panel result - amber")
def check_car_exclude_honda(model, carname, paid_price):
nodes = cars_model_exclude_honda.getElementsByTagName(model)
for node in nodes:
name = node.getElementsByTagName('model')[0].firstChild.nodeValue
if (carname == name):
print(node.getElementsByTagName('price')[0].firstChild.nodeValue )
price = int(node.getElementsByTagName('price')[0].firstChild.nodeValue)
if paid_price <= price:
print("paid price is lower or equal to insured amount. Green! ")
else:
print("paid price is more than insured amount. Amber ")
def check_honda_cars(model, year1_input , year2_input, paid_price ):
nodes = honda_cars.getElementsByTagName(model)
for node in nodes:
year1 = node.getElementsByTagName('year1')[0].firstChild.nodeValue
year2 = node.getElementsByTagName('year2')[0].firstChild.nodeValue
if int(year1) == year1_input and int(year2) == year2_input:
print(node.getElementsByTagName('price')[0].firstChild.nodeValue)
price = int(node.getElementsByTagName('price')[0].firstChild.nodeValue)
if paid_price <= price:
print("paid price is lower or equal to insured amount. Green! ")
else:
print("paid price is more than insured amount. Amber ")
## LIST OF METHODS TO TAKES VALUE FROM XML -- CLOSE ^
class User:
score = 0.00
collection_of_reason = []
def __init__(self,
name,
no_of_motor_claims,
no_of_windscreen_claims,
windscreen_coverage,
tenure_renewal_new,
ws_sum_insured,
market_price_for_ws_parts,
amount_submitted_by_workshop,
date_of_accident,
date_of_policy_effective,
date_of_policy_expiry,
date_of_notification,
workshop_registered_state,
policy_holder_registered_state,
accident_state
):
self.name = name
self.no_of_motor_claims = no_of_motor_claims
self.no_of_windscreen_claims = no_of_windscreen_claims
self.windscreen_coverage = windscreen_coverage
self.tenure_renewal_new = tenure_renewal_new
self.ws_sum_insured = ws_sum_insured
self.market_price_for_ws_parts = market_price_for_ws_parts
self.amount_submitted_by_workshop = amount_submitted_by_workshop
self.date_of_accident = date_of_accident
self.date_of_policy_effective = date_of_policy_effective
self.date_of_policy_expiry = date_of_policy_expiry
self.date_of_notification = date_of_notification
self.workshop_registered_state = workshop_registered_state
self.policy_holder_registered_state = policy_holder_registered_state
self.accident_state = accident_state
# ########################################################################
## 11 rules method start here
# #1
def check_no_of_claims_in_policy_year(self):
checkpoint_score = 0
print("check_no_of_claims_in_policy_year")
#the higher number of claims, the higher the score
if self.no_of_motor_claims == 1:
checkpoint_score = search_value(1, 0)
elif self.no_of_motor_claims == 2:
checkpoint_score = search_value(1, 1)
User.collection_of_reason.append("motor claim is 2 times within his policy year")
else:
User.collection_of_reason.append("motor claim is 3 and above within his policy year")
checkpoint_score = search_value(1, 2)
User.score = User.score + ( checkpoint_score * search_value(1, 3) )
# ########################################################################
# #2
def check_no_of_windscreen_claims_in_previous_3_years(self):
print("check_no_of_windscreen_claims_in_previous_3_years")
#first check the current year
checkpoint_score = 0
now = datetime.now()
current_year = now.year
policy_year = datetime.strptime(self.date_of_policy_effective, '%Y-%m-%d').date().year
current_policy_period = current_year - policy_year
#lower no of claims within 3 years, lower credit score
if ( current_policy_period < 3 ) and ( self.no_of_windscreen_claims == 0 ):
checkpoint_score = search_value(2, 0)
elif ( current_policy_period < 3 ) and ( self.no_of_windscreen_claims == 1 ):
User.collection_of_reason.append("one claim made within 3 years")
checkpoint_score = search_value(2, 1)
elif ( current_policy_period < 3 ) and ( self.no_of_windscreen_claims == 2 ):
User.collection_of_reason.append("2 claims made within 3 years")
checkpoint_score = search_value(2, 2)
elif ( current_policy_period < 3 ) and ( self.no_of_windscreen_claims > 2 ):
checkpoint_score = search_value(2, 3)
User.collection_of_reason.append("3 and above claims made within 3 years")
User.score = User.score + ( checkpoint_score * search_value(2, 4) )
# ########################################################################
# #3 WINDSCREEN COVERAGE
def check_inception_or_midterm(self):
checkpoint_score = 0
print("check_inception_or_midterm")
#windscreen coverage (0 for inception, 1 for midterm)
if self.windscreen_coverage == 0:
checkpoint_score = search_value(3, 0)
elif self.windscreen_coverage == 1:
checkpoint_score = search_value(3, 1)
User.collection_of_reason.append("coverage is midterm")
User.score = User.score + ( checkpoint_score * search_value(3, 2) )
# ########################################################################
# #4 TENURE / RENEWAL / NEW BUSINESS
def check_ws_type(self):
#WS tenure / renewal / new business ( 0 for tenure, 1 for renewal, 2 for midterm )
checkpoint_score = 0
print("check_ws_type")
if self.tenure_renewal_new == 0:
checkpoint_score = search_value(4, 0)
elif self.tenure_renewal_new == 1:
checkpoint_score = search_value(4, 1)
User.collection_of_reason.append("it is a renewal")
elif self.tenure_renewal_new == 2:
checkpoint_score = search_value(4, 2)
User.score = User.score + ( checkpoint_score * search_value(4, 3) )
# ########################################################################
# #5
def check_ws_sum_insured(self):
print("check_ws_sum_insured")
checkpoint_score = 0
if self.amount_submitted_by_workshop == self.ws_sum_insured:
checkpoint_score = search_value(5, 0)
else:
checkpoint_score = search_value(5, 1)
User.score = User.score + checkpoint_score
# ########################################################################
# #6
def check_duration_of_policy(self):
# no idea what is inception. skip first
print("check_duration_of_policy")
now = datetime.now()
accident_date = datetime.strptime(self.date_of_policy_expiry, '%Y-%m-%d')
difference_in_days = (now - accident_date).days
# ########################################################################
# #7
def check_if_equal_market_price(self):
checkpoint_score = 0
print("check_if_equal_market_price")
if self.amount_submitted_by_workshop < self.ws_sum_insured:
checkpoint_score = search_value(7, 0)
elif self.amount_submitted_by_workshop == self.ws_sum_insured:
checkpoint_score = search_value(7, 1)
elif self.amount_submitted_by_workshop > self.ws_sum_insured:
checkpoint_score = search_value(7, 2 )
User.collection_of_reason.append("the total amount is not the same")
User.score = User.score + ( checkpoint_score * search_value(7, 3) )
# ########################################################################
# #8
def check_notification_delay(self):
print("check_notification_delay")
#check the difference between date of notification and date of accident
#convert the string to date first
checkpoint_score = 0
notification_date = datetime.strptime(self.date_of_notification, '%Y-%m-%d')
accident_date = datetime.strptime(self.date_of_accident, '%Y-%m-%d')
difference_in_days = (notification_date - accident_date).days
if difference_in_days > 0 and difference_in_days <= 7:
checkpoint_score = search_value(8, 0)
elif difference_in_days >= 8 and difference_in_days <= 14:
checkpoint_score = search_value(8, 1)
User.collection_of_reason.append("delay is "+ str(difference_in_days) + "days")
else:
checkpoint_score = search_value(8, 2)
User.collection_of_reason.append("delay is "+ str(difference_in_days) + "days")
User.score = User.score + ( checkpoint_score * search_value(8, 3) )
# ########################################################################
# #9
def compare_bill_with_sum_insured(self):
checkpoint_score = 0
print("compare_bill_with_sum_insured")
allowed_margin_for_sum_insured = self.ws_sum_insured + 100
if self.amount_submitted_by_workshop <= allowed_margin_for_sum_insured:
checkpoint_score = search_value(9, 0)
else:
checkpoint_score = search_value(9, 1)
User.collection_of_reason.append("amount submitted by workshop is more than the allowed margin")
User.score = User.score + ( checkpoint_score * search_value(9, 2) )
# ########################################################################
# #10
def compare_user_and_workshop_state(self):
checkpoint_score = 0
print("compare_user_and_workshop_state")
if self.policy_holder_registered_state == self.workshop_registered_state:
checkpoint_score = search_value(10, 0)
else:
checkpoint_score = search_value(10, 1)
User.collection_of_reason.append("repair shop is not same state with policy holder")
User.score = User.score + ( checkpoint_score * search_value(10, 2) )
# ########################################################################
# #11
def compare_workshop_and_accident_state(self):
checkpoint_score = 0
print("compare_user_and_workshop_state")
if self.policy_holder_registered_state == self.workshop_registered_state:
checkpoint_score = search_value(11, 0)
else:
checkpoint_score = search_value(11, 1)
User.collection_of_reason.append("repair shop is not same state with accident state")
User.score = User.score + ( checkpoint_score * search_value(11, 2) )
# ########################################################################
# # CHECK THE TOTAL POINTS
def check_total_points(self):
if User.score > 0.826389:
print("policy holder score is "+ str(User.score)+". Green ")
else:
print("policy holder score is "+ str(User.score)+". Amber ")
print(User.collection_of_reason)
user1 = User(
"ALI", # name,
7, # no_of_motor_claims,
7,# no_of_windscreen_claims,
1, # windscreen_coverage, tenure / renewal / new
2,# tenure_renewal_new,
100, # ws_sum_insured,
120, # market_price_for_ws_parts,
200, # amount_submitted_by_workshop,
'2012-01-10', # date_of_accident,
'2016-01-10', # date_of_policy_effective,
'2012-02-10',# date_of_policy_expiry,
'2012-02-10',# date_of_notification,
14, # workshop_registered_state,
15, # policy_holder_registered_state,
16 # accident_state
)
# user1.check_no_of_claims_in_policy_year()
# user1.check_no_of_windscreen_claims_in_previous_3_years()
# user1.check_inception_or_midterm()
# user1.check_ws_type()
# # user1.check_ws_sum_insured()
# # user1.check_duration_of_policy()
# user1.check_if_equal_market_price()
# user1.check_notification_delay()
# user1.compare_bill_with_sum_insured()
# user1.compare_user_and_workshop_state()
# user1.compare_workshop_and_accident_state()
# user1.check_total_points()
check_workshop_panel("CF Windscreen & Tint Specialist Enterprise")
check_car_exclude_honda("VOLKSWAGEN", "POLO", 2100)
check_honda_cars("CIVIC", 2012, 2015, 2080)
<data>
<!-- PROTON OPEN -->
<PROTON>
<model>ARENA</model>
<price>480</price>
</PROTON>
<PROTON>
<model>EXORA</model>
<price>700</price>
</PROTON>
<PROTON>
<model>GEN-2</model>
<price>600</price>
</PROTON>
<PROTON>
<model>INSPIRA</model>
<price>1000</price>
</PROTON>
<PROTON>
<model>INSPIRA 2</model>
<price>1800</price>
</PROTON>
<PROTON>
<model>ISWARA</model>
<price>500</price>
</PROTON>
<PROTON>
<model>JUARA</model>
<price>500</price>
</PROTON>
<PROTON>
<model>JUARA M</model>
<price>500</price>
</PROTON>
<PROTON>
<model>PERDANA</model>
<price>700</price>
</PROTON>
<PROTON>
<model>PERSONA</model>
<price>600</price>
</PROTON>
<PROTON>
<model>PREVE</model>
<price>800</price>
</PROTON>
<PROTON>
<model>PUTRA</model>
<price>500</price>
</PROTON>
<PROTON>
<model>SAGA</model>
<price>500</price>
</PROTON>
<PROTON>
<model>SAGA BLM ORI</model>
<price>500</price>
</PROTON>
<PROTON>
<model>SATRIA</model>
<price>550</price>
</PROTON>
<PROTON>
<model>SATRIA NEO</model>
<price>600</price>
</PROTON>
<PROTON>
<model>SAVVY</model>
<price>500</price>
</PROTON>
<PROTON>
<model>SUPRIMA S</model>
<price>800</price>
</PROTON>
<PROTON>
<model>WAJA</model>
<price>600</price>
</PROTON>
<PROTON>
<model>WIRA</model>
<price>500</price>
</PROTON>
<!-- PROTON CLOSE -->
<!-- PERODUA OPEN -->
<PERODUA>
<model>ALZA</model>
<price>700</price>
</PERODUA>
<PERODUA>
<model>KANCIL</model>
<price>450</price>
</PERODUA>
<PERODUA>
<model>KELISA</model>
<price>450</price>
</PERODUA>
<PERODUA>
<model>KEMBARA</model>
<price>500</price>
</PERODUA>
<PERODUA>
<model>KENARI</model>
<price>500</price>
</PERODUA>
<PERODUA>
<model>MYVI</model>
<price>600</price>
</PERODUA>
<PERODUA>
<model>RUSA</model>
<price>500</price>
</PERODUA>
<PERODUA>
<model>VIVA</model>
<price>500</price>
</PERODUA>
<!-- PERODUA CLOSE -->
<!-- NISSAN OPEN -->
<NISSAN>
<model>CEFIRO</model>
<price>1000</price>
</NISSAN>
<NISSAN>
<model>FAIRLADY</model>
<price>4000</price>
</NISSAN>
<NISSAN>
<model>FRONTIER</model>
<price>800</price>
</NISSAN>
<NISSAN>
<model>LIVINA</model>
<price>1000</price>
</NISSAN>
<NISSAN>
<model>GRAND LIVINA</model>
<price>1000</price>
</NISSAN>
<NISSAN>
<model>LATIO</model>
<price>1200</price>
</NISSAN>
<NISSAN>
<model>MURANO</model>
<price>4000</price>
</NISSAN>
<NISSAN>
<model>NAVARA</model>
<price>1500</price>
</NISSAN>
<NISSAN>
<model>PRESAGE</model>
<price>3000</price>
</NISSAN>
<NISSAN>
<model>SENTRA</model>
<price>750</price>
</NISSAN>
<NISSAN>
<model>SERENA</model>
<price>1000</price>
</NISSAN>
<NISSAN>
<model>SKYLINE R32</model>
<price>2600</price>
</NISSAN>
<NISSAN>
<model>SKYLINE R33</model>
<price>2700</price>
</NISSAN>
<NISSAN>
<model>SKYLINE R34</model>
<price>3200</price>
</NISSAN>
<NISSAN>
<model>SKYLINE R35</model>
<price>4400</price>
</NISSAN>
<NISSAN>
<model>SYLPHY</model>
<price>1500</price>
</NISSAN>
<NISSAN>
<model>TEANA</model>
<price>1800</price>
</NISSAN>
<NISSAN>
<model>URVAN</model>
<price>900</price>
</NISSAN>
<NISSAN>
<model>VANETTE</model>
<price>700</price>
</NISSAN>
<NISSAN>
<model>X-TRAIL</model>
<price>1000</price>
</NISSAN>
<!-- NISSAN CLOSE -->
<!-- TOYOTA OPEN -->
<TOYOTA>
<model>AFENZA</model>
<price>3000</price>
</TOYOTA>
<TOYOTA>
<model>ALPHARD</model>
<price>3000</price>
</TOYOTA>
<TOYOTA>
<model>ALTIS</model>
<price>1500</price>
</TOYOTA>
<TOYOTA>
<model>AVANZA</model>
<price>800</price>
</TOYOTA>
<TOYOTA>
<model>CALDINA</model>
<price>2500</price>
</TOYOTA>
<TOYOTA>
<model>CAMRY</model>
<price>2000</price>
</TOYOTA>
<TOYOTA>
<model>COROLLA</model>
<price>1200</price>
</TOYOTA>
<TOYOTA>
<model>ESTIMA</model>
<price>3000</price>
</TOYOTA>
<TOYOTA>
<model>HARRIER</model>
<price>3000</price>
</TOYOTA>
<TOYOTA>
<model>HIACE</model>
<price>800</price>
</TOYOTA>
<TOYOTA>
<model>HILUX</model>
<price>900</price>
</TOYOTA>
<TOYOTA>
<model>INNOVA</model>
<price>800</price>
</TOYOTA>
<TOYOTA>
<model>MARX X</model>
<price>4000</price>
</TOYOTA>
<TOYOTA>
<model>PRIUS</model>
<price>1500</price>
</TOYOTA>
<TOYOTA>
<model>RUSH</model>
<price>900</price>
</TOYOTA>
<TOYOTA>
<model>UNSER</model>
<price>700</price>
</TOYOTA>
<TOYOTA>
<model>VELLFIRE</model>
<price>3000</price>
</TOYOTA>
<TOYOTA>
<model>VIOS</model>
<price>800</price>
</TOYOTA>
<TOYOTA>
<model>WISH</model>
<price>2500</price>
</TOYOTA>
<TOYOTA>
<model>YARIS</model>
<price>1000</price>
</TOYOTA>
<!-- TOYOTA CLOSE -->
<!-- HYUNDAI OPEN -->
<HYUNDAI>
<model>ACCENT</model>
<price>1000</price>
</HYUNDAI>
<HYUNDAI>
<model>ATOS</model>
<price>800</price>
</HYUNDAI>
<HYUNDAI>
<model>AVANTE</model>
<price>1500</price>
</HYUNDAI>
<HYUNDAI>
<model>COUPE</model>
<price>1000</price>
</HYUNDAI>
<HYUNDAI>
<model>ELANTRA</model>
<price>1500</price>
</HYUNDAI>
<HYUNDAI>
<model>GETZ</model>
<price>900</price>
</HYUNDAI>
<HYUNDAI>
<model>STAREX</model>
<price>3000</price>
</HYUNDAI>
<HYUNDAI>
<model>GRAND STAREX</model>
<price>3000</price>
</HYUNDAI>
<HYUNDAI>
<model>i10</model>
<price>900</price>
</HYUNDAI>
<HYUNDAI>
<model>i30</model>
<price>1500</price>
</HYUNDAI>
<HYUNDAI>
<model>MATRIX</model>
<price>1000</price>
</HYUNDAI>
<HYUNDAI>
<model>SANTA FE</model>
<price>2000</price>
</HYUNDAI>
<HYUNDAI>
<model>SONATA</model>
<price>2000</price>
</HYUNDAI>
<HYUNDAI>
<model>TRAJET</model>
<price>1600</price>
</HYUNDAI>
<HYUNDAI>
<model>TUCSON</model>
<price>1800</price>
</HYUNDAI>
<!-- HYUNDAI CLOSE -->
<!-- KIA OPEN -->
<KIA>
<model>CARENS</model>
<price>1000</price>
</KIA>
<KIA>
<model>FORTE</model>
<price>1200</price>
</KIA>
<KIA>
<model>OPTIMA</model>
<price>2000</price>
</KIA>
<KIA>
<model>PICANTO</model>
<price>1200</price>
</KIA>
<KIA>
<model>PREGIO</model>
<price>1200</price>
</KIA>
<KIA>
<model>RIO</model>
<price>1000</price>
</KIA>
<KIA>
<model>SEPHIA</model>
<price>1000</price>
</KIA>
<KIA>
<model>SORENTO</model>
<price>2000</price>
</KIA>
<KIA>
<model>SPORTAGE</model>
<price>2000</price>
</KIA>
<!-- KIA CLOSE -->
<!-- PEUGEOT CLOSE -->
<PEUGEOT>
<model>207</model>
<price>1500</price>
</PEUGEOT>
<PEUGEOT>
<model>2008</model>
<price>1650</price>
</PEUGEOT>
<PEUGEOT>
<model>208</model>
<price>1800</price>
</PEUGEOT>
<PEUGEOT>
<model>3008</model>
<price>2150</price>
</PEUGEOT>
<PEUGEOT>
<model>307</model>
<price>3000</price>
</PEUGEOT>
<PEUGEOT>
<model>308</model>
<price>2300</price>
</PEUGEOT>
<PEUGEOT>
<model>407</model>
<price>3000</price>
</PEUGEOT>
<PEUGEOT>
<model>408</model>
<price>2200</price>
</PEUGEOT>
<PEUGEOT>
<model>5008</model>
<price>2230</price>
</PEUGEOT>
<PEUGEOT>
<model>508</model>
<price>1700</price>
</PEUGEOT>
<!-- PEUGEOT CLOSE -->
<!-- SUZUKI CLOSE -->
<SUZUKI>
<model>ALTO</model>
<price>900</price>
</SUZUKI>
<SUZUKI>
<model>APV</model>
<price>1000</price>
</SUZUKI>
<SUZUKI>
<model>GRAND VITARA</model>
<price>2200</price>
</SUZUKI>
<SUZUKI>
<model>SWIFT</model>
<price>1000</price>
</SUZUKI>
<SUZUKI>
<model>SX4</model>
<price>2200</price>
</SUZUKI>
<SUZUKI>
<model>VITARA</model>
<price>1000</price>
</SUZUKI>
<!-- SUZUKI CLOSE -->
<!-- BMW CLOSE -->
<BMW>
<model>E88</model>
<price>1700</price>
</BMW>
<BMW>
<model>E82</model>
<price>1700</price>
</BMW>
<BMW>
<model>E81</model>
<price>1700</price>
</BMW>
<BMW>
<model>E87</model>
<price>1000</price>
</BMW>
<BMW>
<model>E92</model>
<price>3100</price>
</BMW>
<BMW>
<model>E36</model>
<price>1800</price>
</BMW>
<BMW>
<model>E46</model>
<price>2200</price>
</BMW>
<BMW>
<model>F30</model>
<price>3000</price>
</BMW>
<BMW>
<model>E90</model>
<price>3000</price>
</BMW>
<BMW>
<model>E39</model>
<price>2800</price>
</BMW>
<BMW>
<model>E60</model>
<price>4000</price>
</BMW>
<BMW>
<model>E63</model>
<price>3800</price>
</BMW>
<BMW>
<model>E65</model>
<price>5000</price>
</BMW>
<BMW>
<model>E66</model>
<price>4300</price>
</BMW>
<BMW>
<model>E84</model>
<price>3100</price>
</BMW>
<BMW>
<model>E83</model>
<price>4100</price>
</BMW>
<BMW>
<model>E53</model>
<price>4600</price>
</BMW>
<BMW>
<model>E70</model>
<price>6000</price>
</BMW>
<BMW>
<model>E71</model>
<price>4800</price>
</BMW>
<BMW>
<model>E85</model>
<price>2800</price>
</BMW>
<BMW>
<model>F20</model>
<price>5300</price>
</BMW>
<BMW>
<model>F30</model>
<price>4000</price>
</BMW>
<!-- BMW CLOSE -->
<!-- MERCEDES_BENZ CLOSE -->
<MERCEDES-BENZ>
<model>A170</model>
<price>2500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>B170</model>
<price>2500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>W203</model>
<price>3500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>W204</model>
<price>3500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>C219</model>
<price>9000</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>C207</model>
<price>3800</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>W212</model>
<price>6000</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>W210</model>
<price>4200</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>W211</model>
<price>4500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>W251</model>
<price>8000</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>V221</model>
<price>9000</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>CLK</model>
<price>3500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>CLS</model>
<price>3000</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>SLR</model>
<price>4500</price>
</MERCEDES-BENZ>
<MERCEDES-BENZ>
<model>SLK</model>
<price>3300</price>
</MERCEDES-BENZ>
<!-- MERCEDES_BENZ CLOSE -->
<!-- MITSUBISHI CLOSE -->
<MITSUBISHI>
<model>ASX</model>
<price>2400</price>
</MITSUBISHI>
<MITSUBISHI>
<model>ATTRAGE</model>
<price>1400</price>
</MITSUBISHI>
<MITSUBISHI>
<model>GRANDIS</model>
<price>2000</price>
</MITSUBISHI>
<MITSUBISHI>
<model>LANCER</model>
<price>2500</price>
</MITSUBISHI>
<MITSUBISHI>
<model>MIRAGE</model>
<price>1500</price>
</MITSUBISHI>
<MITSUBISHI>
<model>OUTLANDER</model>
<price>3000</price>
</MITSUBISHI>
<MITSUBISHI>
<model>STORM</model>
<price>1200</price>
</MITSUBISHI>
<MITSUBISHI>
<model>TRITON</model>
<price>1200</price>
</MITSUBISHI>
<MITSUBISHI>
<model>EVOLUTION</model>
<price>4000</price>
</MITSUBISHI>
<!-- MITSUBISHI CLOSE -->
<!-- VOLKSWAGEN CLOSE -->
<VOLKSWAGEN>
<model>GOLF</model>
<price>1900</price>
</VOLKSWAGEN>
<VOLKSWAGEN>
<model>JETTA</model>
<price>2800</price>
</VOLKSWAGEN>
<VOLKSWAGEN>
<model>PASSAT</model>
<price>2500</price>
</VOLKSWAGEN>
<VOLKSWAGEN>
<model>POLO</model>
<price>2000</price>
</VOLKSWAGEN>
<VOLKSWAGEN>
<model>SCIROCCO</model>
<price>2500</price>
</VOLKSWAGEN>
<VOLKSWAGEN>
<model>TIGUAN</model>
<price>2800</price>
</VOLKSWAGEN>
<VOLKSWAGEN>
<model>TOUAREG</model>
<price>3000</price>
</VOLKSWAGEN>
<!-- VOLKSWAGEN CLOSE -->
<!-- VOLVO CLOSE -->
<VOLVO>
<model>940</model>
<price>1000</price>
</VOLVO>
<VOLVO>
<model>C70</model>
<price>2500</price>
</VOLVO>
<VOLVO>
<model>S40</model>
<price>2600</price>
</VOLVO>
<VOLVO>
<model>S60</model>
<price>2900</price>
</VOLVO>
<VOLVO>
<model>S80</model>
<price>3000</price>
</VOLVO>
<VOLVO>
<model>V40</model>
<price>3000</price>
</VOLVO>
<VOLVO>
<model>V50</model>
<price>2800</price>
</VOLVO>
<VOLVO>
<model>V60</model>
<price>3500</price>
</VOLVO>
<VOLVO>
<model>V70</model>
<price>2700</price>
</VOLVO>
<VOLVO>
<model>XC60</model>
<price>4200</price>
</VOLVO>
<VOLVO>
<model>XC90</model>
<price>4100</price>
</VOLVO>
<!-- VOLVO CLOSE -->
<!-- MAZDA CLOSE -->
<MAZDA>
<model>2</model>
<price>1000</price>
</MAZDA>
<MAZDA>
<model>3</model>
<price>1600</price>
</MAZDA>
<MAZDA>
<model>5</model>
<price>1900</price>
</MAZDA>
<MAZDA>
<model>6</model>
<price>2700</price>
</MAZDA>
<MAZDA>
<model>8</model>
<price>2200</price>
</MAZDA>
<MAZDA>
<model>BIANTE</model>
<price>2200</price>
</MAZDA>
<MAZDA>
<model>CX-5</model>
<price>2450</price>
</MAZDA>
<MAZDA>
<model>CX-7</model>
<price>3000</price>
</MAZDA>
<MAZDA>
<model>CX-9</model>
<price>3050</price>
</MAZDA>
<MAZDA>
<model>PREMACY</model>
<price>1650</price>
</MAZDA>
<MAZDA>
<model>RX-8</model>
<price>2200</price>
</MAZDA>
<MAZDA>
<model>TRIBUTE</model>
<price>1400</price>
</MAZDA>
<!-- MAZDA CLOSE -->
<!-- AUDI CLOSE -->
<AUDI>
<model>A4</model>
<price>2350</price>
</AUDI>
<AUDI>
<model>A5</model>
<price>2500</price>
</AUDI>
<AUDI>
<model>A6</model>
<price>2700</price>
</AUDI>
<AUDI>
<model>Q5</model>
<price>3400</price>
</AUDI>
<AUDI>
<model>Q7</model>
<price>3900</price>
</AUDI>
<!-- AUDI CLOSE -->
</data>
<data>
<ACCORD>
<price>1665</price>
<year1>2003</year1>
<year2>2007</year2>
</ACCORD>
<ACCORD>
<price>1600</price>
<year1>2008</year1>
<year2>2012</year2>
</ACCORD>
<ACCORD>
<price>1825</price>
<year1>2013</year1>
<year2>2016</year2>
</ACCORD>
<ACCORD>
<price>1825</price>
<year1>2017</year1>
<year2>2017</year2>
</ACCORD>
<CITY>
<price>1093</price>
<year1>2003</year1>
<year2>2008</year2>
</CITY>
<CITY>
<price>1120</price>
<year1>2009</year1>
<year2>2013</year2>
</CITY>
<CITY>
<price>1202</price>
<year1>2014</year1>
<year2>2017</year2>
</CITY>
<CITY>
<price>1183</price>
<year1>2017</year1>
<year2>2018</year2>
</CITY>
<CIVIC>
<price>2257</price>
<year1>2001</year1>
<year2>2003</year2>
</CIVIC>
<CIVIC>
<price>1757</price>
<year1>2004</year1>
<year2>2005</year2>
</CIVIC>
<CIVIC>
<price>1368</price>
<year1>2006</year1>
<year2>2009</year2>
</CIVIC>
<CIVIC>
<price>1730</price>
<year1>2010</year1>
<year2>2011</year2>
</CIVIC>
<CIVIC>
<price>2083</price>
<year1>2012</year1>
<year2>2015</year2>
</CIVIC>
<CIVIC>
<price>2027</price>
<year1>2016</year1>
<year2>2017</year2>
</CIVIC>
<CIVIC-HYBRID>
<price>2227</price>
<year1>2013</year1>
<year2>2015</year2>
</CIVIC-HYBRID>
<CR-V>
<price>2007</price>
<year1>2002</year1>
<year2>2004</year2>
</CR-V>
<CR-V>
<price>1948</price>
<year1>2005</year1>
<year2>2006</year2>
</CR-V>
<CR-V>
<price>1267</price>
<year1>2007</year1>
<year2>2007</year2>
</CR-V>
<CR-V>
<price>1627</price>
<year1>2008</year1>
<year2>2011</year2>
</CR-V>
<CR-V>
<price>1476</price>
<year1>2013</year1>
<year2>2015</year2>
</CR-V>
<CR-V>
<price>1753</price>
<year1>2016</year1>
<year2>2017</year2>
</CR-V>
<CR-V_4WD>
<price>1530</price>
<year1>2013</year1>
<year2>2013</year2>
</CR-V_4WD>
<CR-V_4WD>
<price>1809</price>
<year1>2014</year1>
<year2>2015</year2>
</CR-V_4WD>
<CR-V_4WD>
<price>1890</price>
<year1>2016</year1>
<year2>2017</year2>
</CR-V_4WD>
<CR-V_20>
<price>1916</price>
<year1>2017</year1>
<year2>2018</year2>
</CR-V_20>
<CR-V_15_TC_24WD>
<price>1975</price>
<year1>2017</year1>
<year2>2018</year2>
</CR-V_15_TC_24WD>
<CR-V_15_TCP>
<price>2063</price>
<year1>2017</year1>
<year2>2018</year2>
</CR-V_15_TCP>
<CR-Z>
<price>4927</price>
<year1>2012</year1>
<year2>2012</year2>
</CR-Z>
<CR-Z>
<price>5808</price>
<year1>2013</year1>
<year2>2014</year2>
</CR-Z>
<FREED>
<price>1814</price>
<year1>2010</year1>
<year2>2015</year2>
</FREED>
<INSIGHT>
<price>4836</price>
<year1>2011</year1>
<year2>2011</year2>
</INSIGHT>
<INSIGHT>
<price>4939</price>
<year1>2012</year1>
<year2>2012</year2>
</INSIGHT>
<INSIGHT>
<price>4948</price>
<year1>2013</year1>
<year2>2014</year2>
</INSIGHT>
<JAZZ>
<price>1322</price>
<year1>2003</year1>
<year2>2007</year2>
</JAZZ>
<JAZZ>
<price>5158</price>
<year1>2008</year1>
<year2>2008</year2>
</JAZZ>
<JAZZ>
<price>1546</price>
<year1>2009</year1>
<year2>2012</year2>
</JAZZ>
<JAZZ>
<price>1456</price>
<year1>2013</year1>
<year2>2013</year2>
</JAZZ>
<JAZZ>
<price>1638</price>
<year1>2014</year1>
<year2>2015</year2>
</JAZZ>
<JAZZ>
<price>1638</price>
<year1>2016</year1>
<year2>2017</year2>
</JAZZ>
<JAZZ-HYBRID>
<price>1456</price>
<year1>2012</year1>
<year2>2013</year2>
</JAZZ-HYBRID>
<JAZZ-HYBRID>
<price>4898</price>
<year1>2014</year1>
<year2>2015</year2>
</JAZZ-HYBRID>
<JAZZ-HYBRID>
<price>1713</price>
<year1>2018</year1>
<year2>2018</year2>
</JAZZ-HYBRID>
<ODYSSEY>
<price>6309</price>
<year1>2004</year1>
<year2>2008</year2>
</ODYSSEY>
<ODYSSEY>
<price>5198</price>
<year1>2014</year1>
<year2>2016</year2>
</ODYSSEY>
<ODYSSEY>
<price>5546</price>
<year1>2017</year1>
<year2>2017</year2>
</ODYSSEY>
<STREAM>
<price>4020</price>
<year1>2007</year1>
<year2>2008</year2>
</STREAM>
<STREAM>
<price>4012</price>
<year1>2010</year1>
<year2>2013</year2>
</STREAM>
<HR-V>
<price>1705</price>
<year1>2016</year1>
<year2>2017</year2>
</HR-V>
<BR-V>
<price>1374</price>
<year1>2016</year1>
<year2>2017</year2>
</BR-V>
</data>
<data>
<workshop>
<name>AG Two Auto Glass Specialist</name>
</workshop>
<workshop>
<name>AKS Autoglass Specialist</name>
</workshop>
<workshop>
<name>Ampang Auto Windscreen Sdn Bhd</name>
</workshop>
<workshop>
<name>Ar Shieng Sdn Bhd</name>
</workshop>
<workshop>
<name>Auto Glass Replacement Centre</name>
</workshop>
<workshop>
<name>BSG Auto Glass</name>
</workshop>
<workshop>
<name>BSM Motor Works Sdn Bhd</name>
</workshop>
<workshop>
<name>Balakong Auto Windscreen Specialist</name>
</workshop>
<workshop>
<name>Beng Kamunting Auto Service Sdn Bhd</name>
</workshop>
<workshop>
<name>Bengkel LB Motor Sdn Bhd</name>
</workshop>
<workshop>
<name>Bengkel Yeow Lee Hin Sdn Bhd</name>
</workshop>
<workshop>
<name>CCH Auto Glass Sdn Bhd</name>
</workshop>
<workshop>
<name>CF Windscreen &#38; Tint Specialist Enterprise</name>
</workshop>
<workshop>
<name>CH Autoglass Enterprise</name>
</workshop>
<workshop>
<name>DMG Auto Glass Sdn Bhd</name>
</workshop>
<workshop>
<name>DSG Auto Glass Sdn Bhd</name>
</workshop>
<workshop>
<name>DW Windscreen Sdn Bhd</name>
</workshop>
<workshop>
<name>Divania Sdn Bhd</name>
</workshop>
<workshop>
<name>Elegance Windscreen Specialist Sdn Bhd</name>
</workshop>
<workshop>
<name>Federal Motor</name>
</workshop>
<workshop>
<name>Fila Workshop</name>
</workshop>
<workshop>
<name>Glass Mechanic Sdn Bhd</name>
</workshop>
<workshop>
<name>Heng Heng Workshop Sdn Bhd</name>
</workshop>
<workshop>
<name>Hoi Keen Auto Spray Sdn Bhd</name>
</workshop>
<workshop>
<name>Hong Leong Auto</name>
</workshop>
<workshop>
<name>JS Windscreen Services And Trading</name>
</workshop>
<workshop>
<name>Juta Oven Spray Painting Sdn Bhd</name>
</workshop>
<workshop>
<name>Kai Windscreen Specialist Sdn Bhd</name>
</workshop>
<workshop>
<name>Kein Chuan Motor Workshop Sdn Bhd</name>
</workshop>
<workshop>
<name>Keong Workshop (Terengganu) Sdn Bhd</name>
</workshop>
<workshop>
<name>Kg. Tawas Harp Hin Motor Sdn Bhd</name>
</workshop>
<workshop>
<name>Kota Bharu Glass &#38; Parts Supply</name>
</workshop>
<workshop>
<name>Leong Workshop (Kuantan) Sdn Bhd</name>
</workshop>
<workshop>
<name>Lim CLS Motor Work &#38; Glass Supply</name>
</workshop>
<workshop>
<name>M.K Lim Motor Workshop Sdn Bhd</name>
</workshop>
<workshop>
<name>MAG Auto Glass Sdn Bhd</name>
</workshop>
<workshop>
<name>MY Auto Glass Sdn Bhd</name>
</workshop>
<workshop>
<name>Mersing CG Auto Trading</name>
</workshop>
<workshop>
<name>Mun Ly Automobile Service Sdn Bhd</name>
</workshop>
<workshop>
<name>Nanmar Motor Service Sdn Bhd</name>
</workshop>
<workshop>
<name>Proshine Glass Enterprise</name>
</workshop>
<workshop>
<name>Puchong Sunway Auto Glass Specialists Sdn Bhd</name>
</workshop>
<workshop>
<name>Raub Lian Hup Workshop Sdn Bhd</name>
</workshop>
<workshop>
<name>SMAG Motor Sdn Bhd</name>
</workshop>
<workshop>
<name>Shen Wah Auto Services Sdn. Bhd</name>
</workshop>
<workshop>
<name>Thim Cheong Enterprise</name>
</workshop>
<workshop>
<name>United Teh Auto Repair Sdn Bhd</name>
</workshop>
<workshop>
<name>Weng Heng Auto Repair Sdn Bhd</name>
</workshop>
<workshop>
<name>Windshield Specialist</name>
</workshop>
<workshop>
<name>Yan Kee Auto Glass Sdn Bhd</name>
</workshop>
<workshop>
<name>Others</name>
</workshop>
</data>
<data>
<rule id="1">
<item name="first_time">0.0136607004110924</item>
<item name="second_time">-0.985505813214291</item>
<item name="third_time">-0.999166513625383</item>
<item name="weight">-0.254612</item>
</rule>
<rule id="2">
<item name="zero">0.00822891208837773</item>
<item name="one">-0.990365462584938</item>
<item name="two">-0.997690253860172</item>
<item name="above_two">-0.999095879186856</item>
<item name="weight">-0.168675</item>
</rule>
<rule id="3">
<item name="inception">0.999985873112295</item>
<item name="midterm">-0.999985873112295</item>
<item name="weight">1.000000</item>
</rule>
<rule id="4">
<item name="others">0.999985873112295</item>
<item name="renewal">1.000000</item>
<item name="new_business">-0.999985873112295</item>
<item name="weight">0.020549</item>
</rule>
<!-- skip 5 and 6 for now -->
<rule id="5">
<item name="inception">0.00245138740619488</item>
<item name="midterm">-0.997548612593805</item>
<item name="weight">-0.030592</item>
</rule>
<rule id="6">
<item name="1_14_inception">-0.972953118267417</item>
<item name="15_28_inception">-0.916987476071739</item>
<item name="29_42_inception">-0.834709576249038</item>
<item name="1_30_expiry">-0.586003998050421</item>
<item name="others">0.304671220394295</item>
<item name="weight">0.865919</item>
</rule>
<!-- skip 5 and 6 for now -->
<rule id="7">
<item name="below_market_price">0.55582302248327</item>
<item name="same_figure">0.0349204820823905</item>
<item name="more_than_market_price">-0.520902540400879</item>
<item name="weight">0.017125</item>
</rule>
<rule id="8">
<item name="0_7">0.2894</item>
<item name="8_14">-0.5254</item>
<item name="above">-0.8149</item>
<item name="weight">0.179200</item>
</rule>
<rule id="9">
<item name="same">0.13243957223784</item>
<item name="not_same">-0.86756042776216</item>
<item name="weight">-0.350662</item>
</rule>
<rule id="10">
<item name="same">0.13243957223784</item>
<item name="not_same">-0.86756042776216</item>
<item name="weight">0.006269</item>
</rule>
<rule id="11">
<item name="same">0.732987695480809</item>
<item name="not_same">-0.267012304519191</item>
<item name="weight">-0.011744</item>
</rule>
</data>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment