These are thoughts I've had about traffic, basically since I first started thinking about it when I first really experienced it in Philadelphia in the mid-90's. One thing that has really surprised me is that during the TD 5 Boro bike ride in New York City (Spring 2015), the bicycle density was so high that conditions were comparable to car traffic - and I saw the same patterns of behavior!
Attempts to write down things I'm mulling over, to make them more coherent for me, and possibly spark others' interests.
Artisan's Asylum is great - I go there to weld etc.
free DNS hosting that I use
Mastodon | Twitter
my GitHub
Tuesday, June 23, 2015
Why I bike to work and around in general
This started as an email to my friend Kevin, but then I realized I'd like to share it more broadly and keep it somewhere I could find it more readily. It's the rationale and data I've accumulated about biking. The vast majority of my commute is by bike - I live in Boston, MA and I bike year round, mostly regardless of the weather (snow, rain etc.). I also bike for fun occasionally on the weekends, but this post deals with commuting.
Wednesday, March 11, 2015
Create a RAID using one raspberry pi then transferring it to another
Build the array on a raspberry pi 1 that is already running a raid (level 1) array
- connect two 2-TB drives via powered USB hub
- They appear as /dev/sdd and /dev/sde
- use fdisk to delete the pre-built partitions, create new partitions using defaults that are for linux and fill each disk
- created array:
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sdd1 /dev/sde1
Monday, March 9, 2015
Raspberry pi 2 and the case of the unreliable USB ports
My newly purchased raspberry pi 2 did not recognize external harddrives:
- There is a powered USB hub for the drives - same make & model as I use successfully for the pi version 1
- Same manufacturer for the drives, but they were 2 TB instead of 1 TB (each)
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
dmesg provided the most information - sometimes no message when plugging in the hub, sometimes limited message saying the hub had been found then disconnected (when it was still plugged in):
Sunday, March 8, 2015
A hilarious economics post
This post:
https://medium.com/@yichuanw/a-dynamic-theory-of-romantic-choice-6e275270da93
is about explaining why "all the single people are crazy" and "all the good ones are taken". It is hilarious and mathematical.
It would be awesome to fit that model with data from OK Cupid...
https://medium.com/@yichuanw/a-dynamic-theory-of-romantic-choice-6e275270da93
is about explaining why "all the single people are crazy" and "all the good ones are taken". It is hilarious and mathematical.
It would be awesome to fit that model with data from OK Cupid...
Monday, March 2, 2015
Electric imp temperature sensors
After experiencing many burst pipes (in our baseboard heaters) I decided to build some temperature sensors. My friend Phil recommended using the electric imp microcontroller and quickly found a tutorial on how to use it to make a temperature sensor: https://plot.ly/electric-imp/tmp36-temperature-tutorial/
In the above the general concept & required components are spot on, but some of the specifics / details are off. Here's what I did, which is the same in outline but differs in some specifics (which I hope are accurate).
In the above the general concept & required components are spot on, but some of the specifics / details are off. Here's what I did, which is the same in outline but differs in some specifics (which I hope are accurate).
Parts:
- Electric imp
- developer kit quick start guide: https://electricimp.com/docs/gettingstarted/quickstartguide/
- electric imp breakout board
- analog devices tmp36 temperature sensor
- AC to USB adapter (vivitar, rated to ~1 A)
- USB to mini USB cord
- important: this is mini, not micro. the electric imp breakout board from sparkfun takes mini, not micro.
- bread board
- wire jumpers
- wire
- solder
- soldering iron
- code to run in electric imp IDE: https://github.com/dllahr/home_control/tree/eimp_blog_posts/electric_imp/temperature_sensing
Wednesday, August 27, 2014
Clustering vs. Linear Regression - which to use?
I've got some data and I'm trying to make an informed decision whether it is better described by a linear regression or a set of clusters.
My goal here is to compare linear regression and clustering for some cases that are obviously better for one of these or the other, using 2-dimensional data that is easy to visualize. By comparing these two workhorse methods under these conditions I'm hoping to gain better understanding of each and of how to decide when to use one or the other.
The 3 data sets I used were:
My goal here is to compare linear regression and clustering for some cases that are obviously better for one of these or the other, using 2-dimensional data that is easy to visualize. By comparing these two workhorse methods under these conditions I'm hoping to gain better understanding of each and of how to decide when to use one or the other.
The 3 data sets I used were:
- "obviously" better described by linear regression
- "obviously" better described by clustering
- in between the above 2 extremes
I used R. The scripts I used are present in this repository:
https://github.com/dllahr/cluster_vs_linear_regression
I got the code for clustering from:
http://www.statmethods.net/advstats/cluster.html
Before we get started: my friend Phil Montgomery who kindly reviewed this post made a good suggestion that in general, when you have 2 models and you are trying to decide which one to use, you want to compare the statistical likelihood of each. Usually this is done by comparing different values of parameters for a mathematical model, but it is worth investigating if it has been done for comparison of these two systems.
https://github.com/dllahr/cluster_vs_linear_regression
I got the code for clustering from:
http://www.statmethods.net/advstats/cluster.html
Before we get started: my friend Phil Montgomery who kindly reviewed this post made a good suggestion that in general, when you have 2 models and you are trying to decide which one to use, you want to compare the statistical likelihood of each. Usually this is done by comparing different values of parameters for a mathematical model, but it is worth investigating if it has been done for comparison of these two systems.
Subscribe to:
Posts (Atom)