Skip to content

Commit

Permalink
update style
Browse files Browse the repository at this point in the history
  • Loading branch information
xadupre committed Jan 27, 2024
1 parent 56fb2dc commit 23642f7
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 12 deletions.
1 change: 1 addition & 0 deletions _doc/examples/plot_constraint_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Data
====
"""

from collections import Counter

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions _doc/examples/plot_decision_tree_logreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
models on the `Iris
dataset <https://scikit-learn.org/stable/auto_examples/datasets/plot_iris_dataset.html>`_.
"""

import numpy
from scipy.spatial.distance import cdist
import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions _doc/examples/plot_digitize.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Simple example
==============
"""

import numpy
import matplotlib.pyplot as plt
from onnxruntime import InferenceSession
Expand Down
1 change: 0 additions & 1 deletion _doc/examples/plot_kmeans_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
algorithm.
"""


import matplotlib.pyplot as plt
import numpy
import numpy.random as rnd
Expand Down
1 change: 0 additions & 1 deletion _doc/examples/plot_leave_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
the predict the same value (or class). Do they share a border?
"""


##############################
# A simple tree
# +++++++++++++
Expand Down
1 change: 0 additions & 1 deletion _doc/examples/plot_logistic_regression_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
-------------------------------
"""


import numpy
import pandas
import matplotlib.pyplot as plt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Let's build a toy problem based on two linear models.
"""


import matplotlib.pyplot as plt
import numpy
import numpy.random as npr
Expand Down
1 change: 0 additions & 1 deletion _doc/examples/plot_quantile_mlpregression.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
We first generate some dummy data.
"""


import numpy
from pandas import DataFrame
import matplotlib.pyplot as plt
Expand Down
1 change: 0 additions & 1 deletion _doc/examples/plot_traceable_ngrams_tfidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
~~~~~~~~~~~~~~~~~~~~
"""


import numpy
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from mlinsights.mlmodel.sklearn_text import (
Expand Down
85 changes: 85 additions & 0 deletions _doc/sg_execution_times.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

:orphan:

.. _sphx_glr_sg_execution_times:


Computation times
=================
**00:00.000** total execution time for 17 files **from all galleries**:

.. container::

.. raw:: html

<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" />
</style>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready( function () {
$('table.sg-datatable').DataTable({order: [[1, 'desc']]});
} );
</script>

.. list-table::
:header-rows: 1
:class: table table-striped sg-datatable

* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_auto_examples_plot_constraint_kmeans.py` (``examples/plot_constraint_kmeans.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_decision_tree_logreg.py` (``examples/plot_decision_tree_logreg.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_digitize.py` (``examples/plot_digitize.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_kmeans_l1.py` (``examples/plot_kmeans_l1.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_leave_neighbors.py` (``examples/plot_leave_neighbors.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_logistic_regression_clustering.py` (``examples/plot_logistic_regression_clustering.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_piecewise_classification.py` (``examples/plot_piecewise_classification.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_piecewise_linear_regression.py` (``examples/plot_piecewise_linear_regression.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_piecewise_linear_regression_criterion.py` (``examples/plot_piecewise_linear_regression_criterion.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_predictable_tsne.py` (``examples/plot_predictable_tsne.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_quantile_mlpregression.py` (``examples/plot_quantile_mlpregression.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_quantile_regression.py` (``examples/plot_quantile_regression.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_regression_confidence_interval.py` (``examples/plot_regression_confidence_interval.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_search_images_torch.py` (``examples/plot_search_images_torch.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_sklearn_transformed_target.py` (``examples/plot_sklearn_transformed_target.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_traceable_ngrams_tfidf.py` (``examples/plot_traceable_ngrams_tfidf.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_visualize_pipeline.py` (``examples/plot_visualize_pipeline.py``)
- 00:00.000
- 0.0
6 changes: 3 additions & 3 deletions mlinsights/helpers/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def __init__(self, model):
)
if hasattr(model, "decision_function") and callable(model.decision_function):
model._debug_decision_function = model.decision_function
self.methods[
"decision_function"
] = lambda model, X: model._debug_decision_function(X)
self.methods["decision_function"] = (
lambda model, X: model._debug_decision_function(X)
)

def __repr__(self):
"""
Expand Down
1 change: 0 additions & 1 deletion mlinsights/sklapi/sklearn_base_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class SkBaseLearner(SkBase):

"""
Pattern of a *learner* qui suit la même API que :epkg:`scikit-learn`.
"""
Expand Down
2 changes: 0 additions & 2 deletions mlinsights/sklapi/sklearn_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class SkException(Exception):

"""
custom exception
"""
Expand All @@ -12,7 +11,6 @@ class SkException(Exception):


class SkLearnParameters:

"""
Defines a class to store parameters of a *learner* or a *transform*.
"""
Expand Down

0 comments on commit 23642f7

Please sign in to comment.