ppsingh commited on
Commit
70e9674
1 Parent(s): 321a7aa

action policy split

Browse files
Files changed (1) hide show
  1. utils/policyaction_classifier.py +2 -2
utils/policyaction_classifier.py CHANGED
@@ -86,13 +86,13 @@ def policyaction_classification(haystack_doc:pd.DataFrame,
86
  temp = truth_df.copy()
87
  truth_df = truth_df.astype(float) >= threshold
88
  truth_df = truth_df.astype(str)
89
- truth_df.rename(columns = {'Action':'Action Label','Policies_Plans':'Policies_Plans Label'},
90
  inplace =True)
91
  truth_df['Action Label'] = truth_df['Action Label'].apply(lambda x: 'Action' if
92
  True else 'NEGATIVE')
93
  truth_df['Policies_Plans Label'] = truth_df['Policies_Plans Label'].apply(lambda x:
94
  'Policy and Plans' if True else 'NEGATIVE')
95
- temp.rename(columns = {'Action':'Action Score','Policies_Plans':'Policies_Plans Score'},
96
  inplace=True)
97
 
98
  # categories = list(truth_df.columns)
 
86
  temp = truth_df.copy()
87
  truth_df = truth_df.astype(float) >= threshold
88
  truth_df = truth_df.astype(str)
89
+ truth_df.rename(columns = {'Action':'Action Label','Policies & Plans':'Policies_Plans Label'},
90
  inplace =True)
91
  truth_df['Action Label'] = truth_df['Action Label'].apply(lambda x: 'Action' if
92
  True else 'NEGATIVE')
93
  truth_df['Policies_Plans Label'] = truth_df['Policies_Plans Label'].apply(lambda x:
94
  'Policy and Plans' if True else 'NEGATIVE')
95
+ temp.rename(columns = {'Action':'Action Score','Policies & Plans':'Policies_Plans Score'},
96
  inplace=True)
97
 
98
  # categories = list(truth_df.columns)