Closed dhruvghulati-zz closed 8 years ago
Using this line, if I add of.write("Predicted EV pairs are: "+ str(prediction)) I get:
of.write("Predicted EV pairs are: "+ str(prediction))
text pattern: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT MAPE:0.0 {u'Brunei': 107.29, u'Saudi Arabia': 142.05, u'Czech Republic': 121.1, u'South Africa': 154.95, u'Sierra Leone': 214.26, u'United Kingdom': 122.99, u'New Zealand': 121.08, u'Dominican Republic': 153.26} region: Saudi Arabia pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 142.05 region: Saudi Arabia pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 142.05 region: Dominican Republic pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 153.26 region: Dominican Republic pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 153.26 region: Brunei pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 107.29 region: Brunei pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 107.29 region: Sierra Leone pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 214.26 region: Sierra Leone pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 214.26 region: United Kingdom pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 122.99 region: United Kingdom pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 122.99 Predicted EV pairs are: {u'Canada': 146.12, u'Lithuania': 146.12, u'Cambodia': 146.12, u'Ethiopia': 146.12, u'Swaziland': 146.12, u'Argentina': 146.12, u'Cameroon': 146.12, u'Burkina Faso': 146.12, u'Ghana': 146.12, u'Saudi Arabia': 142.05000000000001, u'Republic of Ireland': 146.12, u'Bosnia and Herzegovina': 146.12, u'Spain': 146.12, u'Liberia': 146.12, u'Maldives': 146.12, u'Tanzania': 146.12, u'Gabon': 146.12, u'Albania': 146.12, u'Samoa': 146.12, u'India': 146.12, u'Azerbaijan': 146.12, u'Lesotho': 146.12, u'Saint Vincent and the Grenadines': 146.12, u'Cyprus': 146.12, u'Tajikistan': 146.12, u'Afghanistan': 146.12, u'Bangladesh': 146.12, u'Solomon Islands': 146.12, u'Saint Lucia': 146.12, u'Mongolia': 146.12, u'France': 146.12, u'Slovakia': 146.12, u'Laos': 146.12, u'Malawi': 146.12, u'Singapore': 146.12, u'Montenegro': 146.12, u'Saint Kitts and Nevis': 146.12, u'Armenia': 146.12, u'Dominican Republic': 153.25999999999999, u'Ukraine': 146.12, u'Bahrain': 146.12, u'Tonga': 146.12, u'Libya': 146.12, u'Central African Republic': 146.12, u'Mauritius': 146.12, u'Vietnam': 146.12, u'Mali': 146.12, u'Russia': 146.12, u'Bulgaria': 146.12, u'Romania': 146.12, u'Angola': 146.12, u'Portugal': 146.12, u'Nicaragua': 146.12, u'Malaysia': 146.12, u'Austria': 146.12, u'Mozambique': 146.12, u'Hungary': 146.12, u'Brazil': 146.12, u'Kuwait': 146.12, u'Qatar': 146.12, u'Nigeria': 146.12, u'Brunei': 107.29000000000001, u'Australia': 146.12, u'Algeria': 146.12, u'Belgium': 146.12, u'Haiti': 146.12, u'Iraq': 146.12, u'Sierra Leone': 214.25999999999999, u'Denmark': 146.12, u'Namibia': 146.12, u'Guinea-Bissau': 146.12, u'Switzerland': 146.12, u'Seychelles': 146.12, u'Estonia': 146.12, u'Kosovo': 146.12, u'Timor-Leste': 146.12, u'Dominica': 146.12, u'Colombia': 146.12, u'Burundi': 146.12, u'Fiji': 146.12, u'Barbados': 146.12, u'Madagascar': 146.12, u'Bhutan': 146.12, u'Sudan': 146.12, u'Netherlands': 146.12, u'Suriname': 146.12, u'S\xe3o Tom\xe9 and Pr\xedncipe': 146.12, u'Venezuela': 146.12, u'Israel': 146.12, u'Senegal': 146.12, u'Papua New Guinea': 146.12, u'Germany': 146.12, u'Kazakhstan': 146.12, u'Mauritania': 146.12, u'Kyrgyzstan': 146.12, u'Trinidad and Tobago': 146.12, u'Latvia': 146.12, u'Guyana': 146.12, u'Belarus': 146.12, u'Honduras': 146.12, u'Myanmar': 146.12, u'Tunisia': 146.12, u'Serbia': 146.12, u'Comoros': 146.12, u'United Kingdom': 122.98999999999999, u'Greece': 146.12, u'Sri Lanka': 146.12, u'Croatia': 146.12, u'Botswana': 146.12}MAPE of predictor before adding the pattern:0.17656771874 MAPE of predictor after adding the pattern:0.17656771874
appearing in the adjustedMAPE_consumer_price_index_True_1_TEST file. Is this what I could be storing and thus link these predicted EV pairs to this pattern LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT?
adjustedMAPE_consumer_price_index_True_1_TEST
LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT
No; these are the predictions after adding the pattern to the set of patterns used in each prediction in this line
The EV pairs associated with each pattern can be obtained from the textMatrix, as in here
Using this line, if I add
of.write("Predicted EV pairs are: "+ str(prediction))
I get:text pattern: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT MAPE:0.0 {u'Brunei': 107.29, u'Saudi Arabia': 142.05, u'Czech Republic': 121.1, u'South Africa': 154.95, u'Sierra Leone': 214.26, u'United Kingdom': 122.99, u'New Zealand': 121.08, u'Dominican Republic': 153.26} region: Saudi Arabia pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 142.05 region: Saudi Arabia pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 142.05 region: Dominican Republic pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 153.26 region: Dominican Republic pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 153.26 region: Brunei pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 107.29 region: Brunei pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 107.29 region: Sierra Leone pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 214.26 region: Sierra Leone pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 214.26 region: United Kingdom pattern used: *extend*DATE~appos+LOCATION_SLOT~-nn+consumer~dep+NUMBER_SLOT value: 122.99 region: United Kingdom pattern used: LOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT value: 122.99 Predicted EV pairs are: {u'Canada': 146.12, u'Lithuania': 146.12, u'Cambodia': 146.12, u'Ethiopia': 146.12, u'Swaziland': 146.12, u'Argentina': 146.12, u'Cameroon': 146.12, u'Burkina Faso': 146.12, u'Ghana': 146.12, u'Saudi Arabia': 142.05000000000001, u'Republic of Ireland': 146.12, u'Bosnia and Herzegovina': 146.12, u'Spain': 146.12, u'Liberia': 146.12, u'Maldives': 146.12, u'Tanzania': 146.12, u'Gabon': 146.12, u'Albania': 146.12, u'Samoa': 146.12, u'India': 146.12, u'Azerbaijan': 146.12, u'Lesotho': 146.12, u'Saint Vincent and the Grenadines': 146.12, u'Cyprus': 146.12, u'Tajikistan': 146.12, u'Afghanistan': 146.12, u'Bangladesh': 146.12, u'Solomon Islands': 146.12, u'Saint Lucia': 146.12, u'Mongolia': 146.12, u'France': 146.12, u'Slovakia': 146.12, u'Laos': 146.12, u'Malawi': 146.12, u'Singapore': 146.12, u'Montenegro': 146.12, u'Saint Kitts and Nevis': 146.12, u'Armenia': 146.12, u'Dominican Republic': 153.25999999999999, u'Ukraine': 146.12, u'Bahrain': 146.12, u'Tonga': 146.12, u'Libya': 146.12, u'Central African Republic': 146.12, u'Mauritius': 146.12, u'Vietnam': 146.12, u'Mali': 146.12, u'Russia': 146.12, u'Bulgaria': 146.12, u'Romania': 146.12, u'Angola': 146.12, u'Portugal': 146.12, u'Nicaragua': 146.12, u'Malaysia': 146.12, u'Austria': 146.12, u'Mozambique': 146.12, u'Hungary': 146.12, u'Brazil': 146.12, u'Kuwait': 146.12, u'Qatar': 146.12, u'Nigeria': 146.12, u'Brunei': 107.29000000000001, u'Australia': 146.12, u'Algeria': 146.12, u'Belgium': 146.12, u'Haiti': 146.12, u'Iraq': 146.12, u'Sierra Leone': 214.25999999999999, u'Denmark': 146.12, u'Namibia': 146.12, u'Guinea-Bissau': 146.12, u'Switzerland': 146.12, u'Seychelles': 146.12, u'Estonia': 146.12, u'Kosovo': 146.12, u'Timor-Leste': 146.12, u'Dominica': 146.12, u'Colombia': 146.12, u'Burundi': 146.12, u'Fiji': 146.12, u'Barbados': 146.12, u'Madagascar': 146.12, u'Bhutan': 146.12, u'Sudan': 146.12, u'Netherlands': 146.12, u'Suriname': 146.12, u'S\xe3o Tom\xe9 and Pr\xedncipe': 146.12, u'Venezuela': 146.12, u'Israel': 146.12, u'Senegal': 146.12, u'Papua New Guinea': 146.12, u'Germany': 146.12, u'Kazakhstan': 146.12, u'Mauritania': 146.12, u'Kyrgyzstan': 146.12, u'Trinidad and Tobago': 146.12, u'Latvia': 146.12, u'Guyana': 146.12, u'Belarus': 146.12, u'Honduras': 146.12, u'Myanmar': 146.12, u'Tunisia': 146.12, u'Serbia': 146.12, u'Comoros': 146.12, u'United Kingdom': 122.98999999999999, u'Greece': 146.12, u'Sri Lanka': 146.12, u'Croatia': 146.12, u'Botswana': 146.12}MAPE of predictor before adding the pattern:0.17656771874 MAPE of predictor after adding the pattern:0.17656771874
appearing in the
adjustedMAPE_consumer_price_index_True_1_TEST
file. Is this what I could be storing and thus link these predicted EV pairs to this patternLOCATION_SLOT~-nn+*extend*DATE~num+consumer~dep+NUMBER_SLOT
?