Spaces:
Sleeping
Sleeping
Commit
·
adb3a9b
1
Parent(s):
2673c60
Denote when target is not in any HDI
Browse files
app.py
CHANGED
@@ -150,18 +150,26 @@ class ComparisonPlotter(DataPlotter):
|
|
150 |
ax.set_xlabel('logit$^{-1}$(\u03B1$_{1}$ - \u03B1$_{2}$)')
|
151 |
|
152 |
self.pr(ax, hdi, c_hdi)
|
|
|
|
|
|
|
153 |
try:
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
def pr(self, ax, hdi, color):
|
167 |
x = self.df.median()
|
|
|
150 |
ax.set_xlabel('logit$^{-1}$(\u03B1$_{1}$ - \u03B1$_{2}$)')
|
151 |
|
152 |
self.pr(ax, hdi, c_hdi)
|
153 |
+
self.min_inclusive(ax)
|
154 |
+
|
155 |
+
def min_inclusive(self, ax):
|
156 |
try:
|
157 |
+
ci = self.interval.at(self._uncertain)
|
158 |
+
inclusive = '\u2208'
|
159 |
+
except OverflowError:
|
160 |
+
ci = 1
|
161 |
+
inclusive = '\u2209'
|
162 |
+
except FloatingPointError:
|
163 |
+
return
|
164 |
+
|
165 |
+
ax.text(x=0.02,
|
166 |
+
y=0.975,
|
167 |
+
s=f'{self._uncertain} {inclusive} {ci:.0%} HDI',
|
168 |
+
fontsize='small',
|
169 |
+
fontstyle='italic',
|
170 |
+
horizontalalignment='left',
|
171 |
+
verticalalignment='top',
|
172 |
+
transform=ax.transAxes)
|
173 |
|
174 |
def pr(self, ax, hdi, color):
|
175 |
x = self.df.median()
|