Esempio n. 1
0
 def __init__(self):
     self.conf = config_parser.ParseConfig()
     self.data_set_loc = self.conf.config_section_mapper("filePath").get("data_set_loc")
     self.data_extractor = data_extractor.DataExtractor(self.data_set_loc)
     self.mlmovies = self.data_extractor.get_mlmovies_data()
     self.mltags = self.data_extractor.get_mltags_data()
     self.mlmovies = self.data_extractor.get_mlmovies_data()
     self.mlratings = self.data_extractor.get_mlratings_data()
     self.combined_data = self.get_combined_data()
     self.util = Util()
     self.reshuffle = False
Esempio n. 2
0
 def __init__(self, user_id):
     self.user_id = user_id
     self.conf = config_parser.ParseConfig()
     self.data_set_loc = self.conf.config_section_mapper("filePath").get(
         "data_set_loc")
     self.data_extractor = data_extractor.DataExtractor(self.data_set_loc)
     self.feedback_data = self.get_feedback_data()
     self.util = Util()
     self.movies_dict = {}
     self.tag_dict = {}
     self.movie_tag_matrix = self.get_movie_tag_matrix()
     self.feedback_metadata_dict = {}
 def __init__(self):
     self.conf = config_parser.ParseConfig()
     self.data_set_loc = self.conf.config_section_mapper("filePath").get(
         "data_set_loc")
     self.data_extractor = data_extractor.DataExtractor(self.data_set_loc)
     self.util = Util()
     self.movies_dict = {}
     self.movie_tag_matrix = self.get_movie_tag_matrix()
     self.task_3_input = self.data_extractor.get_lsh_details()
     self.movieLSH = MovieLSH(self.task_3_input["num_layers"],
                              self.task_3_input["num_hashs"])
     (self.query_df, self.query_vector) = self.fetch_query_vector_from_csv()
     self.movieLSH.create_index_structure(self.task_3_input["movie_list"])
import config_parser
import extractor

conf = config_parser.ParseConfig()


class GenericTag(
        object
):  # Represents an abstract class to establish relationships between tags and entities (users/actors/genres).
    def __init__(self, object_id):
        self.object_id = object_id
        self.data_set_location = conf.config_section_mapper("filePath").get(
            "data_set_location")
        self.data_extractor = extractor.DataExtractor(self.data_set_location)

    def get_combined_data(self):
        print "Obtain all relevant data with respect to this model"

    def get_weighted_tags_for_model(self, model):
        print "Obtain the weighted tags for the model passed as input"

    def get_combined_data_for_object(self):
        print "Obtain all relevant data with respect to this model and object"

    def get_model_value(self, movie_id, tag_of_movie, model):
        print "Obtain the row value for the parameters passed as input"