File tree 1 file changed +27
-2
lines changed
1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change 42
42
The default value is -1, in which case all available cores are used. When using ``njobs=1 `` no parallel processing
43
43
is applied.
44
44
45
- * Migrated the spark example notebook from popmon to directly using histogrammar for histogram creation.
46
- * Added links in the readme of the basic and advanced tutorials on google colab.
45
+ * Phi_K can now be calculated with an independent expectation histogram:
47
46
47
+ .. code-block :: python
48
+
49
+ from phik.phik import phik_from_hist2d
50
+
51
+ cols = [" mileage" , " car_size" ]
52
+ interval_cols = [" mileage" ]
53
+
54
+ observed = df1[[" feature1" , " feature2" ]].hist2d()
55
+ expected = df2[[" feature1" , " feature2" ]].hist2d()
56
+
57
+ phik_value = phik_from_hist2d(observed = observed, expected = expected)
58
+
59
+ The expected histogram is taken to be (relatively) large in number of counts
60
+ compared with the observed histogram.
61
+
62
+ Or can compare two (pre-binned) datasets against each other directly. Again the expected dataset
63
+ is assumed to be relatively large:
64
+
65
+ .. code-block :: python
66
+
67
+ from phik.phik import phik_observed_vs_expected_from_rebinned_df
68
+
69
+ phik_matrix = phik_observed_vs_expected_from_rebinned_df(df1_binned, df2_binned)
70
+
71
+ * Added links in the readme to the basic and advanced Phi_K tutorials on google colab.
72
+ * Migrated the spark example Phi_K notebook from popmon to directly using histogrammar for histogram creation.
48
73
49
74
50
75
You can’t perform that action at this time.
0 commit comments