Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -99,7 +99,7 @@ def process_dataframe(df):
|
|
99 |
|
100 |
# Create a DataFrame from the new data
|
101 |
new_df = pd.DataFrame(new_data)
|
102 |
-
|
103 |
# Calculate I-Support by dividing I-Frequency with num_student
|
104 |
new_df['I-Support (mean)'] = new_df['I-Frequency'] / num_student
|
105 |
new_df['S-Support'] = new_df['S-Frequency'] / num_student
|
@@ -148,7 +148,7 @@ def calculate_p_value(test_type, vector_a, vector_b=None, **kwargs):
|
|
148 |
# Ansari-Bradley test for equal scale parameters
|
149 |
result = stats.ansari(vector_a, vector_b, **kwargs)
|
150 |
elif test_type == 'cramervonmises_2samp':
|
151 |
-
# Two-sample Cram�r-von Mises test for goodness of fit
|
152 |
result = stats.cramervonmises_2samp(vector_a, vector_b, **kwargs)
|
153 |
elif test_type == 'epps_singleton_2samp':
|
154 |
# Epps-Singleton (ES) test statistic
|
|
|
99 |
|
100 |
# Create a DataFrame from the new data
|
101 |
new_df = pd.DataFrame(new_data)
|
102 |
+
new_df=new_df.reset_index(name='Pattern')
|
103 |
# Calculate I-Support by dividing I-Frequency with num_student
|
104 |
new_df['I-Support (mean)'] = new_df['I-Frequency'] / num_student
|
105 |
new_df['S-Support'] = new_df['S-Frequency'] / num_student
|
|
|
148 |
# Ansari-Bradley test for equal scale parameters
|
149 |
result = stats.ansari(vector_a, vector_b, **kwargs)
|
150 |
elif test_type == 'cramervonmises_2samp':
|
151 |
+
# Two-sample Cram�r-von Mises test for goodness of fit
|
152 |
result = stats.cramervonmises_2samp(vector_a, vector_b, **kwargs)
|
153 |
elif test_type == 'epps_singleton_2samp':
|
154 |
# Epps-Singleton (ES) test statistic
|