Showing posts with label r. Show all posts
Showing posts with label r. Show all posts

Tuesday, October 22, 2013

Another One Bites The Dust






I just finished my second Coursera course. It's hard to believe that "Data Analysis Using R" started just four weeks ago.

This wasn't a terribly difficult course, but lecture time added up. The assignments weren't hard conceptually, but I found myself struggling with the API and the docs. "How do I do that?" was a common question. It was easy to think how I'd do something in a language that I knew better, like Java or Python, but I wasn't always able to conjure up the R equivalent at will. I had to do small experiments on the fly to figure out how to make the language do my bidding.

The third programming assignment set was time-consuming. I was behind the eight ball because I was out of town at a family wedding the weekend before it was due. Thankfully we were given an allotment of late days that we could apply as needed. I used up three of them after returning from MN so I could get the assignment in late without penalty.

Debugging in the R environment is crude, reminiscent of the gbd command line debugger that comes with Java. It's a comedown for a person who's used to using the best IDEs in the world to work with Java and Python. I started using the R plugin for IntelliJ for the fourth assignment. I hope they keep expanding and improving it.

R does have some rudimentary object-oriented features, but it's firmly in the functional camp. A friend pointed out that R looks similar to JavaScript. As usual, he's right. I started eschewing the '<-' assignment notation in favor of '=' to make the visual resemblance stronger. The Renjin interpreter makes it possible to run R inside Java. I found out that you can also run R on CUDA. I'm looking forward to trying those packages and seeing what performance benchmarks would look like.

This one was a sprint. The next one, "Data Analysis", will emphasize problems that R is used for, diving deeper into regression and analysis. I'm looking forward to getting back in touch with my mathematics roots. It begins next Monday.


profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Monday, September 23, 2013

Computing For Data Analysis Using R












I start the next step with Coursera tonight: It's opening night for "Computing For Data Analysis" from Roger Peng at Johns Hopkins University. It's a four week introduction to using R that should be good. He blogs at Simply Statistics, which looks like it'll be a good resource for stretching my brain.

I'm running on my Windows 7 desktop. I've downloaded the latest version of R 3.0.1. There's an IDE called Tinn-R that might be okay. I'm sure it won't replace IntelliJ from JetBrains as the world's greatest IDE. Until those brilliant Russians come up with an R environment for me I'll make do.

My friend Steve Roach pointed out a port of R that runs on the JVM called Renjin. I think this statement is surprising:

We built Renjin, a new interpreter for the JVM because we wanted the beauty, the flexibility, and power of R with the performance of the Java Virtual Machine.

My first thought was that it'll be hard to beat LAPACK in C or Fortran. But perhaps a version that leverages parallelism could tip the balance.

So this will be sucking up some of my time and energy for the next four weeks. I hope the lessons diffuse into my brain quickly.



profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers


Sunday, January 3, 2010

Beautiful Data










I finished reading "Beautiful Data" a couple of weeks ago. It's an O'Reilly book edited by Toby Segaran (of "Programming Collective Intelligence" fame) and Jeff Hammerbacher.

I love the topic. We're awash in data, thanks to the Internet, but there will be a greater premium placed on gleaning insight from it all in the future. This book doesn't provide lessons on how to do that, but it does list some wonderful examples. The fields are diverse: biology, social sciences, criminology, space exploration, and others.

I thought the book was a little uneven, as compendiums of essays often are. It's hard to establish and meet a high quality standard consistently when many authors are involved.

Three essays stood out for me.

Peter Norvig is a new technical hero of mine. If a B.S. from Brown in applied math, a Ph.D. in computer science from Cal Berkeley, and Director of Research at Google isn't enough, maybe "Teach Yourself Programming In Ten Years" and "How To Write A Spelling Corrector" will put you over the top. His essay entitled "Natural Language Corpus Data" discusses the trillion word data set published by Thorsten Brants and Alex Franz of Google and its applications. This includes a predecessor of the spelling corrector I cited earlier.

Biology is an up-and-coming field that I'm largely ignorant of. The little I know is being spoon fed to me by my brilliant youngest daughter, but I'm a messy, inattentive eater who gets as much on the floor as I do into my gob. "Life in Data: The Story of DNA" by Matt Wood and Ben Blackburne gives a nice overview with a data slant that I enjoyed.

"Superficial Data Analysis: Exploring Millions of Social Stereotypes" by Brendan O'Connor and Lukas Biewald took data from FaceStat.com, which is down 'temporarily', and mined it for relationships between gender and attractiveness, gender bias in word usage, etc. I thought it was a brilliant use of a public data source.

I'd give an honorable mention to "Building Radiohead's House Of Cards" by Aaron Koblin with Valdean Klump. I love the band. I ran right over to YouTube to see the video after reading the piece. It's brilliant stuff.

There are lots of large data sets that are publicly available. The Stackoverflow.com data is available under a Creative Commons license. It would be a great source of information about the millions of programmers who frequent it.

It doesn't require expensive tools, either. The R statistics package is free to download. The learning curve is steep, but there are resources available here, here, and there to be your sherpa on your way to the summit.

My list of goals for 2010 is growing. If a goal is a dream with deadline, I need to become much better at setting deadlines for myself. Too many dreams remain unfulfilled.