Exemple #1
0
    print "Getting User Dict.."
    user_dict = getUserDict(user_file)

    # getting the coupons used for train and features #
    print "Getting Coupon Dict.."
    coupon_list_train_dict = getCouponDict(coupon_list_train_file)
    coupon_list_feature_dict = getCouponDict(coupon_list_feature_file)

    # getting the DV Dict of that has purchase combination of userid and coupon id #
    print "Getting DV Dict..."
    #dv_dict = getDVDict(coupon_detail_train_file, coupon_list_train_dict.keys())
    dv_dict = {}

    # getting the dict of past coupon purcahse details of user from coupon_detail #
    print "Getting Coupon purchase details.."
    coupon_purchase_detail_dict = getCouponPurchaseDict(
        coupon_detail_feature_file)

    # Getting prefecture location details #
    print "Getting Prefecture location details.. "
    prefecture_location_dict = getPrefectureLocationDict(
        prefecture_location_file)

    # getting coupon area details in form of dict #
    print "Getting coupon area dict.."
    coupon_area_dict = getCouponAreaDict(coupon_area_file)

    # getting coupon visit history of users in form of dict#
    print "Getting the visit history of users.."
    coupon_visit_dict = getCouponVisitDict(coupon_visit_feature_file)

    print "Preparing the data.."
    # getting the coupons used for train and features #
    print "Getting Coupon Dict.."
    ##coupon_list_train_dict = getCouponDict(coupon_list_train_file)
    coupon_list_feature_dict = getCouponDict(coupon_list_feature_file)

    # getting coupons daywise #
    daywise_coupon_list_dict = getDayWiseCoupons(coupon_list_feature_file)

    ## getting the DV Dict of that has purchase combination of userid and coupon id #
    ##print "Getting DV Dict..."
    ##dv_dict = getDVDict(coupon_detail_train_file, coupon_list_train_dict.keys())

    # getting the dict of past coupon purcahse details of user from coupon_detail #
    print "Getting Coupon purchase details.."
    coupon_purchase_detail_dict = getCouponPurchaseDict(coupon_detail_feature_file)

    # Getting prefecture location details #
    print "Getting Prefecture location details.. "
    prefecture_location_dict = getPrefectureLocationDict(prefecture_location_file)

    # getting coupon area details in form of dict #
    print "Getting coupon area dict.."
    coupon_area_dict = getCouponAreaDict(coupon_area_file)

    # getting coupon visit history of users in form of dict#
    print "Getting the visit history of users.."
    coupon_visit_dict = getCouponVisitDict(coupon_visit_feature_file)

    # preparing IDVs #
    print "Preparing IDVs..."