Extract factors from financial reports loop finished. (#90)

- Extract factors from financial reports loop finished.

- Fix some small bugs.
This commit is contained in:
WinstonLiyt
2024-07-20 12:31:40 +08:00
committed by GitHub
parent 8c600f42ae
commit c17244a317
10 changed files with 357 additions and 19 deletions
@@ -334,6 +334,13 @@ class FactorValueEvaluator(FactorEvaluator):
) -> Tuple:
conclusions = []
# Initialize result variables
single_column_result = None
same_index_result = None
output_format_result = None
equal_value_ratio_result = 0
high_correlation_result = False
# Check if both dataframe has only one columns
feedback_str, _ = FactorSingleColumnEvaluator(self.scen).evaluate(implementation, gt_implementation)
conclusions.append(feedback_str)
@@ -373,9 +380,6 @@ class FactorValueEvaluator(FactorEvaluator):
high_correlation_result = False
feedback_str = "The source dataframe and the ground truth dataframe have different index. Give up comparing the values and correlation because it's useless"
conclusions.append(feedback_str)
else:
equal_value_ratio_result = 0
high_correlation_result = False
# Combine all conclusions into a single string
conclusion_str = "\n".join(conclusions)