هو اختبار Cramér's V بستخدم الدله max والا min عشان احصل علي قيمه k ؟
دي الكود
# Create a contingency table using the specified columns from the dataset ('data1' and 'data2').
contingency_table = pd.crosstab(data_train[data1], data_train[data2])# Perform the Chi-squared test using the contingency table.
chi2_stat, p_value, dof, expected = chi2_contingency(contingency_table)# Calculate Cramér's V
n = np.sum(contingency_table)# Total number of observationsprint(n)
k = min(contingency_table.shape)# Use the largest dimension of the table to calculate Cramér's V
v = np.sqrt(chi2_stat /(n *(k -1)))
السؤال
Ali Ahmed55
السلام عليكم
هو اختبار Cramér's V بستخدم الدله max والا min عشان احصل علي قيمه k ؟
دي الكود
3 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.