from uncoverml import predict, geoio from uncoverml import features as feat from uncoverml import targets as targ from uncoverml.learn import all_modelmaps as modelmaps from uncoverml.optimise.models import transformed_modelmaps _logger = logging.getLogger(__name__) MINPROB = 1e-5 # Numerical guard for log-loss evaluation regression_metrics = { 'r2_score': lambda y, py, vy, y_t, py_t, vy_t: r2_score(y, py), 'expvar': lambda y, py, vy, y_t, py_t, vy_t: explained_variance_score(y, py), 'smse': lambda y, py, vy, y_t, py_t, vy_t: smse(y, py), 'lins_ccc': lambda y, py, vy, y_t, py_t, vy_t: lins_ccc(y, py), 'mll': lambda y, py, vy, y_t, py_t, vy_t: mll(y, py, vy) } transformed_regression_metrics = { 'r2_score_transformed': lambda y, py, vy, y_t, py_t, vy_t: r2_score(y_t, py_t), 'expvar_transformed': lambda y, py, vy, y_t, py_t, vy_t: explained_variance_score(y_t, py_t), 'smse_transformed': lambda y, py, vy, y_t, py_t, vy_t: smse(y_t, py_t), 'lins_ccc_transformed': lambda y, py, vy, y_t, py_t, vy_t: lins_ccc(y_t, py_t), 'mll_transformed': lambda y, py, vy, y_t, py_t, vy_t: mll(y_t, py_t, vy_t) } def _binarizer(y, p, func, **kwargs): yb = np.zeros_like(p) n = len(y)
from uncoverml import predict, geoio from uncoverml import features as feat from uncoverml import targets as targ from uncoverml.learn import all_modelmaps as modelmaps from uncoverml.optimise.models import transformed_modelmaps log = logging.getLogger(__name__) MINPROB = 1e-5 # Numerical guard for log-loss evaluation regression_metrics = { 'r2_score': lambda y, py, vy, y_t, py_t, vy_t: r2_score(y, py), 'expvar': lambda y, py, vy, y_t, py_t, vy_t: explained_variance_score(y, py), 'smse': lambda y, py, vy, y_t, py_t, vy_t: smse(y, py), 'lins_ccc': lambda y, py, vy, y_t, py_t, vy_t: lins_ccc(y, py), 'mll': lambda y, py, vy, y_t, py_t, vy_t: mll(y, py, vy) } transformed_regression_metrics = { 'r2_score_transformed': lambda y, py, vy, y_t, py_t, vy_t: r2_score(y_t, py_t), 'expvar_transformed': lambda y, py, vy, y_t, py_t, vy_t: explained_variance_score(y_t, py_t), 'smse_transformed': lambda y, py, vy, y_t, py_t, vy_t: smse(y_t, py_t), 'lins_ccc_transformed': lambda y, py, vy, y_t, py_t, vy_t: lins_ccc(y_t, py_t), 'mll_transformed': lambda y, py, vy, y_t, py_t, vy_t: mll(y_t, py_t, vy_t) }