infineac.compare_results#

Compare the results of the different models created by the infineac.pipeline or the infineac.topic_extractor modules.

Functions

aggregate_results(df[, category_names])

Aggregates the results of the given DataFrame df and returns a DataFrame with the count of the combinations of categories and strategies.

calculate_similarity(df)

Calculates the intersection and union of all the given categories and topics and, based on this, the similarity within the categories and topics.

create_compare_df(dfs, suffixes)

Joins the given DataFrames(dfs) on the company name and year columns.

create_empty_count_df([column_names])

Creates an empty DataFrame from the cartesian product of the categories and the strategies with the columns category, strategy as well as the given column_names.

get_strategy_list(dictionary)

Returns a list of lists with the strategies for each row of the given dict.

update_count(count, categories, strategies, ...)

Updates the given count DataFrame for the combination of the given categories and strategies in the given column.