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
# 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 |
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(MASS) | |
library(ROCR) | |
library(caret) | |
library(glmnet) | |
library(magrittr) | |
library(data.table) | |
library(doParallel) | |
setwd('/Users/ethen/Desktop/predictive-project') | |
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
""" | |
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', |
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(dplyr) | |
library(data.table) | |
ids <- grid@model_ids | |
BestGridSearch <- function( ids ) | |
{ | |
# ------------------------------------------------------------------ | |
# Description : | |
# Pass in a list of h2o model id obtained by h2o.grid |
NewerOlder