<filename>src/techniques/evaluations.py
#!/usr/bin/env python
#coding=utf-8

"""
evaluations.py: evaluate the models using both confusion matrix and
                performance metrics.
"""

__author__      = "<NAME>"
__maintainer__  = "<NAME>"
__email__       = "<EMAIL>"
__license__     = "MIT"
__version__     = "1.0.0"
__status__      = "Development"
__copyright__   = "Copyright 2019, Instituto Superior Técnico (IST)"
__credits__     = [
  "<NAME>",
  "<NAME>",
  "<NAME>",
  "<NAME>",
  "<NAME>"
]

import os
import sys
import logging

from os import path

# The current folder path.
basePath = os.path.dirname(__file__)

# The path to the repository "src" folder.
joinRepoSrcPath = os.path.join(basePath, '..')
pathRepoSrcAbsPath = os.path.abspath(joinRepoSrcPath)
# Add the directory containing the module to
# the Python path (wants absolute paths).
sys.path.append(pathRepoSrcAbsPath)

# Appending methods path
methodsPath = os.path.join(joinRepoSrcPath, 'methods')
methodsAbsPath = os.path.abspath(methodsPath)
sys.path.append(methodsAbsPath)
sys.path.insert(0, methodsAbsPath)

# Importing available methods
from classifiers import *

def evalModelSpecific(df_real, df_pred):
	ccm = classConfusionMatrix(df_real, df_pred)
	cr = classReport(df_real, df_pred)
	return cr, ccm

# ==================== END File ==================== #
<filename>src/techniques/evaluations.py
#!/usr/bin/env python
#coding=utf-8

"""
evaluations.py: evaluate the models using both confusion matrix and
                performance metrics.
"""

__author__      = "<NAME>"
__maintainer__  = "<NAME>"
__email__       = "<EMAIL>"
__license__     = "MIT"
__version__     = "1.0.0"
__status__      = "Development"
__copyright__   = "Copyright 2019, Instituto Superior Técnico (IST)"
__credits__     = [
  "<NAME>",
  "<NAME>",
  "<NAME>",
  "<NAME>",
  "<NAME>"
]

import os
import sys
import logging

from os import path

# The current folder path.
basePath = os.path.dirname(__file__)

# The path to the repository "src" folder.
joinRepoSrcPath = os.path.join(basePath, '..')
pathRepoSrcAbsPath = os.path.abspath(joinRepoSrcPath)
# Add the directory containing the module to
# the Python path (wants absolute paths).
sys.path.append(pathRepoSrcAbsPath)

# Appending methods path
methodsPath = os.path.join(joinRepoSrcPath, 'methods')
methodsAbsPath = os.path.abspath(methodsPath)
sys.path.append(methodsAbsPath)
sys.path.insert(0, methodsAbsPath)

# Importing available methods
from classifiers import *

def evalModelSpecific(df_real, df_pred):
	ccm = classConfusionMatrix(df_real, df_pred)
	cr = classReport(df_real, df_pred)
	return cr, ccm

# ==================== END File ==================== #
#!/usr/bin/env python #coding=utf-8 evaluations.py: evaluate the models using both confusion matrix and                 performance metrics. # The current folder path. # The path to the repository "src" folder. # Add the directory containing the module to # the Python path (wants absolute paths). # Appending methods path # Importing available methods # ==================== END File ==================== #