diff --git a/docs/_static/fig/statlab_kappa_fig1.svg b/docs/_static/fig/statlab_kappa_fig1.svg index 92c3f50c..dd6ca44c 100644 --- a/docs/_static/fig/statlab_kappa_fig1.svg +++ b/docs/_static/fig/statlab_kappa_fig1.svg @@ -6,7 +6,7 @@ - 2024-07-07T14:34:23.813054 + 2024-07-07T15:13:54.805789 image/svg+xml @@ -38,116 +38,116 @@ z " style="fill: #ffffff"/> - - - - - - - - - + + + + + + + + + - - + @@ -240,7 +240,7 @@ z - + @@ -384,7 +384,7 @@ z - + @@ -503,12 +503,12 @@ z - - + @@ -525,7 +525,7 @@ L -3.5 0 - + @@ -543,7 +543,7 @@ L -3.5 0 - + @@ -616,93 +616,98 @@ L 450 10.8 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + - - + + - - - - - - + + + + - - + + - - - + - - - + + + + @@ -713,64 +718,81 @@ z - - + + - - - + - + + + + - + - - - - + + + - + - + - + diff --git a/docs/_static/fig/statlab_kappa_fig2.svg b/docs/_static/fig/statlab_kappa_fig2.svg index 78d74c43..0c12d644 100644 --- a/docs/_static/fig/statlab_kappa_fig2.svg +++ b/docs/_static/fig/statlab_kappa_fig2.svg @@ -6,7 +6,7 @@ - 2024-07-07T14:34:23.919856 + 2024-07-07T15:13:54.914232 image/svg+xml @@ -38,116 +38,116 @@ z " style="fill: #ffffff"/> - - + - + - + - + - + - + - + - + +" clip-path="url(#p2f0b85a869)" style="fill: #1f77b4; stroke: #ffffff; stroke-width: 2.576696"/> - - + @@ -240,7 +240,7 @@ z - + @@ -384,7 +384,7 @@ z - + @@ -503,12 +503,12 @@ z - - + @@ -525,7 +525,7 @@ L -3.5 0 - + @@ -543,7 +543,7 @@ L -3.5 0 - + @@ -606,93 +606,98 @@ L 275.5425 318.04 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + - - + + - - - - - - + + + + - - + + - - - + - - - + + + + @@ -703,58 +708,75 @@ z - - + + - - - + - + + + + - + - - - - + + + - + - + @@ -770,70 +792,70 @@ z +" clip-path="url(#pcc2d052677)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#pcc2d052677)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#pcc2d052677)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pcc2d052677)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pcc2d052677)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pcc2d052677)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - + - + - + @@ -842,7 +864,7 @@ z - + @@ -878,12 +900,12 @@ z - + - + @@ -912,57 +934,57 @@ z +" clip-path="url(#pe12a722c65)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#pe12a722c65)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#pe12a722c65)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pe12a722c65)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pe12a722c65)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pe12a722c65)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - + @@ -975,12 +997,12 @@ z - + - + @@ -991,21 +1013,21 @@ z - + - + - + @@ -1023,13 +1045,13 @@ L 349.2 318.04 - + - + - + diff --git a/docs/_static/fig/statlab_kappa_fig3.svg b/docs/_static/fig/statlab_kappa_fig3.svg index 299a0da8..9834c0bb 100644 --- a/docs/_static/fig/statlab_kappa_fig3.svg +++ b/docs/_static/fig/statlab_kappa_fig3.svg @@ -6,7 +6,7 @@ - 2024-07-07T14:34:24.045860 + 2024-07-07T15:13:55.027913 image/svg+xml @@ -38,116 +38,116 @@ z " style="fill: #ffffff"/> - - + - + - + - + - + - + - + - + +" clip-path="url(#p4ad2bfe0fb)" style="fill: #1f77b4; stroke: #ffffff; stroke-width: 2.576696"/> - - + @@ -240,7 +240,7 @@ z - + @@ -384,7 +384,7 @@ z - + @@ -503,12 +503,12 @@ z - - + @@ -525,7 +525,7 @@ L -3.5 0 - + @@ -543,7 +543,7 @@ L -3.5 0 - + @@ -606,93 +606,98 @@ L 275.5425 318.04 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + - - + + - - - - - - + + + + - - + + - - - + - - - + + + + @@ -703,58 +708,75 @@ z - - + + - - - + - + + + + - + - - - - + + + - + - + @@ -770,70 +792,70 @@ z +" clip-path="url(#pa6e23b6270)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#pa6e23b6270)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#pa6e23b6270)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pa6e23b6270)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pa6e23b6270)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#pa6e23b6270)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - + - + - + @@ -842,7 +864,7 @@ z - + @@ -878,12 +900,12 @@ z - + - + @@ -912,57 +934,57 @@ z +" clip-path="url(#p6e2efc8552)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#p6e2efc8552)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> +" clip-path="url(#p6e2efc8552)" style="fill: #ff7f0e; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#p6e2efc8552)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#p6e2efc8552)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - +" clip-path="url(#p6e2efc8552)" style="fill: #1f77b4; fill-opacity: 0.75; stroke: #000000; stroke-linejoin: miter"/> - + @@ -975,12 +997,12 @@ z - + - + @@ -991,21 +1013,21 @@ z - + - + - + @@ -1023,13 +1045,13 @@ L 349.2 318.04 - + - + - + diff --git a/docs/statlab_kappa.rst b/docs/statlab_kappa.rst index eeb2d01a..9ba770f4 100644 --- a/docs/statlab_kappa.rst +++ b/docs/statlab_kappa.rst @@ -410,7 +410,7 @@ Output: .. testoutput:: - Cohen's kappa (mtbp3.statlab): -0.07283167119975827 + Cohen's kappa (mtbp3.statlab): 0.06864954183566166 Number of raters per sample: 2.0 Number of rating categories: 3 Number of sample: 100 diff --git a/mtbp3/statlab/kappa.py b/mtbp3/statlab/kappa.py index 371b7b61..0a771640 100644 --- a/mtbp3/statlab/kappa.py +++ b/mtbp3/statlab/kappa.py @@ -288,13 +288,13 @@ def create_bubble_plot(self, out_path="", axis_label=[], max_size_ratio=0, hist= data=df0, x="r1", y="r2", kind="scatter", height=5, ratio=3, marginal_ticks=True, marginal_kws={"hue": df0['agree'], "multiple": "stack", "weights": sizes, "shrink":.5, "legend": False}, - joint_kws={"hue": df0['agree'], "size": sizes, "legend": False, "sizes":(min(sizes), max(sizes)*max_size_ratio)} + joint_kws={"hue": df0['agree'], "size": sizes, "legend": False, "sizes":(min(sizes)*max_size_ratio, max(sizes)*max_size_ratio)} ) if reverse_y: tmp1 = plt.ylim() plt.ylim(tmp1[1], tmp1[0]) else: - sns.scatterplot(data=df0, x="r1", y="r2", size="sizes", sizes=(min(sizes), max(sizes)*max_size_ratio), legend=False) + sns.scatterplot(data=df0, x="r1", y="r2", size="sizes", sizes=(min(sizes)*max_size_ratio, max(sizes)*max_size_ratio), legend=False) tmp1 = plt.xlim() tmp1d = ((tmp1[1] - tmp1[0])/n_categories) plt.xlim(tmp1[0] - tmp1d, tmp1[1] + tmp1d)