paradance.evaluation.LogarithmPCACalculator
- class paradance.evaluation.LogarithmPCACalculator(df: DataFrame, pca_calculator: SelfBalancingLogarithmPCACalculator, overall_score_lower_bound: float | None = None, overall_score_upper_bound: float | None = None, rerank_eval_str: str | None = None)[source]
A calculator for performing PCA (Principal Component Analysis) operations.
This calculator uses an instance of a SelfBalancingLogarithmPCACalculator to perform the underlying PCA calculations and updates.
- pca_calculator
The PCA calculator instance used for performing PCA operations.
- Type:
SelfBalancingLogarithmPCACalculator
- df
A copy of the cleaned dataframe from the pca_calculator.
- Type:
DataFrame
- __init__(df: DataFrame, pca_calculator: SelfBalancingLogarithmPCACalculator, overall_score_lower_bound: float | None = None, overall_score_upper_bound: float | None = None, rerank_eval_str: str | None = None) None[source]
Initializes the BaseCalculator.
Methods
__init__(df, pca_calculator[, ...])Initializes the BaseCalculator.
calculate_auc_triple_parameters(grid_interval)calculate_corrcoef(mask_column, ...)calculate_cumulative_deviation(mask_column, ...)calculate_distinct_count_portfolio_concentration(...)calculate_distinct_top_coverage(mask_column, ...)calculate_inverse_pair(target_column[, ...])calculate_log_mse(target_column[, ...])calculate_mean(mask_column, target_column, ...)calculate_neg_rank_ratio([label_column])calculate_portfolio_concentration(...)calculate_proportion(mask_column, ...)calculate_standard_deviation(mask_column, ...)calculate_tau(target_column, groupby[, ...])calculate_top_coverage(mask_column, ...)calculate_woauc(groupby, target_column[, ...])calculate_wuauc(mask_column, target_column, ...)clip_max(left, right)Clips the values in the right array or scalar to a maximum value specified by left.
clip_min(left, right)Clips the values in the right array or scalar to a minimum value specified by left.
get_overall_score(weights_for_equation)Calculates and assigns an overall score to each entry in the dataframe based on the provided weights for the PCA equation.
initialize_local_dict(weights_for_equation, ...)Initializes a dictionary that can be used for additional calculations.
rerank_with_side_information()Reranks the rows in the DataFrame based on side information.
- get_overall_score(weights_for_equation: List[float]) None[source]
Calculates and assigns an overall score to each entry in the dataframe based on the provided weights for the PCA equation.
This method updates the internal dataframe df with a new column overall_score that contains the calculated scores for each entry.
- Parameters:
weights_for_equation (List[float]) – A list of weights for calculating the overall PCA score.