Skip to content

Instantly share code, notes, and snippets.

View jmharkins's full-sized avatar

Johannes Harkins jmharkins

View GitHub Profile
@nkt1546789
nkt1546789 / puwrapper.py
Last active April 12, 2019 20:16
A wrapper class for PU classification on Python (proposed by Elkan and Noto, 2008).
import numpy as np
from numpy import random
from sklearn import base
class PUWrapper(object):
def __init__(self,trad_clf,n_fold=5):
self._trad_clf=trad_clf
self._n_fold=n_fold
def fit(self,X,s):