@Test public void computeAllHashtagEntropyMap(){ HashtagEntropyCalculator.computeAllHashtagEntropyMap(userTagTimestamps, 2); }
public static HashMap<Integer, Double> computeAllHashtagEntropyMap( HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals) { Duration globalUsageDuration = computeWholeDatasetHashtagUsageDuration(userTagTimestamps); long durationSingleInterval = computeSingleIntervalDuration(globalUsageDuration, numberOfIntervals); ArrayList<Duration> binList = getIntervalDurationList(globalUsageDuration, durationSingleInterval); HashMap<Integer, HashMap<Integer, Integer>> hashtagIntervalCount = computeIntervalHashtagCount( userTagTimestamps, binList); HashMap<Integer, Double> hashtagAllIntervalSumCount = computeHashtagIntervalCountSum(hashtagIntervalCount, binList); HashMap<Integer, HashMap<Integer, Double>> hashtagIntervalProbabilityScores = computeHashtagIntervalProbabilityScores( hashtagIntervalCount, hashtagAllIntervalSumCount, binList.size()); HashMap<Integer, Double> hashtagEntropyMap = computeHashtagEntropyValue(hashtagIntervalProbabilityScores, binList.size()); return hashtagEntropyMap; }
HashtagEntropyCalculator { public static HashMap<Integer, Double> computeAllHashtagEntropyMap( HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals) { Duration globalUsageDuration = computeWholeDatasetHashtagUsageDuration(userTagTimestamps); long durationSingleInterval = computeSingleIntervalDuration(globalUsageDuration, numberOfIntervals); ArrayList<Duration> binList = getIntervalDurationList(globalUsageDuration, durationSingleInterval); HashMap<Integer, HashMap<Integer, Integer>> hashtagIntervalCount = computeIntervalHashtagCount( userTagTimestamps, binList); HashMap<Integer, Double> hashtagAllIntervalSumCount = computeHashtagIntervalCountSum(hashtagIntervalCount, binList); HashMap<Integer, HashMap<Integer, Double>> hashtagIntervalProbabilityScores = computeHashtagIntervalProbabilityScores( hashtagIntervalCount, hashtagAllIntervalSumCount, binList.size()); HashMap<Integer, Double> hashtagEntropyMap = computeHashtagEntropyValue(hashtagIntervalProbabilityScores, binList.size()); return hashtagEntropyMap; } }
HashtagEntropyCalculator { public static HashMap<Integer, Double> computeAllHashtagEntropyMap( HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals) { Duration globalUsageDuration = computeWholeDatasetHashtagUsageDuration(userTagTimestamps); long durationSingleInterval = computeSingleIntervalDuration(globalUsageDuration, numberOfIntervals); ArrayList<Duration> binList = getIntervalDurationList(globalUsageDuration, durationSingleInterval); HashMap<Integer, HashMap<Integer, Integer>> hashtagIntervalCount = computeIntervalHashtagCount( userTagTimestamps, binList); HashMap<Integer, Double> hashtagAllIntervalSumCount = computeHashtagIntervalCountSum(hashtagIntervalCount, binList); HashMap<Integer, HashMap<Integer, Double>> hashtagIntervalProbabilityScores = computeHashtagIntervalProbabilityScores( hashtagIntervalCount, hashtagAllIntervalSumCount, binList.size()); HashMap<Integer, Double> hashtagEntropyMap = computeHashtagEntropyValue(hashtagIntervalProbabilityScores, binList.size()); return hashtagEntropyMap; }  }
HashtagEntropyCalculator { public static HashMap<Integer, Double> computeAllHashtagEntropyMap( HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals) { Duration globalUsageDuration = computeWholeDatasetHashtagUsageDuration(userTagTimestamps); long durationSingleInterval = computeSingleIntervalDuration(globalUsageDuration, numberOfIntervals); ArrayList<Duration> binList = getIntervalDurationList(globalUsageDuration, durationSingleInterval); HashMap<Integer, HashMap<Integer, Integer>> hashtagIntervalCount = computeIntervalHashtagCount( userTagTimestamps, binList); HashMap<Integer, Double> hashtagAllIntervalSumCount = computeHashtagIntervalCountSum(hashtagIntervalCount, binList); HashMap<Integer, HashMap<Integer, Double>> hashtagIntervalProbabilityScores = computeHashtagIntervalProbabilityScores( hashtagIntervalCount, hashtagAllIntervalSumCount, binList.size()); HashMap<Integer, Double> hashtagEntropyMap = computeHashtagEntropyValue(hashtagIntervalProbabilityScores, binList.size()); return hashtagEntropyMap; }  static HashMap<Integer, Double> computeAllHashtagEntropyMap(
        HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals); static void serializeHashtagEntropy(Map<Integer, Double> hashtagEntropyMap, String filePath); static Map<Integer, Double> deSerializeHashtagEntropy(String filePath); }
HashtagEntropyCalculator { public static HashMap<Integer, Double> computeAllHashtagEntropyMap( HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals) { Duration globalUsageDuration = computeWholeDatasetHashtagUsageDuration(userTagTimestamps); long durationSingleInterval = computeSingleIntervalDuration(globalUsageDuration, numberOfIntervals); ArrayList<Duration> binList = getIntervalDurationList(globalUsageDuration, durationSingleInterval); HashMap<Integer, HashMap<Integer, Integer>> hashtagIntervalCount = computeIntervalHashtagCount( userTagTimestamps, binList); HashMap<Integer, Double> hashtagAllIntervalSumCount = computeHashtagIntervalCountSum(hashtagIntervalCount, binList); HashMap<Integer, HashMap<Integer, Double>> hashtagIntervalProbabilityScores = computeHashtagIntervalProbabilityScores( hashtagIntervalCount, hashtagAllIntervalSumCount, binList.size()); HashMap<Integer, Double> hashtagEntropyMap = computeHashtagEntropyValue(hashtagIntervalProbabilityScores, binList.size()); return hashtagEntropyMap; }  static HashMap<Integer, Double> computeAllHashtagEntropyMap(
        HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimestamps, int numberOfIntervals); static void serializeHashtagEntropy(Map<Integer, Double> hashtagEntropyMap, String filePath); static Map<Integer, Double> deSerializeHashtagEntropy(String filePath);  }