def __init__(self, df: pd.DataFrame):
        super().__init__("creator_tweet_csr_matrix")

        assert df.columns.shape[
            0] == 2, "The dataframe must have exactly two columns"
        assert 'mapped_feature_creator_id' in df.columns, "The dataframe must have mapped_feature_creator_id column"
        assert 'mapped_feature_tweet_id' in df.columns, "The dataframe must have mapped_feature_tweet_id column"

        self.df = df
        self.max_user_id = get_max_user_id()
        self.max_tweet_id = get_max_tweet_id()
Пример #2
0
    def __init__(self, df: pd.DataFrame):
        super().__init__("urm_csr_matrix")

        assert df.columns.shape[
            0] == 3, "The dataframe must have exactly three columns"
        assert 'mapped_feature_engager_id' in df.columns, "The dataframe must have mapped_feature_engager_id column"
        assert 'mapped_feature_tweet_id' in df.columns, "The dataframe must have mapped_feature_tweet_id column"
        assert 'engagement' in df.columns, "The dataframe must have engagement column"

        self.df = df

        self.max_user_id = get_max_user_id()
        self.max_tweet_id = get_max_tweet_id()
 def __init__(self):
     super().__init__("tweet_link_csr_matrix")
     self.max_tweet_id = get_max_tweet_id()
Пример #4
0
 def __init__(self, threshold=5):
     super().__init__(f"tweet_hashtags_threshold_{threshold}_csr_matrix")
     self.max_tweet_id = get_max_tweet_id()
     self.threshold = threshold
Пример #5
0
 def __init__(self):
     super().__init__("tweet_hashtags_csr_matrix")
     self.max_tweet_id = get_max_tweet_id()