Style fixups

This commit is contained in:
RunasSudo 2022-10-14 20:08:01 +11:00
parent 255ad100fd
commit a753761675
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
4 changed files with 5 additions and 11 deletions

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from .bayes_factors import BayesFactor, bayesfactor_afbf
from .bayes_factors import bayesfactor_afbf
from .distributions import beta_oddsratio, beta_ratio, hdi, transformed_dist
from .fs import pickle_read_compressed, pickle_read_encrypted, pickle_write_compressed, pickle_write_encrypted
from .regress import PenalisedLogit, regress, vif

View File

@ -15,9 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class BayesFactor:
"""
A Bayes factor
"""
"""A Bayes factor"""
def __init__(self, factor, num_symbol, num_desc, denom_symbol, denom_desc):
self.factor = factor

View File

@ -284,9 +284,7 @@ transformed_dist = transformed_gen(name='transformed')
ConfidenceInterval = collections.namedtuple('ConfidenceInterval', ['lower', 'upper'])
def hdi(distribution, level=0.95):
"""
Get the highest density interval for the distribution, e.g. for a Bayesian posterior, the highest posterior density interval (HPD/HDI)
"""
"""Get the highest density interval for the distribution, e.g. for a Bayesian posterior, the highest posterior density interval (HPD/HDI)"""
# For a given lower limit, we can compute the corresponding 95% interval
def interval_width(lower):

View File

@ -188,9 +188,7 @@ class PearsonChiSquaredResult:
self.ct, self.dof, self.statistic, fmt_p(self.pvalue, html=False))
def chi2(df, dep, ind, *, nan_policy='warn'):
"""
Perform a Pearson chi-squared test
"""
"""Perform a Pearson chi-squared test"""
# Check for/clean NaNs
df = check_nan(df[[ind, dep]], nan_policy)