Skip to content

Instantly share code, notes, and snippets.

View djsegal's full-sized avatar

djsegal

  • home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Dataset Count Parameter Descriptor
Apartments 15k N Airbnb
Restaurants 15k M DOH
Subway Stations 300 M MTA
Hotspots 10 M Red Diamonds
Cost Epicenter 1 M Orange Star
Feature Relative Importance
accommodates 1.0
accommodates _per_bathrooms -0.428
accommodates _per_bedrooms -0.28
food_density 0.248
is_brooklyn -0.231
center_dist -0.102
density -0.086
accommodates accommodates _per_bathrooms accommodates _per_bedrooms accommodates bedrooms center_dist _is_brooklyn food_density food_density _is_brooklyn is_brooklyn
All NYC 34 -14 -9 -4 -6 8 16 -9
Manhattan 51 -15 -13 -13 - 9 - -
Brooklyn 43 -19 -16 -7 - 16 - -
Linear SVM 25 -11 -7 -6 -1 3 21 -25
XGBoost 7 1 1 38 29 22 1 0
AdaBoost 4 1 0 25 14 51 4 0
Extra Forest 6 4 4 8 16 45 11 7
Random Forest 2 1 2 26 11 56 3 0
cur_data = price_data.copy()
cur_data = cur_data.merge(rental_data, on="id")
cur_data = cur_data.merge(location_data, on="id")
cur_data = cur_data.merge(geo_data, on="id")
X_train, X_test, y_train, y_test = \
custom_train_test_split(cur_data)
pass_cols = ["is_brooklyn", "density"]
drop_cols = ["year", "geometry", "zipcode"]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@djsegal
djsegal / missing-image.html
Created April 16, 2020 22:56 — forked from oscarmorrison/missing-image.html
html backup image
<img src="img/missing-image.png" onerror="javascript:this.src='img/default.png'">
@djsegal
djsegal / covid-seir.ipynb
Last active May 9, 2020 08:06
A Live SEIR Model for Covid-19 with Error Bars in Julia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@djsegal
djsegal / colors.jl
Created May 8, 2020 00:05
Simple color parser for hex and HTML colors to RGB array
global_colors = Dict(
"aliceblue" => [240, 248, 255],
"antiquewhite" => [250, 235, 215],
"aqua" => [0, 255, 255],
"aquamarine" => [127, 255, 212],
"azure" => [240, 255, 255],
"beige" => [245, 245, 220],
"bisque" => [255, 228, 196],
"black" => [0, 0, 0],
"blanchedalmond" => [255, 235, 205],
@djsegal
djsegal / Fusion Energy.ipynb
Created June 6, 2020 22:54
Comparing Pulsed and Steady-State Tokamaks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.