Skip to content

Instantly share code, notes, and snippets.

@DavidykZhao
DavidykZhao / multi-face.ipynb
Created November 21, 2020 19:55 — forked from yang-zhang/multi-face.ipynb
Multi-task Deep Learning Experiment using fastai Pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DavidykZhao
DavidykZhao / ensemble_search.py
Created October 29, 2020 15:32 — forked from hugoabreu1002/ensemble_search.py
optimized ensemble search
class ensemble_search:
def __init__(self, X_train, y_train, X_test, y_test,
size_pop=20, epochs=5, verbose=True):
self.X_train = X_train
self.y_train = y_train
self.X_test = X_test
self.y_test = y_test
self.size_pop = size_pop
self.epochs = epochs
Detailed Information about LGBM Parameters
https://medium.com/@pushkarmandot/https-medium-com-pushkarmandot-what-is-lightgbm-how-to-implement-it-how-to-fine-tune-the-parameters-60347819b7fc
LGBM Hpyerparameter Optimisation and Visualisation
https://github.com/WillKoehrsen/hyperparameter-optimization/blob/master/Bayesian%20Hyperparameter%20Optimization%20of%20Gradient%20Boosting%20Machine.ipynb
https://www.kaggle.com/willkoehrsen/intro-to-model-tuning-grid-and-random-search
@DavidykZhao
DavidykZhao / rapids-colab.ipynb
Created August 29, 2020 20:54 — forked from gumdropsteve/rapids-colab.ipynb
Script to Install RAPIDS in Google Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def cross_validate_xgboost(train_data, train_output,
n_folds, param_grid,
type_dict,
fixed_param_dict = {'objective': 'binary:logistic', 'eval_metric': ['auc']},
metric_func_dict = {'auc': sklearn.metrics.roc_auc_score},
other_metrics_dict = None, keep_data = True, **kwargs):
"""
Perform k-fold cross-validation with xgboost hyperparameters
Get the average performance across folds and save all of the results
@DavidykZhao
DavidykZhao / r-to-python-data-wrangling-basics.md
Created December 26, 2019 21:47 — forked from conormm/r-to-python-data-wrangling-basics.md
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

The dplyr package in R makes data wrangling significantly easier. The beauty of dplyr is that, by design, the options available are limited. Specifically, a set of key verbs form the core of the package. Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe. Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R. The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).

dplyr is organised around six key verbs: