Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelkusch committed Dec 31, 2024
1 parent e895962 commit 6e2d4c9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions doc_conf/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@
"abort_on_example_error": False,
"image_scrapers": scrapers,
"show_memory": True,
'filename_pattern': r'\.py',
'ignore_pattern': r'__init__\.py',
"filename_pattern": r"\.py",
"ignore_pattern": r"__init__\.py",
# 'reference_url': {
# 'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1',
# 'scipy': 'http://docs.scipy.org/doc/scipy-0.17.0/reference',
Expand Down
16 changes: 8 additions & 8 deletions examples/inference_model/ada_svr.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,27 @@
#
# - The distribution of the coefficients of SVR is normal centred around zeros.
# - The method is valid for large sample sizes.
# - The method has the linear models assumptions: linearity, normality,
# - The method has the linear models assumptions: linearity, normality,
# homoscedasticity, independence, fixed features, absence of multicollinearity
# (see the book of :footcite:ct:`Molnar 2012<molnar2020interpretable>`
# for details)
#
# **Advantages**:
#
#
# - The method is fast because it uses the central limit theorem to estimate
# the standard deviation of the distribution of the coefficients of SVR.
# - The method has the advantage of linear models: transparency of
# the prediction, high level of collective experiance and expertise
# and a guarantee of convergence. (see the book of
# - The method has the advantage of linear models: transparency of
# the prediction, high level of collective experiance and expertise
# and a guarantee of convergence. (see the book of
# :footcite:ct:`Molnar 2012<molnar2020interpretable>` for details)
#
# **Disadvantages**:
#
# - The method assumes that the distribution of the coefficients of SVR is normal centred around zeros.
# - The method is not valid for small sample sizes.
# - The method has all the disadvantages of linear models: only for linear
# relationships, not good predicting performance, unintuitive.
# (see the book of
# - The method has all the disadvantages of linear models: only for linear
# relationships, not good predicting performance, unintuitive.
# (see the book of
# :footcite:ct:`Molnar 2012<molnar2020interpretable>` for details)
#
# **Conclusion**:
Expand Down
2 changes: 2 additions & 0 deletions src/hidimstat/ada_svr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import numpy as np
from hidimstat.stat_tools import pval_from_scale

__all__ = ["ada_svr", "ada_svr_pvalue"]


def ada_svr(X, y, rcond=1e-3):
"""
Expand Down
6 changes: 3 additions & 3 deletions src/hidimstat/visualisation/plot_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def plot_dataset1D(X, y, beta, title="Toy dataset"):
"""
Plot a 1D toy dataset with the true regression line.
Parameters
----------
X : ndarray, shape (n_samples, n_features)
Expand Down Expand Up @@ -58,7 +58,7 @@ def plot_dataset1D(X, y, beta, title="Toy dataset"):
def plot_validate_variable_importance(beta, beta_hat, vmin=0.0, vmax=1.0):
"""
Plot for validating of the variable importance estimation.
Parameters
----------
beta : ndarray, shape (n_features,)
Expand Down Expand Up @@ -184,7 +184,7 @@ def plot_pvalue_H1(
):
"""
Plot for the confidence in the hypotheses that the variables are not important.
Parameters
----------
beta_hat : ndarray, shape (n_features,)
Expand Down

0 comments on commit 6e2d4c9

Please sign in to comment.