Skip to content

Commit 303272f

Browse files
committedJul 25, 2021
update of changes files with extra new features
1 parent 078434c commit 303272f

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed
 

‎CHANGES.rst

+27-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,34 @@ Other
4242
The default value is -1, in which case all available cores are used. When using ``njobs=1`` no parallel processing
4343
is applied.
4444

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:
4746

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.
4873

4974

5075

0 commit comments

Comments
 (0)
Please sign in to comment.