# Path: oe_utils/utils/h5_utils.py
# def load(filename, load_all=True):
# def dump(data, filename, attrs=None, options=None):


import collections
import cPickle as pickle
import gflags as flags
import gzip
import logging
import numpy as np
import pandas as pd
import sys
from oe_utils.utils import h5_utils
from sklearn import cross_validation
from sklearn import ensemble
from sklearn import grid_search
from sklearn import linear_model
from sklearn import metrics
from sklearn import preprocessing
from sklearn import svm
    'kif11',
    'rxra',
    'sahh',
    'urok',
]


def load_datasets():
    datasets = []
    if FLAGS.dataset is not None:
        datasets.append(FLAGS.dataset)
    elif FLAGS.dataset_file is not None:
        with open(FLAGS.datasets) as f:
            for line in f:
                datasets.append(line.strip())
    else:
        raise ValueError('No dataset(s) specified.')
    return datasets


def load_features_and_labels(dataset):
    """Load features from ROCS overlays.

    Returns:
        features: Dict mapping feature names to numpy arrays.
        labels: Numpy array containing labels for molecules.
    """
    features = {}

    # ROCS.

# Path: oe_utils/utils/h5_utils.py
# def load(filename, load_all=True):
# def dump(data, filename, attrs=None, options=None):


# Path: paper/code/models.py
import collections
import cPickle as pickle
import gflags as flags
import gzip
import logging
import numpy as np
import pandas as pd
import sys
from oe_utils.utils import h5_utils
from sklearn import cross_validation
from sklearn import ensemble
from sklearn import grid_search
from sklearn import linear_model
from sklearn import metrics
from sklearn import preprocessing
from sklearn import svm

    'kif11',
    'rxra',
    'sahh',
    'urok',
]


def load_datasets():
    datasets = []
    if FLAGS.dataset is not None:
        datasets.append(FLAGS.dataset)
    elif FLAGS.dataset_file is not None:
        with open(FLAGS.datasets) as f:
            for line in f:
                datasets.append(line.strip())
    else:
        raise ValueError('No dataset(s) specified.')
    return datasets


def load_features_and_labels(dataset):
    """Load features from ROCS overlays.

    Returns:
        features: Dict mapping feature names to numpy arrays.
        labels: Numpy array containing labels for molecules.
    """
    features = {}

    # ROCS.

    rocs_actives = h5_utils.load(FLAGS.rocs_actives % dataset)