Skip to content
Snippets Groups Projects
Commit a2652ea7 authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

merge

parents 9746bf18 4a2b2ceb
Branches
No related tags found
No related merge requests found
......@@ -4,7 +4,9 @@ tests:
tags:
- docker
script:
- pip3 install -e . --no-deps
- export LC_ALL=$(locale -a | grep en_US)
- export LANG=$(locale -a | grep en_US)
- pip3 install -e .
- pytest-3
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
......
......@@ -57,6 +57,7 @@ And the following python modules will be automatically installed :
* `pyyaml <https://pypi.org/project/PyYAML/>`_ - Used to read the config files,
* `plotly <https://plot.ly/>`_ - Used to generate interactive HTML visuals,
* `tabulate <https://pypi.org/project/tabulate/>`_ - Used to generated the confusion matrix.
* `pyscm-ml <https://pypi.org/project/pyscm-ml/>`_ -
Installing
......
......@@ -29,6 +29,7 @@ RUN apt-get install -y --no-install-recommends locales && \
update-locale en_US.UTF-8 && \
echo "export LC_ALL=$(locale -a | grep en_US)" >> /root/.bashrc && \
echo "export LANG=$(locale -a | grep en_US)" >> /root/.bashrc
ENV LANGUAGE'en_US:en'
COPY requirements.txt .
RUN pip3 install -r requirements.txt
......
......@@ -11,3 +11,4 @@ pyyaml>=3.12
plotly>=4.2.1
matplotlib>=3.1.1
tabulate>=0.8.6
pyscm-ml>=1.0.0
\ No newline at end of file
......@@ -129,7 +129,8 @@ def analyze_all(iter_results, stats_iter, directory, data_base_name,
publish_all_sample_errors(error_analysis, directory, stats_iter,
sample_ids, labels, data_base_name, label_names)
publish_feature_importances(feature_importances, directory,
data_base_name, feature_importances_stds)
data_base_name, feature_importances_stds,
metric_scores=metrics_analysis)
plot_durations(duration_means, directory, data_base_name, duration_stds)
return results
......
......@@ -102,6 +102,7 @@ def publish_feature_importances(feature_importances, directory, database_name,
def plot_feature_importances(file_name, feature_importance,
feature_std): # pragma: no cover
s = feature_importance.sum(axis=1)
s = s[s!=0]
feature_importance = feature_importance.loc[s.sort_values(ascending=False).index]
feature_importance.to_csv(file_name + "_dataframe.csv")
hover_text = [["-Feature :" + str(feature_name) +
......@@ -134,6 +135,8 @@ def plot_feature_relevance(file_name, feature_importance,
feature_std, metric_scores): # pragma: no cover
for metric, score_df in metric_scores.items():
if metric.endswith("*"):
if isinstance(score_df, dict):
score_df = score_df["mean"]
for score in score_df.columns:
if len(score.split("-"))>1:
algo, view = score.split("-")
......
......@@ -79,6 +79,7 @@ class TestFunctions(unittest.TestCase):
'knn',
'lasso',
'random_forest',
'scm',
'sgd',
'svm_linear',
'svm_poly',
......@@ -90,6 +91,7 @@ class TestFunctions(unittest.TestCase):
'gradient_boosting',
'knn',
'random_forest',
'scm',
'svm_linear',
'svm_poly',
'svm_rbf'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment