# Path: discomll/dataset.py
# class Data:
#     def __init__(self, data_tag, X_indices, **kwargs):
#     def generate_urls(self, first_url, last_url):
# 
# Path: discomll/classification/naivebayes.py
# def simple_init(interface, params):
# def map_fit(interface, state, label, inp):
# def reduce_fit(interface, state, label, inp):
# def map_predict(interface, state, label, inp):
# def fit(dataset, save_results=True, show=False):
# def predict(dataset, fitmodel_url, m=1, save_results=True, show=False):


from discomll import dataset
from discomll.classification import naivebayes

train = dataset.Data(data_tag=["http://ropot.ijs.si/data/segmentation/train/xaaaaa.gz",
                               "http://ropot.ijs.si/data/segmentation/train/xaaabj.gz"],
                     data_type="gzip",
                     generate_urls=True,
                     X_indices=range(2, 21),
                     id_index=0,
                     y_index=1,
                     X_meta=["c" for i in range(2, 21)],
                     delimiter=",")

test = dataset.Data(data_tag=["http://ropot.ijs.si/data/segmentation/test/xaaaaa.gz",
                              "http://ropot.ijs.si/data/segmentation/test/xaaabj.gz"],
                    data_type="gzip",
                    generate_urls=True,
                    X_indices=range(2, 21),
                    id_index=0,
                    y_index=1,
                    X_meta=["c" for i in range(2, 21)],
                    delimiter=",")

fit_model = naivebayes.fit(train)

# Path: discomll/dataset.py
# class Data:
#     def __init__(self, data_tag, X_indices, **kwargs):
#     def generate_urls(self, first_url, last_url):
# 
# Path: discomll/classification/naivebayes.py
# def simple_init(interface, params):
# def map_fit(interface, state, label, inp):
# def reduce_fit(interface, state, label, inp):
# def map_predict(interface, state, label, inp):
# def fit(dataset, save_results=True, show=False):
# def predict(dataset, fitmodel_url, m=1, save_results=True, show=False):


# Path: discomll/examples/big_data/nb_segmentation.py
from discomll import dataset
from discomll.classification import naivebayes


train = dataset.Data(data_tag=["http://ropot.ijs.si/data/segmentation/train/xaaaaa.gz",
                               "http://ropot.ijs.si/data/segmentation/train/xaaabj.gz"],
                     data_type="gzip",
                     generate_urls=True,
                     X_indices=range(2, 21),
                     id_index=0,
                     y_index=1,
                     X_meta=["c" for i in range(2, 21)],
                     delimiter=",")

test = dataset.Data(data_tag=["http://ropot.ijs.si/data/segmentation/test/xaaaaa.gz",
                              "http://ropot.ijs.si/data/segmentation/test/xaaabj.gz"],
                    data_type="gzip",
                    generate_urls=True,
                    X_indices=range(2, 21),
                    id_index=0,
                    y_index=1,
                    X_meta=["c" for i in range(2, 21)],
                    delimiter=",")

fit_model = naivebayes.fit(train)

predictions = naivebayes.predict(test, fit_model)