Skip to content

economy/multi_evaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi Evaluation Tool

Example usage:

import numpy as np

from evaluate.metrics import r2, sensitivity, specificity
from evaluate.schemas.evaluators import Truth
from evaluate.schemas.metrics import EvaluationMetric
from evaluate import Evaluator


def custom_comp(y_pred: np.array, y_true: np.array) -> np.float64:
    return y_pred.mean() - y_true.mean()

my_custom_metric = EvaluationMetric(
    name = "my custom metric",
    model_fn = custom_comp,
    allowed_models = ["classifier"]
)

evaluator = Evaluator(
    full_df = df,
    test_df = Xte,
    truths = [Truth(name='test_actuals', y_true=yte)],
    estimator = sklearn_model,
    evaluation_metrics = [r2, sensitivity, specificity, my_custom_metric],
    slices = ['country']
)

evaluator.evaluate()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages