"""
Lift Curve Widget
-----------------

"""
from collections import namedtuple

import numpy
import sklearn.metrics as skl_metrics

from PyQt4 import QtGui
from PyQt4.QtGui import QColor, QPen
from PyQt4.QtCore import Qt

import pyqtgraph as pg

import Orange
from Orange.widgets import widget, gui, settings
from Orange.widgets.utils import colorpalette, colorbrewer
from Orange.widgets.evaluate.owrocanalysis import convex_hull
from Orange.widgets.io import FileFormat
from Orange.canvas import report


CurvePoints = namedtuple(
    "CurvePoints",
    ["cases", "tpr", "thresholds"]
)
CurvePoints.is_valid = property(lambda self: self.cases.size > 0)

LiftCurve = namedtuple(