def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes, 
              store_dataset, use_artists):
     NetworkDataPreparser.__init__(self, node_impl, data_path,
                                   max_core_nodes=max_core_nodes, 
                                   store_dataset=store_dataset)
     self.datadir = data_path
     self.nodes_db_list = []
     self.edges_db_list = []
     self.interaction_types = sorted(LastfmDataPreparserCSV.interact_types_dict.values())
     self.node_index = 0
     self.item_index = 1
     self.items.insert(0, None)
     self.itemid_dict = {} 
     
     self.cutoff_rating = None
    
     self.nodes_files = []
     self.edges_files = []
     self.interacts_files = {}
     for interact_name in self.interact_types_dict.keys():
         self.interacts_files[interact_name] = []
     self.uid_dict = {}
     self.friend_uid_dict = {}
     self.use_artists = use_artists
     self.min_fr_fraction = 0.75
    def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes,
                 store_dataset, use_artists, interact_type_val,
                 min_interactions_per_user):
        NetworkDataPreparser.__init__(
            self,
            node_impl,
            data_path,
            max_core_nodes=max_core_nodes,
            store_dataset=store_dataset,
            min_interactions_per_user=min_interactions_per_user)
        self.datadir = data_path
        self.nodes_db_list = []
        self.edges_db_list = []
        self.interaction_types = sorted(
            LastfmDataPreparserSimple.interact_types_dict.values())
        self.node_index = 0
        self.item_index = 1
        self.items.insert(0, None)

        self.cutoff_rating = None

        self.nodes_files = []
        self.edges_files = []
        self.interacts_files = {}
        for interact_name in self.interact_types_dict.keys():
            self.interacts_files[interact_name] = []
        self.use_artists = use_artists
        self.interact_type_val = interact_type_val
    def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes,
                 store_dataset, min_interactions_per_user):
        NetworkDataPreparser.__init__(
            self,
            node_impl,
            data_path,
            max_core_nodes=max_core_nodes,
            store_dataset=store_dataset,
            min_interactions_per_user=min_interactions_per_user)
        self.datadir = data_path
        self.nodes_filename = data_path + "sorted-links.txt"
        self.items_filename = data_path + "all_items.txt"
        self.edges_filename = data_path + "sorted-links.txt"
        self.interactions_filename = data_path + "sorted-ratings.timed.txt"
        #self.interaction_types = range(1)
        #rate = range(1)
        #self.nodes = [None]*300000 # so that we can index it for smaller datasetsa
        self.node_counter = 0
        self.node_id_map = {}
        self.cutoff_rating = cutoff_rating
        if cutoff_rating is None:
            cutoff_rating = 0
        self.copy_timestamps = []
        self.interact_type_val = 0

        globals().update(self.named_tuple_dict)
Esempio n. 4
0
    def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes,
                 store_dataset):
        NetworkDataPreparser.__init__(self,
                                      node_impl,
                                      data_path,
                                      max_core_nodes=max_core_nodes,
                                      store_dataset=store_dataset)
        self.datadir = data_path
        #nodes_store_path = data_path + "lastfm_nodes.db"
        #edges_store_path = data_path + "lastfm_edges.db"
        self.nodes_db_list = []
        self.edges_db_list = []
        self.interaction_types = sorted(
            LastfmDataPreparser.interact_types_dict.values())
        self.node_index = 0
        self.item_index = 1
        self.items.insert(0, None)
        self.itemid_dict = {}

        self.MAX_NODES_TO_READ = 100000
        self.cutoff_rating = None

        self.nodes_files = []
        self.edges_files = []
        self.uid_dict = {}
        self.friend_uid_dict = {}
    def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes,
                 store_dataset, use_artists):
        NetworkDataPreparser.__init__(self,
                                      node_impl,
                                      data_path,
                                      max_core_nodes=max_core_nodes,
                                      store_dataset=store_dataset)
        self.datadir = data_path
        self.nodes_db_list = []
        self.edges_db_list = []
        self.interaction_types = sorted(
            LastfmDataPreparserCSV.interact_types_dict.values())
        self.node_index = 0
        self.item_index = 1
        self.items.insert(0, None)
        self.itemid_dict = {}

        self.cutoff_rating = None

        self.nodes_files = []
        self.edges_files = []
        self.interacts_files = {}
        for interact_name in self.interact_types_dict.keys():
            self.interacts_files[interact_name] = []
        self.uid_dict = {}
        self.friend_uid_dict = {}
        self.use_artists = use_artists
        self.min_fr_fraction = 0.75
Esempio n. 6
0
 def __init__(self, datadir, node_impl):
     NetworkDataPreparser.__init__(self, node_impl)
     self.datadir = datadir
     self.item_counter = 1
     self.node_index = 1
     self.item_index = 1
     self.nodes.insert(0, None)
     self.items.insert(0, None)
     self.items_dict = {}
 def __init__(self, datadir, node_impl):
     NetworkDataPreparser.__init__(self, node_impl)
     self.datadir = datadir
     self.item_counter = 1
     self.node_index = 1
     self.item_index = 1
     self.nodes.insert(0, None)
     self.items.insert(0, None)
     self.items_dict = {}
 def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes, 
         store_dataset, min_interactions_per_user):
     NetworkDataPreparser.__init__(self, node_impl, data_path,
                                   max_core_nodes=max_core_nodes, 
                                   store_dataset=store_dataset, 
                                   min_interactions_per_user=min_interactions_per_user)
     self.datadir = data_path
     self.nodes_filename = data_path + "goodreads.300k.users.xml"
     self.items_filename = data_path + "goodreads.300k.items.xml"
     self.edges_filename = data_path + "goodreads.300k.edges.newxml"
     self.interactions_filename = data_path + "goodreads.300k.collections.txt"
     #self.interaction_types = range(1)
     #rate = range(1)
     #self.nodes = [None]*300000 # so that we can index it for smaller datasetsa
     self.node_counter = 0
     self.node_id_map = {}
     self.interact_type_val = 0
     self.cutoff_rating = cutoff_rating
     self.copy_timestamps = []
 def __init__(self, data_path, node_impl, cutoff_rating, 
              max_core_nodes, store_dataset, min_interactions_per_user):
     NetworkDataPreparser.__init__(self, node_impl, data_path,
                                   max_core_nodes=max_core_nodes, 
                                   store_dataset=store_dataset,
                                   min_interactions_per_user=min_interactions_per_user)
     self.datadir = data_path
     self.nodes_filename = data_path + "sorted-flickr-growth.txt"
     self.items_filename = data_path + "flickr-all-photos.txt"
     self.edges_filename = data_path + "sorted-flickr-growth.txt"
     self.interactions_filename = data_path + "sorted-flickr-all-photo-favorite-markings.txt"
     #self.interaction_types = range(1)
     #rate = range(1)
     #self.nodes = [None]*300000 # so that we can index it for smaller datasetsa
     self.node_counter = 0
     self.node_id_map = {}
     self.cutoff_rating = cutoff_rating
     self.cutoff_rating = None
     #self.copy_timestamps = []
     self.interact_type_val = 0
     
     globals().update(self.named_tuple_dict)
Esempio n. 10
0
 def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes,
              store_dataset, min_interactions_per_user):
     NetworkDataPreparser.__init__(
         self,
         node_impl,
         data_path,
         max_core_nodes=max_core_nodes,
         store_dataset=store_dataset,
         min_interactions_per_user=min_interactions_per_user)
     self.datadir = data_path
     self.nodes_filename = data_path + "goodreads.300k.users.xml"
     self.items_filename = data_path + "goodreads.300k.items.xml"
     self.edges_filename = data_path + "goodreads.300k.edges.newxml"
     self.interactions_filename = data_path + "goodreads.300k.collections.txt"
     #self.interaction_types = range(1)
     #rate = range(1)
     #self.nodes = [None]*300000 # so that we can index it for smaller datasetsa
     self.node_counter = 0
     self.node_id_map = {}
     self.interact_type_val = 0
     self.cutoff_rating = cutoff_rating
     self.copy_timestamps = []
 def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes, 
              store_dataset, use_artists, interact_type_val, min_interactions_per_user):
     NetworkDataPreparser.__init__(self, node_impl, data_path,
                                   max_core_nodes=max_core_nodes, 
                                   store_dataset=store_dataset,
                                   min_interactions_per_user=min_interactions_per_user)
     self.datadir = data_path
     self.nodes_db_list = []
     self.edges_db_list = []
     self.interaction_types = sorted(LastfmDataPreparserSimple.interact_types_dict.values())
     self.node_index = 0
     self.item_index = 1
     self.items.insert(0, None)
     
     self.cutoff_rating = None
    
     self.nodes_files = []
     self.edges_files = []
     self.interacts_files = {}
     for interact_name in self.interact_types_dict.keys():
         self.interacts_files[interact_name] = []
     self.use_artists = use_artists
     self.interact_type_val = interact_type_val
 def __init__(self, data_path, node_impl, cutoff_rating, max_core_nodes, 
              store_dataset):
     NetworkDataPreparser.__init__(self, node_impl, data_path,
                                   max_core_nodes=max_core_nodes, 
                                   store_dataset=store_dataset)
     self.datadir = data_path
     #nodes_store_path = data_path + "lastfm_nodes.db"
     #edges_store_path = data_path + "lastfm_edges.db"
     self.nodes_db_list = []
     self.edges_db_list = []
     self.interaction_types = sorted(LastfmDataPreparser.interact_types_dict.values())
     self.node_index = 0
     self.item_index = 1
     self.items.insert(0, None)
     self.itemid_dict = {} 
     
     self.MAX_NODES_TO_READ = 100000 
     self.cutoff_rating = None
    
     self.nodes_files = []
     self.edges_files = []
     self.uid_dict = {}
     self.friend_uid_dict = {}