scipy-yli/yli/__init__.py

43 lines
1.9 KiB
Python
Raw Permalink Normal View History

2022-10-05 20:08:04 +11:00
# scipy-yli: Helpful SciPy utilities and recipes
2023-02-25 17:15:22 +11:00
# Copyright © 2022–2023 Lee Yingtong Li (RunasSudo)
2022-10-05 20:08:04 +11:00
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
2022-10-14 20:08:01 +11:00
from .bayes_factors import bayesfactor_afbf
2022-10-15 23:11:22 +11:00
from .config import config
2022-12-03 22:23:29 +11:00
from .descriptives import auto_correlations, auto_descriptives
2022-10-11 22:52:42 +11:00
from .distributions import beta_oddsratio, beta_ratio, hdi, transformed_dist
2023-07-16 16:17:45 +10:00
from .graphs import init_fonts, HorizontalEffectPlot
2022-10-15 14:07:54 +11:00
from .io import pickle_read_compressed, pickle_read_encrypted, pickle_write_compressed, pickle_write_encrypted
2023-07-17 01:34:34 +10:00
from .regress import Cox, GLM, IntervalCensoredCox, Logit, OLS, OrdinalLogit, PenalisedLogit, Poisson, TimeVaryingCox, regress, vif
2023-04-20 15:41:03 +10:00
from .sig_tests import anova_oneway, auto_univariable, chi2, mannwhitney, pearsonr, spearman, ttest_ind, ttest_ind_multiple
2023-04-16 21:56:09 +10:00
from .survival import kaplanmeier, logrank, turnbull
from .utils import as_ordinal
2022-10-05 20:08:04 +11:00
def reload_me():
import importlib
import sys
2022-12-03 02:02:34 +11:00
for _ in range(2): # Do it twice to make sure imports are also reloaded fully
for k, v in list(sys.modules.items()):
if k == 'yli' or k.startswith('yli.'):
try:
importlib.reload(v)
except ModuleNotFoundError as ex:
2022-12-03 22:23:29 +11:00
if ex.name == k:
2022-12-03 02:02:34 +11:00
# Must be due to a module which we deleted - can safely ignore
pass
else:
raise ex