Ejemplo n.º 1
0
"""Optimum-Path Forest standard definitions.
"""

import pickle

import numpy as np

import opfython.math.distance as d
import opfython.stream.loader as loader
import opfython.utils.exception as e
import opfython.utils.logging as l
from opfython.core import Subgraph

logger = l.get_logger(__name__)


class OPF:
    """A basic class to define all common OPF-related methods.

    References:
        J. P. Papa, A. X. Falcão and C. T. N. Suzuki.
        LibOPF: A library for the design of optimum-path forest classifiers (2015).

    """
    def __init__(self,
                 distance='log_squared_euclidean',
                 pre_computed_distance=None):
        """Initialization method.

        Args:
            distance (str): An indicator of the distance metric to be used.
Ejemplo n.º 2
0
def test_get_logger():
    logger = logging.get_logger(__name__)

    assert logger.name == 'test_logging'

    assert logger.hasHandlers() == True