Spaces:
Running
Running
Commit
·
df00cec
1
Parent(s):
dae957b
fix: feature ordering
Browse files
core-model-prediction/hypothesis.py
CHANGED
@@ -62,7 +62,15 @@ class BaseModelHypothesis:
|
|
62 |
not_normalized_features = self.calculate_not_normalized_features(text)
|
63 |
all_features = normalized_text_length_features + not_normalized_features
|
64 |
features_df = pd.DataFrame(
|
65 |
-
[all_features], columns=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
# Scaling features
|
68 |
features_df[self.features_normalized_text_length] = self.scaler_normalized_text_length.transform(
|
|
|
62 |
not_normalized_features = self.calculate_not_normalized_features(text)
|
63 |
all_features = normalized_text_length_features + not_normalized_features
|
64 |
features_df = pd.DataFrame(
|
65 |
+
[all_features], columns=[
|
66 |
+
"nn_ratio", "nns_ratio", "jj_ratio", "in_ratio", "dt_ratio", "vb_ratio", "prp_ratio", "rb_ratio",
|
67 |
+
"negative_emotion_proportions", "positive_emotion_proportions", "fear_emotion_proportions",
|
68 |
+
"anger_emotion_proportions", "trust_emotion_proportions", "sadness_emotion_proportions",
|
69 |
+
"disgust_emotion_proportions", "anticipation_emotion_proportions", "joy_emotion_proportions",
|
70 |
+
"surprise_emotion_proportions", "unique_words_ratio",
|
71 |
+
"compound_score", "gunning_fog", "smog_index", "dale_chall_score",
|
72 |
+
"perplexity", "burstiness"
|
73 |
+
])
|
74 |
|
75 |
# Scaling features
|
76 |
features_df[self.features_normalized_text_length] = self.scaler_normalized_text_length.transform(
|