# 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/linear_svm.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, nu=0.1, save_results=True, show=False):
# def predict(dataset, fitmodel_url, save_results=True, show=False):


from discomll import dataset
from discomll.classification import linear_svm

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

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

fit_model = linear_svm.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/linear_svm.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, nu=0.1, save_results=True, show=False):
# def predict(dataset, fitmodel_url, save_results=True, show=False):


# Path: discomll/examples/big_data/svm_ionosphere.py
from discomll import dataset
from discomll.classification import linear_svm


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

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

fit_model = linear_svm.fit(train)

predictions = linear_svm.predict(test, fit_model)