H2O: easy machine learning

I learnt H2O in a meetup group in this post. The demo and presentation were impressive. It’s been a while but I have always wanted to try it.

Ok, so I started with this page: https://github.com/h2oai/h2o-3

I must say it’s not the clearest instruction I’ve seen. I first installed using pip and conda. Import successful! And then use: h2o.init(ip=”localhost”, port=54323)

new
It’s pretty funny it says the version is too old. I just downloaded it!

(Failures: In between, I tried build which didn’t work. There was an error message about R. Then I tried install R. But the error message is still there. And the attempt to try to install h2o in R didn’t work either. It’s been so long since I used R!)

But actually, the easiest thing is to follow this page: http://h2o-release.s3.amazonaws.com/h2o/rel-ueno/7/index.html

After running the .jar file, use this  http://localhost:54321 (they call it flow http://docs.h2o.ai/h2o/latest-stable/h2o-docs/flow.html).
There is a GUI for deep learning and data, etc. A bit like weka on steroids 😀

Tried using the deep learning example. Start:

9

Finish:

8

The estimation of time is not that accurate.

And it’s pretty hard on the CPUs with default settings:

7

There are lots of other products on different platform from this company. More explorations to be done.

Meet up groups in the Netherlands

Meet up groups are so vibrant in the Netherlands!

Here’re a few I’ve been to already:

Japanese Speaking in Utrecht: https://www.meetup.com/Japanese-Speaking-Meetup-in-Utrecht/

Data Science in Utrecht: https://www.meetup.com/Data-Science-Utrecht/

Language Cafe in Utrecht: https://www.meetup.com/Language-Cafe-Utrecht/

Artificial Intelligence Deep Learning in Amsterdam: https://www.meetup.com/Amsterdam-Artificial-Intelligence-Deep-Learning/

Amsterdam Data Science: https://www.meetup.com/Amsterdam-Data-Science/

There’s another one. Not really a meet up group but has that kind of feeling to it:

Manga kissa: https://www.mangakissa.nl/

Some pics from the Language Cafe in Utrecht and the Artificial Intelligence Deep Learning in Amsterdam:

Every one of them had 10-200 participants! It’s a good thing that we meet new people in the groups, hear new stories, and learn new things or just become motivated to learn new things. Stay motivated!

 

Magenta: starter code

This is my second try with magenta now. The first one was last year when it was just released, but I couldn’t figure out anything in the end… Now it seems to have got much better. And maybe I got more familiar with the terms as well 😀

So, basically follow the code given here: https://github.com/tensorflow/magenta

I actually did both the automatic install and the manual install because an error message about a module called six (happened both times). Solved in a simple way:
pip uninstall six
pip install six

After installation, one important thing to notice:
Note that you will need to run source activate magenta to use Magenta every time you open a new terminal window.

And then, success yay!
1

To see the generated files:
2

The first melody looks like this (using musescore):3

And then I tried using bazel:

BUNDLE_PATH=/Users/irisren/Downloads/attention_rnn.mag  CONFIG=’attention_rnn’ bazel run //magenta/models/melody_rnn:melody_rnn_generate — –bundle_file=${BUNDLE_PATH}  –config=${CONFIG}

Basically did the same thing as above. More explorations to be done!

Playing with the Youtube 8M dataset – starter code

The code I used can be found here: https://github.com/google/youtube-8m
The following is how I got the start code running and how much it costs 😀

The first issue I ran into was when I was configuring the gcloud account. First you have to enter your credit card info, but since google says they will ask for authorisation before charging, I’m gonna trust them… (Wasn’t a good experience putting my credit card on aws)

But it was werid to be that because I’m in Europe, I have to create a business account, although I was only testing for myself. And then I got denied when creating the billing account and enabling billing for the project. I suspect that was something to do with my geolocation as well, so I used another google account and used my old university vpn to get me the US access. Then, everything went fine…

Finally, I enabled ML API on google cloud for the project and it’s just very satisfying to see the successful message:
084F2CC2-231E-481D-A6BB-8487568E7122
So I went on to the console of gcloud and checked the status: it’s running!!
0FDD6C0D-820B-4AE9-ACF6-D4A09D01208A

Second day. I came back and check the status again: 51A38E18-B89B-4414-93F7-12448CBD5DEC975231F9-886D-4A84-A45A-8107B301BF22
Since there is a free $300 credit from google, it didn’t really cost anything. But it’s good to know the actual cost 😛

Of course I also tried running it locally:F126DE7E-F29D-47E1-97CD-35674842EA91

It was quite hard on my CPU…
39E38D31-267F-44C3-8B0D-8F1E07BE4B25

And in the end, because it’s the beginner’s code, it seems that it won’t stop for a while. So I had to stop it manually…
B7B03C69-647D-4C6C-8D42-7A1E60683BB8
More explorations to be done!

Sketches

I was very into drawing once when I was in high school. I tried to draw and paint more when I was in the US. But a lack of time is always the issue…

It would simply be a waste to not use my big iPad and apple pencil to draw something though. So, with little time, I learnt a little bit of how to use sketches.app

It’s fun to learn how to control the hand, how to figure out the ratios of things, how the digital tools can mimic reality.

This slideshow requires JavaScript.

Colouring is relaxing, too. But sometimes even harder. Maybe more on that in another post.

And unfortunately, I still can’t draw out of nothing (well, I can, but the results are terrible)…

Pattern Recognition Course in Delft

Almost a month ago, I went to this ASCI course to fulfil my “study plan”. It wasn’t very pleasant to get up everyday at 6:30am and take the train to Rotterdam and then bus to Delft, but it was better with my office mates 😛

The course was a good overview of the machine learning and pattern recognition materials I learnt before. Some of them I only learnt on my own and had some loopholes, so it was good to have them solid in this course.  There are new theorems, new concepts and new applications, too, like the impossible theorem for clustering. I now know why some people hate clustering…

One unfortunately thing is that the main package used in the course is in Matlab. I admit it can still be sometimes useful though. I also took the opportunity and learnt Weka. Can be handy, too. The slides and exercises of the course can be found here: http://www.prcourse.net/about/

The campus of TUDelft was quite nice. A little resemblance to Utrecht but seems to be bigger. Had a lunch outside Aula on the grass!