diff --git a/docs/source/conf.py b/docs/source/conf.py index 04e6399bbf16703d61cf075383a6ade85bbd8b3b..5e255ad990f0ffa72ed67c48ca82ac8d848e8888 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -63,7 +63,7 @@ exclude_patterns = ['_build', '**.ipynb_checkpoints'] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'groundwork' +html_theme = 'nature' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/multiview_generator/multiple_sub_problems.py b/multiview_generator/multiple_sub_problems.py index 41c6639e678fd249acc883b9aefc2ad1b2c328e1..895d24a5baab3ef9d5bfc17cbfe4cafd44f5e362 100644 --- a/multiview_generator/multiple_sub_problems.py +++ b/multiview_generator/multiple_sub_problems.py @@ -2,15 +2,16 @@ import os import h5py import numpy as np +import yaml from sklearn.datasets import make_classification, make_gaussian_quantiles from tabulate import tabulate import pandas as pd import inspect from datetime import datetime -from multiview_generator.utils import format_array, get_config_from_file, \ +from .utils import format_array, get_config_from_file, \ init_random_state, init_error_matrix, init_list -from multiview_generator.base_strs import * +from .base_strs import * class MultiViewSubProblemsGenerator: @@ -217,13 +218,12 @@ class MultiViewSubProblemsGenerator: def gen_view_report(self, view_index): view_string = "\n\n### View "+str(view_index+1) - view_string+="\n\nThis view is generated with {}, with the following configuration : \n```yaml\n".format(self._get_generator(view_index)) - import yaml + view_string+="\n\nThis view is generated with {}, with the following configuration : \n```yaml\n".format(self._get_generator_report(view_index)) view_string += yaml.dump(self.sub_problem_configurations[view_index], line_break="\n",default_flow_style=False) view_string+="```" return view_string - def _get_generator(self, view_index, doc_type=".md"): + def _get_generator_report(self, view_index, doc_type=".md"): if self.sub_problem_types[view_index] in ["make_classification", "base"]: return "[`make_classification`](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_classification.html)" elif self.sub_problem_types[view_index]in ["gaussian", "make_gaussian_quantiles"]: diff --git a/multiview_generator/tests/test_multiple_sub_problems.py b/multiview_generator/tests/test_multiple_sub_problems.py index 5230a75a38d76e148dbaba11cca3e7912876c279..71e00c8218c024ec94cb172b25b7edd1f4ddf3dd 100644 --- a/multiview_generator/tests/test_multiple_sub_problems.py +++ b/multiview_generator/tests/test_multiple_sub_problems.py @@ -1,26 +1,19 @@ import unittest import numpy as np -from ..multiple_sub_problems import MultiViewSubProblemsGenerator +from multiview_generator.multiple_sub_problems import MultiViewSubProblemsGenerator -class Test_MultiVieSubProblemsGenerator(): +class Test_MultiViewSubProblemsGenerator(unittest.TestCase): - def __init__(self): - self.conf = np.array([ - np.array([0.0, 0.1, 0.1, 0.9]), - np.array([0.0, 0.2, 0.1, 0.0]), - np.array([0.0, 0.3, 0.1, 0.0]), - np.array([0.0, 0.4, 0.2, 0.0]), - np.array([0.0, 0.5, 0.2, 0.0]), - np.array([0.0, 0.6, 0.2, 0.0]), - np.array([0.0, 0.7, 0.2, 0.0]), - np.array([0.0, 0.8, 0.1, 0.]), - ]) - self.n_views = 4 - self.n_folds = 10 - self.n_classes = 8 - self.n_samples = 2000 - self.class_sep = 1.5 - self.class_weights = [0.125, 0.1, 0.15, 0.125, 0.01, 0.2, 0.125, 0.125, ] + @classmethod + def setUpClass(cls): + pass + + @classmethod + def tearDownClass(cls): + pass + + def test_simple(self): + gene = MultiViewSubProblemsGenerator() diff --git a/setup.py b/setup.py index 64ee3e3a9129bf885f1d040a0c24c349e59eb69e..802799b1959573ecd39dcc478b6839d923e14592 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ def setup_package(): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as readme: long_description = readme.read() - group = 'baptiste.bauvin' + group = 'dev' url = 'https://gitlab.lis-lab.fr/{}/{}'.format(group, name) project_urls = { 'Documentation': 'http://{}.pages.lis-lab.fr/{}'.format(group, name),