# Path: hep_ml/toymc.py
# def _count_probabilities(primary_weights, secondary_weights, knn):
# def generate_toymc(data, size, knn=4, power=2.0,
#                    reweighting_iterations=5, sample_weight=None, random_state=numpy.random):
# def prepare_toymc(group, clustering_features, stayed_features, size_factor):
# def generate_toymc_with_special_features(data, size, knn=4, clustering_features=None, ipc_profile=None):
# def compare_toymc(data, clustering_features=None):
#     def print_title(title):


import numpy
import pandas
from matplotlib.cbook import Null
from hep_ml import toymc
from __future__ import division, print_function, absolute_import


__author__ = 'Alex Rogozhnikov'


def test_toy_monte_carlo(size=1000):
    df = pandas.DataFrame(numpy.random.random((size, 40)))
    res = toymc.generate_toymc_with_special_features(df, 5000)
    assert isinstance(res, pandas.DataFrame), "something wrong with MonteCarlo"
    print("toymc is ok")


def test_compare_toymc():
    if __name__ != '__main__':

# Path: hep_ml/toymc.py
# def _count_probabilities(primary_weights, secondary_weights, knn):
# def generate_toymc(data, size, knn=4, power=2.0,
#                    reweighting_iterations=5, sample_weight=None, random_state=numpy.random):
# def prepare_toymc(group, clustering_features, stayed_features, size_factor):
# def generate_toymc_with_special_features(data, size, knn=4, clustering_features=None, ipc_profile=None):
# def compare_toymc(data, clustering_features=None):
#     def print_title(title):


# Path: tests/test_toymc.py
import numpy
import pandas
from matplotlib.cbook import Null
from hep_ml import toymc

from __future__ import division, print_function, absolute_import


__author__ = 'Alex Rogozhnikov'


def test_toy_monte_carlo(size=1000):
    df = pandas.DataFrame(numpy.random.random((size, 40)))
    res = toymc.generate_toymc_with_special_features(df, 5000)
    assert isinstance(res, pandas.DataFrame), "something wrong with MonteCarlo"
    print("toymc is ok")


def test_compare_toymc():
    if __name__ != '__main__':

        toymc.pylab = Null()