pip install -U build twine setuptools wheel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| url <- "https://raw.githubusercontent.com/Techtonique/datasets/refs/heads/main/time_series/multivariate/dieboldli2006.txt" | |
| parse_time_series_url <- function(url) { | |
| response <- httr::GET(url) | |
| content <- httr::content(response, "text") | |
| lines <- strsplit(content, "\n")[[1]] | |
| data_list <- list() | |
| for (line in lines) { |
See also https://minrk-nbconvert.readthedocs.io/en/stable/usage.html
jupyter nbconvert --to pdf notebook.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \begin{figure}[ht] | |
| \centering | |
| \includegraphics[width=0.9\textwidth]{figure5_model_comparison_summary.pdf} | |
| \caption{Comprehensive model comparison...} | |
| \end{figure} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -sL https://github.com/owner/repo/archive/refs/tags/vX.X.X.tar.gz | openssl sha256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #' Convert formula-based model function to matrix interface | |
| #' | |
| #' @param fit_func Function accepting formula and data | |
| #' @param predict_func Optional prediction function | |
| #' @param intercept Include intercept in formula (default TRUE) | |
| #' @return List with fit and predict methods | |
| formula_to_matrix <- function(fit_func, predict_func = NULL, intercept = TRUE) { | |
| fit_wrapper <- function(X, y, ...) { | |
| # Input validation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run Bayesian optimization minimizing rmse | |
| remotes::install_github("thierrymoudiki/bayesianrvfl") | |
| > head(bayesianrvfl::bayes_opt) | |
| # function (objective, lower, upper, type_acq = c("ei", "ucb"), | |
| # nb_init = 10L, nb_iter = 90L, kappa = 1.96, method = c("standard", | |
| # "direct_online", "polyak_online"), surrogate_model = c("rvfl", | |
| # "matern52", "rvfl_emcee", "rf"), optim_surr = c("GCV", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.utils import all_estimators | |
| from tqdm import tqdm | |
| # Get all scikit-learn regressors | |
| estimators = all_estimators(type_filter='regressor') | |
| for name, RegressorClass in tqdm(estimators): | |
| if name in ['MultiOutputRegressor', 'MultiOutputClassifier', 'StackingRegressor', 'StackingClassifier', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(doSNOW) | |
| library(tcltk) | |
| cl <- makeSOCKcluster(2) | |
| registerDoSNOW(cl) | |
| pb <- txtProgressBar(max=100, style=3) | |
| progress <- function(n) setTxtProgressBar(pb, n) | |
| opts <- list(progress=progress) | |
| r <- foreach(i=1:100, .options.snow=opts) %dopar% { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # first, install jq: on macOS, brew install jq | |
| wget https://raw.githubusercontent.com/Techtonique/datasets/refs/heads/main/tabular/survival/gbsg2_2.csv | |
| # === CONFIG === | |
| JSON_FILE="survival_curves.json" | |
| CSV_FILE="survival_curves.csv" | |
| PLOT_FILE="survival_plot.png" |
NewerOlder