# Path: veidt/metrics.py
# def get(identifier):
#     if isinstance(identifier, dict):
#         config = {'class_name': identifier['class_name'], 'config': identifier['config']}
#         return deserialize(config)
#     elif isinstance(identifier, str):
#         return deserialize(identifier)
#     elif callable(identifier):
#         return identifier
#     else:
#         raise ValueError('Could not interpret '
#                          'metric function identifier:', identifier)


import abc
import pandas as pd
import numpy as np
from monty.json import MSONable
from sklearn.base import TransformerMixin, BaseEstimator
from veidt.metrics import get
        """

        :param features: Numerical input feature list or numpy array with dim (m, n)
            where m is the number of data and n is the feature dimension
        :param targets: Numerical output target list, or numpy array with dim (m, )
        """
        pass

    @abc.abstractmethod
    def predict(self, features):
        """
        Predict the values given a set of inputs based on fitted model.

        :param features: List of input features

        :return: List of output objects
        """
        pass

    def evaluate(self, features, targets, metrics=['mae'], multi_targets=False):
        """
        evaluate the performance of model based on metric.
        :return: dict of metric evaluations
        """
        pred_targets = self.predict(features)
        evaluation = {}
        if not multi_targets:
            targets = [targets]
            pred_targets = [pred_targets]
        for metric in metrics:

# Path: veidt/metrics.py
# def get(identifier):
#     if isinstance(identifier, dict):
#         config = {'class_name': identifier['class_name'], 'config': identifier['config']}
#         return deserialize(config)
#     elif isinstance(identifier, str):
#         return deserialize(identifier)
#     elif callable(identifier):
#         return identifier
#     else:
#         raise ValueError('Could not interpret '
#                          'metric function identifier:', identifier)


# Path: veidt/abstract.py
import abc
import pandas as pd
import numpy as np
from monty.json import MSONable
from sklearn.base import TransformerMixin, BaseEstimator
from veidt.metrics import get

        """

        :param features: Numerical input feature list or numpy array with dim (m, n)
            where m is the number of data and n is the feature dimension
        :param targets: Numerical output target list, or numpy array with dim (m, )
        """
        pass

    @abc.abstractmethod
    def predict(self, features):
        """
        Predict the values given a set of inputs based on fitted model.

        :param features: List of input features

        :return: List of output objects
        """
        pass

    def evaluate(self, features, targets, metrics=['mae'], multi_targets=False):
        """
        evaluate the performance of model based on metric.
        :return: dict of metric evaluations
        """
        pred_targets = self.predict(features)
        evaluation = {}
        if not multi_targets:
            targets = [targets]
            pred_targets = [pred_targets]
        for metric in metrics:

            veidt_metric = get(metric)