Exemplo n.º 1
0
    def __init__(self, heirarchy, import_dir=None, export_dir=None, base_feature_count=None):
        Exporter.__init__(self, export_dir=export_dir)
        Importer.__init__(self, import_dir=import_dir)
        self.tree = {}
        self.dataset = []

        self.heirarchy = heirarchy

        if base_feature_count is None:
            self.base_feature_count = 0
        else:
            self.base_feature_count = base_feature_count

        self.max_depth = len(heirarchy)
Exemplo n.º 2
0
    def __init__(self, conditions, skip_sellingprice=True, import_dir=None, export_dir=None):
        Importer.__init__(self, import_dir=import_dir)
        Exporter.__init__(self, export_dir=export_dir)

        self.conditions = conditions
        self.skip_sellingprice = skip_sellingprice

        # state: region
        # e.g. ca: West
        self.states = features.USA_MAP

        # make: type
        # e.g. honda: Normal
        self.makes = features.MAKE_TYPE_MAP

        # seller: type
        # e.g. ford motor ca: Lease
        self.sellers = features.SELLER_TYPE_MAP

        self.dataset = []
        self.filtered = []
        self.output = []