Skip to content

Fix documentation #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/plot_knockoff_aggregation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Knockoff aggregation on simulated data
=============================
======================================

In this example, we show an example of variable selection using
model-X Knockoffs introduced by :footcite:t:`Candes_2018`. A notable
Expand Down
12 changes: 6 additions & 6 deletions examples/plot_variable_importance_classif.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#############################################################################
# Imports needed
# ------------------------------
# --------------

import matplotlib.lines as mlines
import matplotlib.pyplot as plt
Expand All @@ -37,7 +37,7 @@

#############################################################################
# Generate the data
# ------------------------------
# -----------------
# We generate the data using a multivariate normal distribution with a Toeplitz
# correlation matrix. The target variable is generated using a non-linear function
# of the features. To make the problem more intuitive, we generate a non-linear
Expand Down Expand Up @@ -81,7 +81,7 @@

#############################################################################
# Visualize the data
# ------------------------------
# ------------------

fig, axes = plt.subplots(
1,
Expand Down Expand Up @@ -115,7 +115,7 @@

#############################################################################
# Variable importance inference
# ------------------------------
# -----------------------------
# We use two different Support Vector Machine models, one with a linear kernel and
# one with a polynomial kernel of degree 2, well specified to capture the non-linear
# relationship between the features and the target variable. We then use the CPI and
Expand Down Expand Up @@ -208,7 +208,7 @@

#############################################################################
# Compute the p-values for the variable importance
# ------------------------------
# ------------------------------------------------

pval_arr = np.zeros((n_features, 3))
for j in range(n_features):
Expand All @@ -218,7 +218,7 @@

#############################################################################
# Visualize the variable importance
# ------------------------------
# ---------------------------------
# Here we plot the variable importance and highlight the features that are considered
# important, with a p-value lower than 0.05, using a diamond marker. We also highlight
# the true important features, used to generate the target variable, with a star marker.
Expand Down
Loading