Skip to content

Instantly share code, notes, and snippets.

@Nikolay-Lysenko
Nikolay-Lysenko / xgb_quantile_loss.py
Last active Aug 10, 2020
Customized loss function for quantile regression with XGBoost
View xgb_quantile_loss.py
import numpy as np
def xgb_quantile_eval(preds, dmatrix, quantile=0.2):
"""
Customized evaluational metric that equals
to quantile regression loss (also known as
pinball loss).
Quantile regression is regression that
@naotokui
naotokui / conv_autoencoder_keras.ipynb
Created Jan 10, 2017
Convolutional Autoencoder in Keras
View conv_autoencoder_keras.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharpe5
sharpe5 / gist:890a378ef8278a81792039201d4d690b
Created Dec 23, 2016 — forked from zelid/gist:6965002
Examples of BulkInsert for PostgreSQL, MySQL and MS SQL using ServiceStack OrmLite. Work in progress...
View gist:890a378ef8278a81792039201d4d690b
public static void BulkInsertNpgsql<T>(this IDbConnection dbConn, IEnumerable<T> list, IEnumerable<string> insertFields = null)
{
if (list == null) return;
if (list.Count() < 1) return;
var objWithAttributes = list.FirstOrDefault();
var modelDef = OrmLiteConfig.GetModelDefinition(objWithAttributes.GetType());
if (insertFields == null) insertFields = new List<string>();
You can’t perform that action at this time.