In [6]:
%pylab inline

import pandas as pd

from soln.dataset import get_augmented_train_and_test_set

pd.set_option('display.max_columns', None)


Populating the interactive namespace from numpy and matplotlib

In [3]:
aug_train_set, aug_test_set = get_augmented_train_and_test_set()

In [7]:
taids = [
    ('TA-00875', 100),
    ('TA-10796', 250),
    ('TA-10918', 100),
    ('TA-10919', 100),
    ('TA-10956', 250),
    ('TA-17565', 100),
    ('TA-18894', 250),
    ('TA-19109', 100),
    ('TA-19344', 100),
    ('TA-19867', 1),  # weird one, different supplier
    ('TA-20766', 250),  # the one that our predictor thinks is similar
]

df = aug_train_set
subset = pd.DataFrame()
for taid, quantity in taids:
    subset = subset.append(df[(df.tube_assembly_id == taid) & (df.quantity == quantity)])
subset


Out[7]:
tube_assembly_id supplier quote_date annual_usage min_order_quantity bracket_pricing quantity log_cost material_id diameter wall_thickness length num_bends bend_radius end_a_1x end_a_2x end_x_1x end_x_2x end_a end_x num_boss num_bracket num_other specs components quote_age adj_quantity adj_bracketing bracketing_pattern dev_fold
1538 TA-00875 S-0066 2013-06-30 0 0 True 100 1.032593 SP-0019 6.35 0.71 31 2 19.05 False False False False EF-008 EF-008 0 0 0 [] [C-1312, C-1312] 41453 100 True (1, 2, 5, 10, 25, 50, 100, 250) 7
16556 TA-10796 S-0066 2013-09-01 0 0 True 250 1.032593 SP-0029 19.05 1.65 87 4 38.10 False False False True NONE NONE 0 0 0 [] [] 41516 250 True (1, 2, 5, 10, 25, 50, 100, 250) 6
16901 TA-10918 S-0066 2013-08-01 0 0 True 100 1.032593 SP-0035 9.52 1.24 25 2 19.05 False False False False EF-018 EF-018 0 0 0 [] [C-1243, C-1243, C-1244, C-1244] 41485 100 True (1, 2, 5, 10, 25, 50, 100, 250) 2
16909 TA-10919 S-0066 2013-08-01 0 0 True 100 1.032593 SP-0035 9.52 1.24 25 2 19.05 False False False False EF-018 EF-018 0 0 0 [] [C-1243, C-1243, C-1244, C-1244] 41485 100 True (1, 2, 5, 10, 25, 50, 100, 250) 3
17050 TA-10956 S-0066 2013-03-31 0 0 True 250 1.032593 SP-0019 12.70 0.89 36 3 38.10 False False False False NONE EF-008 0 0 0 [] [C-1229] 41362 250 True (1, 2, 5, 10, 25, 50, 100, 250) 2
22993 TA-17565 S-0066 2013-06-01 0 0 True 100 1.032593 SP-0039 6.35 0.71 31 2 19.05 False False False False EF-008 EF-008 0 0 0 [] [C-1312, C-1312] 41424 100 True (1, 2, 5, 10, 25, 50, 100, 250) 9
24364 TA-18894 S-0066 2013-06-01 0 0 True 250 1.032593 SP-0039 6.35 0.71 31 2 25.40 False False False False EF-008 EF-008 0 0 0 [] [C-1845, C-1845, C-1846, C-1846] 41424 250 True (1, 2, 5, 10, 25, 50, 100, 250) 6
25000 TA-19109 S-0066 2013-07-21 0 0 True 100 1.032593 SP-0019 6.35 0.71 23 3 19.05 False False False False EF-008 EF-008 0 0 0 [] [C-1312, C-1312] 41474 100 True (1, 2, 5, 10, 25, 50, 100, 250) 4
25651 TA-19344 S-0066 2013-08-11 0 0 True 100 1.032593 SP-0035 6.35 0.89 26 2 19.05 False False False False EF-018 EF-018 0 0 0 [] [C-1845, C-1845, C-1846, C-1846] 41495 100 True (1, 2, 5, 10, 25, 50, 100, 250) 8
26620 TA-19867 S-0062 2005-05-09 2311 1 False 1 1.032593 SP-0028 25.40 1.65 45 1 50.80 False False False True EF-009 EF-017 0 0 0 [SP-0016, SP-0058, SP-0080] [] 38479 1 False () 7
29135 TA-20766 S-0066 2013-11-02 1 0 True 250 2.979539 SP-0029 12.70 0.89 34 3 25.40 False False False True EF-017 EF-003 0 0 0 [] [C-1475, C-1476] 41578 250 True (1, 2, 5, 10, 25, 50, 100, 250) 0

In [ ]: