/** * Determines frequent subgraphs in a set of embeddings. * * @param embeddings set of embeddings * @return frequent subgraphs */ private DataSet<TFSMSubgraph> getFrequentSubgraphs( DataSet<TFSMSubgraphEmbeddings> embeddings) { return embeddings .map(new TFSMSubgraphOnly()) .groupBy(0) .sum(1) .filter(new Frequent<>()) .withBroadcastSet(minFrequency, DIMSpanConstants.MIN_FREQUENCY); }
/** * Determines frequent subgraphs in a set of embeddings. * * @param embeddings set of embeddings * @return frequent subgraphs */ private DataSet<TFSMSubgraph> getFrequentSubgraphs( DataSet<TFSMSubgraphEmbeddings> embeddings) { return embeddings .map(new TFSMSubgraphOnly()) .groupBy(0) .sum(1) .filter(new Frequent<>()) .withBroadcastSet(minFrequency, DIMSpanConstants.MIN_FREQUENCY); }
/** * Determines frequent labels. * * @param labels dataset of labels * * @return dataset of frequent labels */ private DataSet<WithCount<String>> getFrequentLabels(DataSet<WithCount<String>> labels) { // enabled if (fsmConfig.getDictionaryType() != DictionaryType.RANDOM) { labels = labels .groupBy(0) .sum(1) .filter(new Frequent<>()) .withBroadcastSet(minFrequency, DIMSpanConstants.MIN_FREQUENCY); // disabled } else { labels = labels .distinct(); } return labels; }
/** * Determines frequent labels. * * @param labels dataset of labels * * @return dataset of frequent labels */ private DataSet<WithCount<String>> getFrequentLabels(DataSet<WithCount<String>> labels) { // enabled if (fsmConfig.getDictionaryType() != DictionaryType.RANDOM) { labels = labels .groupBy(0) .sum(1) .filter(new Frequent<>()) .withBroadcastSet(minFrequency, DIMSpanConstants.MIN_FREQUENCY); // disabled } else { labels = labels .distinct(); } return labels; }
.groupBy(0, 1) .sum(2) .filter(new CategoryFrequent()) .withBroadcastSet(categoryMinFrequencies, DIMSpanConstants.MIN_FREQUENCY) .map(new LabelOnly()) .groupBy(0, 1) .sum(2) .filter(new CategoryFrequent()) .withBroadcastSet(categoryMinFrequencies, DIMSpanConstants.MIN_FREQUENCY) .map(new LabelOnly())
.groupBy(0, 1) .sum(2) .filter(new CategoryFrequent()) .withBroadcastSet(categoryMinFrequencies, DIMSpanConstants.MIN_FREQUENCY) .map(new LabelOnly()) .groupBy(0, 1) .sum(2) .filter(new CategoryFrequent()) .withBroadcastSet(categoryMinFrequencies, DIMSpanConstants.MIN_FREQUENCY) .map(new LabelOnly())