<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Zach Schwartz Dot Com </title><link href="http://zachschwartz.com" rel="alternate"></link><link href="http://zachschwartz.com/feeds/all.atom.xml" rel="self"></link><id>http://zachschwartz.com</id><updated>2012-03-02T11:52:52Z</updated><entry><title>Total Squares</title><link href="http://zachschwartz.com/total-squares/" rel="alternate"></link><updated>2012-03-02T11:52:52Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/total-squares/</id><summary type="html">&lt;iframe src="http://player.vimeo.com/video/37782204" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;br&gt;
&lt;i&gt; &lt;strong&gt;Update:&lt;/strong&gt; We presented to Intel and ITP, put the prototype online at &lt;a href="http://totalsquares.com/"&gt;totalsquares.com&lt;/a&gt;, and Fred made the spiffy demo &lt;a href="https://vimeo.com/37782204"&gt;video&lt;/a&gt; above. &lt;/i&gt;&lt;/p&gt;
&lt;h3&gt;What?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Squares&lt;/strong&gt; is a research project which explores the idea of technology having its own desires and learning its own tastes by using data from the Foursquare API and neural networks.&lt;/p&gt;
&lt;p&gt;Squares are social organisms that need people to move them around. They develop preferences based on venue data from the foursquare api, and how much 'fun' that square had at the venue. This data is used to train a neural network (venue data as inputs, 'fun' score as output) after each outing. &lt;/p&gt;
&lt;p&gt;When a user logs in, the neural net is executed on all nearby venues, which leads to the user's square suggesting places it wants to go. For instance, mine really likes the &lt;a href="https://foursquare.com/v/key-food/4ae3e13bf964a520729921e3"&gt;Key Foods&lt;/a&gt; near my apartment.&lt;/p&gt;
&lt;p&gt;I'm working with &lt;a href="http://fredtruman.com/"&gt;Fred Truman&lt;/a&gt; to build the prototype, which is taking the form of a mobile web application for the moment.&lt;/p&gt;
&lt;p&gt;Right now, 'fun' is determined in a simplistic way, depending on how much the user interacts with the square. In the future, we'd very much like to add a way for squares to interact with one another, to add another layer of depth. &lt;/p&gt;
&lt;h3&gt;Why?&lt;/h3&gt;
&lt;p&gt;Intel is funding a research group at ITP to explore "Vibrant Technology", which, very simply put, is the idea of viewing technology not as a tool to benefit people, but as a peer, with it's own desires. The group is lead by &lt;a href="http://deweyhagborg.com/bio.html"&gt;Heather Dewey-Hagborg&lt;/a&gt; from ITP and &lt;a href="http://techresearch.intel.com/ResearcherDetails.aspx?Id=164"&gt;Maria Bezaitis&lt;/a&gt; from Intel. &lt;/p&gt;
&lt;h3&gt;Nerd Stuff&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Squares backend is written in python using django&lt;/li&gt;
&lt;li&gt;For the neural nets we're using &lt;a href="http://leenissen.dk/fann/wp/"&gt;FANN&lt;/a&gt; which is great, though I wouldn't reccomend the python bindings. It's pretty hacky. Or maybe it's fine, and all my trouble is due to not being a &lt;a href="http://www.swig.org/"&gt;Swig&lt;/a&gt; expert. &lt;/li&gt;
&lt;li&gt;Lots of javascript, css, and possibly &lt;a href="http://sammyjs.org/"&gt;sammyjs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;And of course, the Foursquare API.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Square Shot" src="/static/img/square_shot.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strike&gt;We'll have a public demo up soon&lt;/strike&gt; Demo at &lt;a href="http://totalsquares.com/"&gt;totalsquares.com&lt;/a&gt;. &lt;a href="https://github.com/zischwartz/squares"&gt;Source on github&lt;/a&gt;.&lt;/p&gt;</summary></entry><entry><title>De/bug</title><link href="http://zachschwartz.com/debug/" rel="alternate"></link><updated>2012-03-02T11:36:20Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/debug/</id><summary type="html">&lt;p&gt;I haven't tried making visual art since I was a kid. I think I  was  discouraged when I wasn't as good as my &lt;a href="http://marshalederman.com/"&gt;Mom&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But CSS is &lt;a href="http://www.ecsspert.com/play/css3-logos/atari.php"&gt;crazy&lt;/a&gt; powerful now. The above image wasn't intentional, but I wonder how long it'll be before someone creates an entire animated film, using CSS. &lt;/p&gt;
&lt;p&gt;Nerdery for it's own sake? Maybe, but there's a lot of cool stuff one could do with a visual narrative made of interactive DOM elements. And between &lt;a href="https://developer.mozilla.org/en/CSS/@keyframes"&gt;keyframes&lt;/a&gt; and &lt;a href="http://www.html5rocks.com/en/tutorials/3d/css"&gt;3d transforms&lt;/a&gt; it would look amazing.&lt;/p&gt;</summary></entry><entry><title>New Site</title><link href="http://zachschwartz.com/new-site/" rel="alternate"></link><updated>2012-02-18T15:05:54Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/new-site/</id><summary type="html">&lt;p&gt;I never write anymore. This is bad, because writing is important, and I used to be fairly not terrible at it. I've built this site with the goal of blogging a lot more, or really, blogging at all. Which counts as writing. Maybe.&lt;/p&gt;
&lt;h3&gt;Nerdstuff&lt;/h3&gt;
&lt;p&gt;I've made the writing process easier and simpler. I'm writing this in  &lt;strike&gt;TextMate&lt;/strike&gt; &lt;strike&gt;Sublime Text 2&lt;/strike&gt; Vim, using markdown. &lt;/p&gt;
&lt;p&gt;The site is static, it's just html, no backend, no silly admin interface, no databases. I &lt;a href="https://github.com/zischwartz/pelican"&gt;forked&lt;/a&gt; the python static site generator, &lt;a href="http://pelican.readthedocs.org/en/2.7.2/index.html"&gt;pelican&lt;/a&gt;, changed a few things and added image support, which I haven't actually added to this site yet. And it's all hosted on Amazon's S3.&lt;/p&gt;</summary></entry><entry><title>The Written World</title><link href="http://zachschwartz.com/the-written-world/" rel="alternate"></link><updated>2012-02-18T13:29:32Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/the-written-world/</id><summary type="html">&lt;p&gt;For &lt;a href="http://shirky.com/"&gt;Clay Shirky's&lt;/a&gt; class, we built an experiment, based on Andrew Badr's &lt;a href="yourworldoftext.com"&gt;yourworldoftext.com&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;We placed a free-form text canvas on top of Google maps and added geolocation to see what happens when we combined online chat with the pre-existing relationships that are inherent to physical location and real-world places.&lt;/p&gt;
&lt;p&gt;Initially, we only allowed New York. We've removed that restriction, but haven't really been promoting it, so the rest of the world is pretty blank.&lt;/p&gt;
&lt;p&gt;Check it out: &lt;a href="http://writtenworld.org/"&gt;WrittenWorld.org&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;The Future&lt;/h3&gt;
&lt;p&gt;I'm rewriting this project from scratch for my ITP masters thesis. I'll be adding features like zooming, location search, subworlds, and realtime cursors.&lt;/p&gt;
&lt;p&gt;The original project was written in python using django, and a whole lot of javascript. My new version will be all javascript, as I'll be sampling this nodejs koolaid. It also won't use google maps, because I'm worried about their quotas, and being closed source, it's difficult to debug.&lt;/p&gt;
&lt;p&gt;&lt;a href="/static/img/wwshot2.jpg"&gt;&lt;img src="/static/img/wwshot2.jpg"&gt;&lt;/a&gt;&lt;/p&gt;</summary></entry><entry><title>Spherification</title><link href="http://zachschwartz.com/spherification/" rel="alternate"></link><updated>2011-05-12T17:51:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/spherification/</id><summary type="html">&lt;p&gt;&lt;p&gt;For my Design Frontiers in Biology and Materiality class I experimented with spherification of edible liquids (and one pureed delicious solid). Given that you're on the internet, and can't taste my spheres, the next best thing is to &lt;a href="http://zachschwartz.com/p/photo/spherification-wine/"&gt;check out the photos I took&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Spherification uses a reaction between sodium alginate and calcium to create a thin skin around the sphere. The liquid you want to create spheres out of is mixed with the alginate, and then dropped into a bath of water and calcium (I used calcium chloride). Reverse spherification uses those same chemicals, but, you guessed it, in reverse. This is necessary for liquids that contain calcium already, as they would thicken too much if mixed with the alginate.&lt;/p&gt;
&lt;p&gt;
&lt;meta charset="utf-8"&gt;I bought all my chemicals from&amp;nbsp;&lt;a href="http://lepicerie.com"&gt;lepicerie.com&lt;/a&gt;. If you're going to try this, definitely be sure to purchase food grade chemicals.   &lt;/meta&gt;
&lt;/p&gt;
&lt;p&gt;Liquids I made into spheres: Water, red tea, apricot nectar, apple cider vinegar, wine (pinot noire), Sriracha hot sauce, and pureed bacon. I reverse-sphered: coffee , balsamic vinaigrette, and milk.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I used a ratio of about 1 gram of alginate per 200ml of liquid, which in retrospect was a little much. Wine, for instance, thickened a bit more than I'd have liked, so while the spheres were tasty, biting into them was a bit more like eating an alcoholic gummy bear than a caviar. The tea and apricot didn't thicken as much, and had the desired effect. Bacon failed miserably and looked disgusting. Sriracha was so thick to being with that I diluted it some, but it was still to thick to form spheres in the air, dropped out of a syringe into the calcium bath: hence Sriracha spaghetti.&lt;/p&gt;
&lt;p&gt;After dropping them in the bath, I waited about one minute, before removing them, and rinsing them in a water bath. This last step is important, because calcium chloride does not taste good. In the future, I may experiment  to take them out sooner in some cases, to get a thinner shell&lt;/p&gt;
&lt;p&gt;For the reverse-spherification I used calcium lactate gluconate instead of the calcium chloride, with the same ratio. It worked very poorly, as you can see &lt;a href="http://zachschwartz.com/p/photo/spherification-7/"&gt;here&lt;/a&gt;. The problem with the reverse is that, instead of a thin shell, you get a very thick, clear shell. This could be avoided with an decreased alginate in the bath, but that would probably necessitate a thickener in the spheres, such as xanthan gum.&lt;/p&gt;
&lt;p&gt;A debate seems to exist about whether or not it's necessary to blend the alginate with your liquids, or just gently mix it to avoid air bubbles, as well as how long to wait do degas your liquids. I come down firmly on the side of an immersion blender, and learned that waiting to degas isn't that important, at least in my experience. Spheres with air trapped in them looked more visually interesting than the ones I degassed by leaving them in the refrigerator overnight, and had no disernable difference in texture.&amp;nbsp;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Budget Climb</title><link href="http://zachschwartz.com/budget-climb/" rel="alternate"></link><updated>2011-05-11T11:32:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/budget-climb/</id><summary type="html">&lt;p&gt;Budget climb is a project I worked on for 3D Sensing and Visualization class, that we've also entered in the &lt;a href="http://datavizchallenge.org"&gt;datavischallenge&lt;/a&gt;. I worked with &lt;a href="http://fredtruman.com/"&gt;Fred Truman&lt;/a&gt; and &lt;a href="http://github.com/frankiech"&gt;Frankie Cheung&lt;/a&gt;&amp;nbsp;to build a cityscape-style representation of the US federal budget from the last 26 years, broken up by type of spending.&lt;/p&gt;

&lt;p&gt;The cool thing about our project isn't the graphics, which are fairly basic, but instead, the interaction. In order to explore the data environment, we have to physically use our arms to climb, which gives us a real sense of the scale of each type of spending. Climbing military spending, especially for the Bush years, for instance, takes a lot of physical effort.&lt;/p&gt;

&lt;p&gt;Source code, and binary (runnable) applications (both kinect and non-kinect flavors) available at &lt;a href="http://budgetclimb.com"&gt;budgetclimb.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;b&gt;Update: We made it to the finals in the &lt;/b&gt;&lt;/em&gt;&lt;b&gt;&lt;a href="http://datavizchallenge.org"&gt;&lt;em&gt;DataVisChallenge&lt;/em&gt;&lt;/a&gt;&lt;/b&gt;&lt;em&gt;&lt;b&gt; and won $500. Which will almost certainly be spent on Bon Chon Chicken.&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/21600369?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=ffffff" width="500" height="426" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;/p&gt;</summary></entry><entry><title>Pong Head</title><link href="http://zachschwartz.com/pong-head/" rel="alternate"></link><updated>2011-05-01T11:58:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/pong-head/</id><summary type="html">&lt;p&gt;&lt;object width="500" height="400"&gt;
&lt;param name="movie" value="http://www.youtube.com/v/wrD0m9b7Edg?hl=en&amp;amp;fs=1" /&gt;
&lt;param name="allowFullScreen" value="true" /&gt;
&lt;param name="allowscriptaccess" value="always" /&gt;&lt;embed src="http://www.youtube.com/v/wrD0m9b7Edg?hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="400"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;p&gt;For Dano's Computational Cameras class (using skills from 3DSAV&amp;nbsp;class), I built a version of the game &lt;a href="http://en.wikipedia.org/wiki/Pong"&gt;Pong&lt;/a&gt;, where the users control the paddles with their bodies, and the loser's head becomes the ball.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I used a Kinect, Openframeworks, and OpenNi to track the users. The code for the game itself is super simple, with no win conditions, and the ball speed starts fairly slow (though it gets pretty dang fast). &lt;a href="http://static.zazerr.webfactional.com/zblog_site_media/drop/vectorMathExample.zip"&gt;Source code is available here&lt;/a&gt;.&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Neural Net Visualization</title><link href="http://zachschwartz.com/neural-net-visualization/" rel="alternate"></link><updated>2011-05-01T09:23:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/neural-net-visualization/</id><summary type="html">&lt;p&gt;&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/23488587?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=80ceff" width="580" height="406" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;For my machine learning class I created a neural network and a visualization to show how it learns.&lt;/p&gt;
&lt;p&gt;What is a &lt;a href="http://en.wikipedia.org/wiki/Neural_network"&gt;neural network&lt;/a&gt;? Basically, it's a computer model inspired by the way your brain works. The simplest version only has inputs and outputs. The interesting part is the synapses between the inputs and outputs, which start with small random weights (think multipliers), and get adjusted in small increments over many &amp;quot;epochs&amp;quot; in order to cause the network's output to approach the outputs desired.&lt;/p&gt;
&lt;p&gt;Where it gets really interesting is when you start adding more layers, besides inputs and outputs, called hidden layers. This allows the neural net to, in a sense, hold abstractions, and generalize from the training data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For this project, I took data from the last 70 years, and built a network with four layers, six inputs, four neurons in each of the two hidden layers, and one output. (Specifically, I built a feedforward back-propagating supervised network, which is what I'm discussing here. There are many other types of neural nets.)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As inputs, I used the number of Democrats and Republicans in the Senate and House, the active strength of the US Military, and the unemployment rate for the previous year. As output, I used the unemployment rate for that year, as that's what I wanted to predict.&lt;/p&gt;
&lt;p&gt;The video above shows the neural net learning, by adjusting the synapses between the neurons, which are animated in gray, and then running through the training data, and then the testing data (i.e. data that it wasn't trained on, in this case, the most recent 15 years).&lt;/p&gt;
&lt;p&gt;In the end, my neural network was much more accurate than I expected, the error on the testing data was 11%, meaning that, in theory, if you give the network inputs for a given year (House and Senate makeup, military, last year's unemp) it will predict the unemployment rate within 11% . So if the true rate was, say, 8.3%, the network would give you something between 9.21% and  7.387%. Not too bad. (Frankel and other economist friends, feel free to chime in about the various ways this is wrong and makes no sense.)&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;More details:&lt;br /&gt;
&lt;/strong&gt; To do this, I used the excellent &lt;a href="http://www.heatonresearch.com/encog"&gt;Encog&lt;/a&gt; library for java. I like python more than java, so messed with &lt;a href="http://pybrain.org"&gt;pybrain&lt;/a&gt; a lot, but Encog has every feature conceivable. And works with processing, which made visualizing easier.&lt;/p&gt;
&lt;p&gt;Before I got to what you see in the visualization, I tried a lot of different, similar neural nets. First, I tried it without the temporal data, that is, without the last year's unemployment. This gave me a 17% error rate on the last 15 year data. Next, I tried it with a random selection of 15 years, and the error rate went down slightly. Finally, I added the extra input of last year's unemployment, and, with a ton of training (much more than in the video), achieved an 11% error rate on the test data. I also messed with a great amount of variation as far as number of neurons in the hidden layers, from 2 to 500, but 4 turned out to be best.&lt;/p&gt;
&lt;p&gt;There were two areas in which I had trouble, one was data normalization using Encog, so I ended up normalizing the data myself using a python script I was using to aggregate the data anyway (neural nets like data to be between 0 and 1).&lt;/p&gt;
&lt;p&gt;Second, was displaying the actual values moving through the network while it was being tested. I rewrote most of my code in attempt to add this (and learned how to use the iterable object correctly), as I think it would be really useful for understanding the way the network works, but I couldn't get the values for each layer to display correctly. With some time, I'd really like to add that.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://static.zazerr.webfactional.com/zblog_site_media/drop/UnempTemoral.java"&gt;Source code available here&lt;/a&gt;, though this doesn't really resemble what's in the video. Below is the console output for the most successful run of the network. Because the weights start randomly, each training is different from every other training.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt; Epoch #5447 Error:1.4999955997114394E-4 Neural Network Results for Training Data: 0.66,0.28,0.534,0.324,0.18,0.73, actual=0.4983663395292939,ideal=0.495 0.66,0.28,0.534,0.324,0.3859,0.495, actual=0.23436250492049088,ideal=0.235 0.57,0.38,0.444,0.418,0.9045,0.235, actual=0.08452120095631022,ideal=0.095 0.57,0.38,0.444,0.418,1.1451,0.095, actual=0.0815033122889647,ideal=0.06 0.57,0.38,0.486,0.38,1.2056,0.06, actual=0.08130640799774146,ideal=0.095 0.57,0.38,0.486,0.38,0.3025,0.095, actual=0.24327423747050617,ideal=0.195 0.45,0.51,0.376,0.492,0.1582,0.195, actual=0.20086019727739185,ideal=0.195 0.45,0.51,0.376,0.492,0.1445,0.195, actual=0.2008001851266592,ideal=0.19 0.54,0.42,0.526,0.342,0.1613,0.19, actual=0.27778673711288804,ideal=0.295 0.54,0.42,0.526,0.342,0.1459,0.295, actual=0.28814359093564434,ideal=0.265 0.48,0.47,0.468,0.398,0.325,0.265, actual=0.16153750109068066,ideal=0.165 0.48,0.47,0.468,0.398,0.3635,0.165, actual=0.13558489288725128,ideal=0.15 0.46,0.48,0.426,0.442,0.3555,0.15, actual=0.17602786013114474,ideal=0.145 0.46,0.48,0.426,0.442,0.3303,0.145, actual=0.2199931108910821,ideal=0.275 0.48,0.47,0.464,0.406,0.2935,0.275, actual=0.23021456016162994,ideal=0.22 0.48,0.47,0.464,0.406,0.2807,0.22, actual=0.253903192793502,ideal=0.205 0.49,0.47,0.468,0.402,0.2795,0.205, actual=0.2555298780817681,ideal=0.215 0.49,0.47,0.468,0.402,0.2599,0.215, actual=0.26123536179631845,ideal=0.34 0.64,0.34,0.566,0.306,0.2504,0.34, actual=0.27390713255535215,ideal=0.275 0.64,0.34,0.566,0.306,0.2476,0.275, actual=0.29709252965041594,ideal=0.275 0.64,0.36,0.524,0.35,0.2483,0.275, actual=0.2855653767340758,ideal=0.335 0.64,0.36,0.524,0.35,0.2808,0.335, actual=0.24978578065111492,ideal=0.275 0.67,0.33,0.516,0.352,0.27,0.275, actual=0.27536312822913894,ideal=0.285 0.67,0.33,0.516,0.352,0.2687,0.285, actual=0.2765217655180545,ideal=0.26 0.68,0.32,0.59,0.28,0.2656,0.26, actual=0.2554208345203682,ideal=0.225 0.68,0.32,0.59,0.28,0.3093,0.225, actual=0.1939832730643538,ideal=0.19 0.64,0.36,0.496,0.374,0.3375,0.19, actual=0.19772126359928496,ideal=0.19 0.64,0.36,0.496,0.374,0.3547,0.19, actual=0.16332311108949626,ideal=0.18 0.58,0.42,0.486,0.384,0.346,0.18, actual=0.16442127838161877,ideal=0.175 0.58,0.42,0.486,0.384,0.3066,0.175, actual=0.24245546463834086,ideal=0.245 0.54,0.44,0.51,0.36,0.2714,0.245, actual=0.2558851329275245,ideal=0.295 0.54,0.44,0.51,0.36,0.2324,0.295, actual=0.2954853700500669,ideal=0.28 0.56,0.42,0.484,0.384,0.2253,0.28, actual=0.2681779921075669,ideal=0.245 0.56,0.42,0.484,0.384,0.2163,0.245, actual=0.26151565006675204,ideal=0.28 0.61,0.37,0.582,0.288,0.2129,0.28, actual=0.3470994484698628,ideal=0.425 0.61,0.37,0.582,0.288,0.2081,0.425, actual=0.37127167300622715,ideal=0.385 0.61,0.38,0.584,0.286,0.2075,0.385, actual=0.3441559331912948,ideal=0.355 0.61,0.38,0.584,0.286,0.2062,0.355, actual=0.34953890305512214,ideal=0.305 0.58,0.41,0.554,0.316,0.2031,0.305, actual=0.33600392793467077,ideal=0.29 0.58,0.41,0.554,0.316,0.2063,0.29, actual=0.3332303554084988,ideal=0.355 0.46,0.53,0.484,0.384,0.2101,0.355, actual=0.38391068153643754,ideal=0.38 0.46,0.53,0.484,0.384,0.213,0.38, actual=0.4706693478188674,ideal=0.485 0.46,0.54,0.538,0.332,0.2163,0.485, actual=0.4305970376393928,ideal=0.48 0.46,0.54,0.538,0.332,0.2184,0.48, actual=0.42942131121472155,ideal=0.375 0.47,0.53,0.506,0.364,0.2207,0.375, actual=0.3791308632978942,ideal=0.36 0.47,0.53,0.506,0.364,0.2233,0.36, actual=0.3408292536305523,ideal=0.35 0.55,0.45,0.516,0.354,0.2244,0.35, actual=0.3180255945111218,ideal=0.31 0.55,0.45,0.516,0.354,0.2209,0.31, actual=0.3054461292681537,ideal=0.275 0.55,0.45,0.52,0.35,0.2203,0.275, actual=0.30308948074905867,ideal=0.265 0.55,0.45,0.52,0.35,0.2144,0.265, actual=0.3008652986844994,ideal=0.28 0.56,0.44,0.534,0.334,0.2077,0.28, actual=0.3167321964928064,ideal=0.34 0.56,0.44,0.534,0.334,0.188,0.34, actual=0.33105436361549073,ideal=0.375 0.57,0.43,0.516,0.352,0.1775,0.375, actual=0.35928649461540163,ideal=0.345 0.57,0.43,0.516,0.352,0.1678,0.345, actual=0.3048710453119955,ideal=0.305 0.48,0.52,0.408,0.46,0.1583,0.305, actual=0.2624632144627692,ideal=0.28 ------------------------------- ------------------------------- Neural Network Results for NEW DATA: 0.48,0.52,0.408,0.46,0.1538,0.28, actual=0.23930077726065127, ideal=0.27, percentage error=0.11370082496055091 0.45,0.55,0.414,0.452,0.1504,0.27, actual=0.24239373755821966, ideal=0.245, percentage error=0.010637805884817685 0.45,0.55,0.414,0.452,0.147,0.245, actual=0.22977833679284043, ideal=0.225, percentage error=0.021237052412624118 0.45,0.55,0.422,0.446,0.1451,0.225, actual=0.22768245012752356, ideal=0.21, percentage error=0.08420214346439793 0.45,0.55,0.422,0.446,0.1449,0.21, actual=0.2253461254045889, ideal=0.2, percentage error=0.12673062702294444 0.5,0.5,0.424,0.442,0.1451,0.2, actual=0.21840667496538055, ideal=0.235, percentage error=0.07060989376433804 0.5,0.5,0.424,0.442,0.1478,0.235, actual=0.22297073742023873, ideal=0.29, percentage error=0.23113538820607327 0.48,0.51,0.41,0.458,0.15,0.29, actual=0.24921051256244264, ideal=0.3, percentage error=0.16929829145852449 0.48,0.51,0.41,0.458,0.1494,0.3, actual=0.25960230146033725, ideal=0.275, percentage error=0.055991631053319176 0.44,0.55,0.404,0.462,0.1455,0.275, actual=0.24845814093718874, ideal=0.255, percentage error=0.025654349265926538 0.44,0.55,0.404,0.462,0.1456,0.255, actual=0.23292273464134336, ideal=0.23, percentage error=0.012707541918884128 0.49,0.49,0.472,0.398,0.1451,0.23, actual=0.24803874970006634, ideal=0.23, percentage error=0.07842934652202753 0.49,0.49,0.472,0.398,0.1474,0.23, actual=0.24857095999001486, ideal=0.29, percentage error=0.14285875865512113 0.58,0.4,0.514,0.356,0.1493,0.29, actual=0.26828403415745933, ideal=0.465, percentage error=0.4230450878334208 0.58,0.4,0.514,0.356,0.1506,0.465, actual=0.5537600529394734, ideal=0.48, percentage error=0.15366677695723627 Average Error for Test data 0.11466037 Hey there. End of program. &lt;/code&gt;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Spider Mother</title><link href="http://zachschwartz.com/spider-mother/" rel="alternate"></link><updated>2011-03-27T12:44:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/spider-mother/</id><summary type="html">&lt;p&gt;&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/21510664?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=80ceff" width="500" height="426" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Our (video sculpture) take on &lt;a href="http://en.wikipedia.org/wiki/Louise_Bourgeois"&gt;Louise Bourgeois&lt;/a&gt;'s Maman.&amp;nbsp;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Video Self Portrait</title><link href="http://zachschwartz.com/video-self-portrait/" rel="alternate"></link><updated>2011-03-22T10:49:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/video-self-portrait/</id><summary type="html">&lt;p&gt;&lt;p&gt;Here's my video self portrait for Video Sculpture class. It was the first time I'd edited video since high school. Turns out not all that much has changed as far as Premiere and FCP go.&lt;/p&gt;
&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/21240419?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=80ceff" width="500" height="405" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Simple Kinect Test #3</title><link href="http://zachschwartz.com/simple-kinect-test-3/" rel="alternate"></link><updated>2011-03-08T15:45:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/simple-kinect-test-3/</id><summary type="html">&lt;p&gt;&lt;p&gt;&amp;nbsp;Spent a lot of time trying to get opengl shaders to work in OF. Failed. So I rendered the kinect mesh with triangles instead of quadrangles.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/SMGgLpK0ceA" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Attempt At Spherification</title><link href="http://zachschwartz.com/attempt-at-spherification/" rel="alternate"></link><updated>2011-03-07T16:35:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/attempt-at-spherification/</id><summary type="html">&lt;p&gt;&lt;p&gt;
&lt;meta charset="utf-8"&gt;For Design Frontiers class, I tried sperification of foods. &amp;nbsp;I used&amp;nbsp;Sodium Alginate,&amp;nbsp;Calcium Chloride and &amp;nbsp;Calcium Lactate Gluconate, and tried both&amp;nbsp;sperification and reverse-sperification, with Root, a liquour, water, tomato juice, milk, and olive oil. I was really only successfull with the water and tomato juice, probably because I failed to use purified water for my water-bath. &amp;nbsp;I'd like to try this again in a more controlled&amp;nbsp;environment. More photos after the jump. &lt;/meta&gt;
&lt;/p&gt;&lt;p&gt;&lt;iframe src="https://docs.google.com/present/embed?id=ddj8p22r_315g4qtpwgj" frameborder="0" width="410" height="342"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Simple Kinect Test #2</title><link href="http://zachschwartz.com/simple-kinect-test-2/" rel="alternate"></link><updated>2011-03-01T11:39:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/simple-kinect-test-2/</id><summary type="html">&lt;p&gt;&lt;p&gt;Simply taking the closest point, using it to draw shapes, and moving them around. The black mask at the start is actually an artifact from youtube, oddly.&lt;/p&gt;
&lt;p&gt;&lt;iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/QFbNJhnzmRM" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>Ngram Nietzsche</title><link href="http://zachschwartz.com/ngram-nietzsche/" rel="alternate"></link><updated>2011-02-25T11:24:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/ngram-nietzsche/</id><summary type="html">&lt;p&gt;&lt;p&gt;For Bit by Bit, I parsed Friedrich Nietzsche's &lt;i&gt; Beyond Good And Evil&lt;/i&gt; as  3-grams, basically using &lt;a href="http://itp.nyu.edu/varwiki/uploads/GenerateNgramText"&gt;Heather's code&lt;/a&gt; to put it back together. The text ends up about as, if not more, readable, as the original. An excerpt of the generated text follows below.&lt;/p&gt;
&lt;p&gt;
"Sure of our own virtues ? But then our organs themselves would be the cause of egoism as conducive to the highest and most successful type of man , the gregarious European man nowadays assumes an air as if by virtue of which he is not to speak of the future of humanity whom one must not resign oneself to one MAY NOT at all times can be at home"&lt;p&gt; " In short , the will " : -- that is certainly not the least of the world in its best springtime -- which , as is described by poets , intermediaries and blenders of the spirit , " in the case of Descartes , the " good " and almost incomprehensible MORAL world fleeing towards it , the will to overcome an emotion , for which the nationality - craze has induced and still induces among the neighbouring peoples , states , churches ) , he is BECOMING , he has been reserved for us nowadays ? 213 . It is the most delicate sensibility for the most spiritual festival -- laughter and arrogance , for the sake of his soul in misfortune which communicates to it . The noble type of man separates from himself for something from which tragedy itself no peace , until finally two primary types revealed themselves to be overcome on the contrary ! On the whole , speaking generally , and consequently also do not believe that severity , obtrusion of peculiar forms , incorporation , and a cash - box , modest also in politicis ! -- But why should one deal with such desires only as knowing or " humanising , " and " sin against Romanticism , besides being probably made from some rule , " and " sin against Romanticism , besides being probably made from some rule , " for the sake of his soul , he would like to have created it ; eventually , however , are now overlooked , or even with REGARD to us , inquisitive to a desk and a cash - box , modest also in politicis ! -- COUNTER TO this propensity for appearance , and that consequently unbelief in Catholic countries means something quite different from that which has always been -- transfigured . That which is called " convictions . " -- that is to say , in order to be a gold - dust of unconscious human vanity , women themselves ( or as I call it " Wagnerite " ; and in general prevail and make them furious , I found certain traits recurring regularly together , one might say arbitrary will , and also literally ) : he is now prescribed by the awe of authority from obtrusive touches and incivilities : something that is to say , " in every sense are required , as is appropriate in southern nations , eras , and a cash - box , modest also in politicis ! -- But why&lt;br /&gt;
&lt;/p&gt;</summary></entry><entry><title>Simple Kinect Test</title><link href="http://zachschwartz.com/simple-kinect-test/" rel="alternate"></link><updated>2011-02-24T01:28:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/simple-kinect-test/</id><summary type="html">&lt;p&gt;&lt;p&gt;Getting going with the kinect and openframeworks. Worked reasonably well. Basically, I'm interacting with an imaginary red cube, that turns green when I touch it in 3d space. I plan to make this more, er, complicated.&lt;/p&gt;
&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/20318120?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=80ceff" width="500" height="448" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class="highlight"&gt; if ((cur.x &amp;gt; redbox.x)&amp;amp;&amp;amp;(cur.x&amp;lt;redbox.x+redboxsize)){&lt;br /&gt;
&amp;nbsp;if ((cur.y &amp;gt; redbox.y)&amp;amp;&amp;amp;(cur.y&amp;lt;redbox.y+redboxsize)){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;if ((cur.z &amp;gt; redbox.z)&amp;amp;&amp;amp;(cur.z&amp;lt;redbox.z+redboxsize))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;{redboxcolor=1;}}}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Is the important part of the code (done with in the point could loop).&lt;/p&gt; &lt;/p&gt;</summary></entry><entry><title>YayTM Documented</title><link href="http://zachschwartz.com/yaytm-documented/" rel="alternate"></link><updated>2011-01-24T11:11:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/yaytm-documented/</id><summary type="html">&lt;p&gt;&lt;p&gt;Over the weekend my &lt;a href="http://yaytm.com"&gt; YayTM&lt;/a&gt; got posted to &lt;a href="http://hackaday.com/2011/01/21/dance-for-a-dollar-with-the-yaytm/"&gt;Hackaday&lt;/a&gt;. Very cool except I'd failed to post documentation or source code, and the comments on this site were broken. I was notably called a "goober" and an "immature sociopath", among other things. Getting insulted by the Internet is cool, a rite of passage even, and nothing to be taken personally or seriously, but some of the comments were totally valid. I should have documented this thing. So here we go, after the nonjump.&lt;/p&gt;
&lt;p&gt;The image above is of some sketches I did trying to figure out how the dance detection would work, and how to build the acrylic box. Source code of the actual processing sketch is available &lt;a href="http://static.zazerr.webfactional.com/zblog_site_media/drop/yaytmsource.zip"&gt;here&lt;/a&gt;, but it's totally and completely awful code that I can't recommend reading in good conscience, but be my guest. I should have written or found some sort of scripting/events system. Next time. &lt;/p&gt;&lt;/p&gt;
&lt;p&gt; The bill dispenser was ten dollars used on ebay and was manufactured by &lt;a href="http://www.ict-america.com/product/dispensing_devices.asp"&gt;ICT&lt;/a&gt;. I burned out the circuit board pretty quickly while messing around with it, but the motor continued to work, so with a little cajoling and the installation of my own LED and sensor, I was able to dispense dollar bills using an Arduino and Processing.&lt;/p&gt;

&lt;p&gt; Below is a video of me using the YayTM. It was right at the end of the show (you can hear people cheering) so the bill dispenser is a little wonky and at the wrong angle, so dispensed two dollars instead of one.&lt;/p&gt;

&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_QA9ehljs1I?hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_QA9ehljs1I?hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;Any other questions?&lt;/p&gt;</summary></entry><entry><title>Track M+E</title><link href="http://zachschwartz.com/track-me/" rel="alternate"></link><updated>2011-01-18T13:51:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/track-me/</id><summary type="html">&lt;p&gt;&lt;p&gt;For my Design for UNICEF class, I worked with Zevensuy Rodriguez and Margaret McKenna to plan a supply logistics tracking system for supplies in emergency situations. It consists of two components, a web application for the UNICEF community to monitor supply locations and progress, as well as a mobile application for use in the field. In short, it's similar to the tracking systems FedEx and UPS use, but simplified and much more flexible.
&lt;/p&gt;&lt;p&gt;
Last month, we presented &lt;a href="http://track-me.blogspot.com/"&gt;Track M+E&lt;/a&gt; to staff at UNICEF HQ in New York, which was featured in &lt;a href="http://www.unicef.org/infobycountry/usa_57348.html"&gt;this article&lt;/a&gt;. Video of the presentation will be available soon, and the slides for our presentation are after the jump.&lt;/p&gt;&lt;iframe src="https://docs.google.com/present/embed?id=dwzkmt5_204c8jvxtdc&amp;size=m" frameborder="0" width="555" height="451"&gt;&lt;/iframe&gt; &lt;/p&gt;</summary></entry><entry><title>The YayTM</title><link href="http://zachschwartz.com/the-yaytm/" rel="alternate"></link><updated>2010-12-20T16:26:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/the-yaytm/</id><summary type="html">&lt;p&gt;&lt;a href="/things/yaytm/"&gt;YayTM&lt;/a&gt; is a physical piece which calls attention to itself at predetermined times, and asks passersby to dance for it, in exchange for a dollar. Using face tracking to measure dancing prowess, the YayTM determines if the user is dancing to its standards and dispenses a dollar if it likes what it sees. Then, regardless of the success or failure of the dancer, and without their previous knowledge, the YayTM uploads video of the dancer to YouTube and displays that video here, for you to make fun of. 
&lt;br&gt;&lt;br&gt;
&lt;a href="/things/yaytm/"&gt;Check out the videos.&lt;/a&gt; 
&lt;br&gt;
Or watch a first person view:
&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_QA9ehljs1I?hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_QA9ehljs1I?hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</summary></entry><entry><title>Lobbying By Industry Data Visualization</title><link href="http://zachschwartz.com/lobbying-by-industry-data-visualization/" rel="alternate"></link><updated>2010-11-23T13:51:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/lobbying-by-industry-data-visualization/</id><summary type="html">&lt;p&gt;&lt;p&gt;I made this data visualization of lobbying data for my ICM class. It was due yesterday at 9:30am, and I turned in a much worse version of this, because I'd wasted a bunch of time messing with a deprecated Sunlight Foundation json method. In the end, I just downloaded 200MB of lobbying data from &lt;a href="http://www.opensecrets.org/"&gt;OpenSecrets.org&lt;/a&gt; and used the awesome, new &lt;a href="http://code.google.com/p/google-refine/"&gt; Google Refine&lt;/a&gt; to clean up the data before writing my Processing sketch.&lt;/p&gt;&lt;/p&gt;
&lt;p&gt; &lt;a href="/static/img/lobby-by-industry-vis.png"&gt;Full size version here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Edit: Sam points out that I had cumulative totals, not the actual industry totals. Fixed &lt;/p&gt;</summary></entry><entry><title>ICM Midterm</title><link href="http://zachschwartz.com/icm-midterm/" rel="alternate"></link><updated>2010-11-17T20:28:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/icm-midterm/</id><summary type="html">&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/16618000" width="500" height="375" frameborder="0"&gt;&lt;/iframe&gt;
&lt;p&gt;My Intro to Computational Media midterm project used face detection and tracking to manipulate an, admittedly very simple, 3D scene rendered in processing. I used the OpenCV library, and moved the point of view for the scene based on the movement of the subject's face. &lt;/p&gt;
&lt;p&gt; It fails if the subject's face isn't fully visible, or if the face is too in profile, or if the face is a black guy wearing glasses. It could also use a lot more smoothing, as what I'm using is fairly rudimentary. And a Microsoft Kinect &lt;a href="http://www.youtube.com/watch?v=7QrnwoO1-8A"&gt;probably wouldn't hurt matters&lt;/a&gt;.  &lt;/p&gt;&lt;/p&gt;</summary></entry><entry><title>I Stop Heart</title><link href="http://zachschwartz.com/i-stop-heart/" rel="alternate"></link><updated>2010-10-18T11:35:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/i-stop-heart/</id><summary type="html">&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/15939640" width="500" height="281" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt;</summary></entry><entry><title>Color Lock Box</title><link href="http://zachschwartz.com/color-lock-box/" rel="alternate"></link><updated>2010-10-10T20:22:00Z</updated><author><name>Zach Schwartz</name></author><id>http://zachschwartz.com/color-lock-box/</id><summary type="html">&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/15722733" width="500" height="281" frameborder="0"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;
The assignment for &lt;a href="http://itp.nyu.edu/physcomp/Intro/HomePage"&gt;physical computing class&lt;/a&gt; was to create a 'stupid pet trick'. Basically, a device that one interacts with physically, that does &lt;b&gt;something&lt;/b&gt;. &lt;/p&gt;

&lt;p&gt;&lt;p&gt; My original idea was to make a color based combination lock, but I ran into a lot of unrelated trouble and ended up simplifying the project into a sort of 'guess the color' game. If the user leaves the led/ping pong ball on the right color for two seconds, the lockbox activates and either opens or closes.&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;Problems I ran into: 1) I really had trouble figuring out an elegant way to map the potentiometer reading to the RGB values for the LED. It seems like there should be a smart way to do this, but I ended up using several if-statements and mapping within them, which felt...dirty and wrong. I need to study some more math, clearly. &lt;/p&gt;

&lt;p&gt; Second, and way less my fault, the servo.h library for the Arduino messed up my LED's colors. It still worked, but the colors weren't pretty, which was a really big part of this project for me, so I ended up writing handrolling the servo controls, which worked fine. But still, I wonder why setting the a pin for the servo using the library screwed up my LED, even before I attached the motor. &lt;/p&gt;</summary></entry></feed>
