Skip to content

Instantly share code, notes, and snippets.

@ethen8181
ethen8181 / hw2.py
Last active February 20, 2017 03:09
geospatial
# python3.5
import os
import heapq
import joblib
import numpy as np
import pandas as pd
from shapely.geometry import LineString, Point
from sklearn.neighbors import NearestNeighbors
from collections import defaultdict, namedtuple
@ethen8181
ethen8181 / predictive.R
Last active December 8, 2016 16:28
test
library(MASS)
library(ROCR)
library(caret)
library(glmnet)
library(magrittr)
library(data.table)
library(doParallel)
setwd('/Users/ethen/Desktop/predictive-project')
@ethen8181
ethen8181 / stopwords.py
Last active October 17, 2022 20:13
sklearn & nltk english stopwords
"""
The set of stop words when you do this:
from nltk.corpus import stopwords
from sklearn.feature_extraction.stop_words import ENGLISH_STOP_WORDS
ENGLISH_STOP_WORDS = set( stopwords.words('english') ).union( set(ENGLISH_STOP_WORDS) )
"""
ENGLISH_STOP_WORDS = set([
'a',
'about',
'above',
library(dplyr)
library(data.table)
ids <- grid@model_ids
BestGridSearch <- function( ids )
{
# ------------------------------------------------------------------
# Description :
# Pass in a list of h2o model id obtained by h2o.grid