Posts

Setting Up Tensorflow (with CUDA) for Windows 10

Image
Below are some of my rough notes on how I've setup my Windows 10 laptop to use Tensorflow with CUDA. My reference: http://www.heatonresearch.com/2017/01/01/tensorflow-windows-gpu.html https://www.tensorflow.org/install/ Install the following NVidia drivers: CUDA Drivers (http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows). Currently it's CUDA Toolkit 8.0. Can install using the installer downloaded. CUDNN - CUDA for Deep Neural Networks (https://developer.nvidia.com/cudnn). Currently it's 5.1. Once extracted, place the files in the respective directory along with the other CUDA files in the NVIDIA Toolkit folder Setting up Tensorflow (CPU) Setting up Tensorflow (GPU) Note: It's 22/2/2017 now and Google have recently released their Tensorflow 1.0, which might've rendered the above guide obsolote (i've haven't tested them yet). Update (23/2/2017): The above basically creates 2 new anaconda instance for you to pla...

Running a separate H2O instance from R

Traditionally in R, an H2O instance that is created using h2o.init() will be shared by everyone else. This poses a problem since because the resources (threads) are shared - everyone can't basically do work at the same time. While h2o.init() itself has a function to specify which port and ip, it is currently buggy since you can't initiate an instance without using the 54321 port. To work around this, you'll need to initiate an h2o instance externally from unix. From there, you can then connect directly to your defined instance.In addition, connecting to an instance in this manner provides another layer of protection, since you're no longer relying on libraries that are loaded in R (libraries that are loaded in R can be removed by other users using RStudio). You may use the following command to: 1. Create h2o instance externally 2. Connect to your h2o instance from R. So basically from R; launchH2O system(command = launchH2O, intern =FALSE, wait=FALSE) h2o....

Create ad hoc wifi network and monitor mobile traffic

Image
1. First off, ensure that you have a wired connection to your laptop. 2. Using Lenovo Access Connections, ensure that your laptop is connected to your LAN. 3.  Go to 'Mobile Hotspot'. Fill the necessary details. Start the network. 4.  From your mobile, you should be able to see the SSID. Connect to it. 5. From Windows, find out which network is your wifi using. In our case it's 'Wireless Network Connection 7.  6. Initially you will not see the connection being able to connect to the internet. 7. Go to Local Area Connections. 8.  Go to Properties, then Sharing. Enable your sharing to allow your adhoc wifi network to connect to the internet via your LAN. 9.  Allow the needed services. 10. OK everything. 11. Wait for a few minutes to allow the changes to take place. 12. Your mobile should now be able to connect to the internet vi...

Transfer Data from RDBMS to Hadoop Using Sqoop/Oozie/Hue

Image
A lengthy title. I know. Cutting to the chase, I needed to transfer data from my RDBMS to a Hadoop cluster and I only had access to Hue/Oozie (since I’m not an admin). I knew that I could use Sqoop to do it — but I’ve never really done it before. It was freaking hard/annoying! So to help others out there who might be in a similar predicament as I was, here are some 101. 1. I assume you already know how to use the Workflow Editor, so from there, create a new Workflow. 2.  Drag a Sqoop action from the panel above and click OK. 3. You’ll get some pre-filled sqoop command in there which you can use as reference. Hop to Apache Sqoop to learn more about all available arguments you can use. 4. There’s 2 way you can go about entering the Sqoop command from here on out. You can either type in the Sqoop command in the text box, OR if you’re thinking of using a query in your command, my recommendation is to use the argument window. The latter is based on a post ...

Natural Language Processing by Stanford

Image
Below is a great course by Stanford University on Natural Language Processing. There hasn't been any recent sessions as of late in Coursera, but you can still access the archive at this  link. I'm currently working on my capstone for the John Hopkins Data Science Specialization, where we're asked to build a data product that is able to predict the next sets of word based on what users type into a textbox - similar to stuff like Google Autocomplete or Swiftkey. Pretty psyched about it - looking forward to the challenge! :)

Behavioural Economics

Image
Below are a few notes (most are copy pastes) of stuff that I've covered during my time at Dilip Soman's Behavioural Economics online course at edX. The topic is a recent interest of mine after spending some time earlier this year learning about social graphs and basic graph theory in general. So as a natural extension to that, a question that comes to mind is, how do people make purchasing decision? The notes have been mostly compiled in Slack - somehow I kinda take a liking in the way the notes there get formatted. It's relatively easy too - perfect for lazy people like myself. Below are the public links of my notes in Slack with regards to the topic: Early General Notes A Theory of Decision Points Choice Overload   Glossary of Concepts Consumption Vocabulary Recent Nudge Experiments Decision Aids Disclosure One thing that I really like about the course is that it also talks about how to conduct experiments should you have an idea that you'd like ...

Geospatial Display with Shiny

Image
One of the reason I like to join these online courses are that it gives you the chance to meet with people from different backgrounds, industries and countries. In this particular post, I'm quite amazed with the dedication and thought that was put in by one of my classmates. The assignments required that we create our own data product using R - so that we become a wholesome data science practitioner - we acquire data, process, model, document, and create data products for others to consume. It's one thing for doing assignments for the sake of completing the course, it's another to produce a beauty such as the above. You may explore the Shiny app here at this link , and have a look at the forked source code here . I've forked it since I know I'll be making use of this in times to come.