Data Science for Business Leaders

Perusing the course catalog on Data Camp I came across an interesting course called Data Science for Business Leaders explaining in a non-technical manner how businesses can use data to strengthen their organization.


I admit right off the bat that this was probably the first course on DataCamp I was disappointed with. As an aspiring data scientist for the industrial internet of things, my depth of knowledge regarding data usage to solve business problems obviously surpasses a non-technical course like this, but I wasn't going into it to learn a new technical skill, rather, I was looking to improve my ability to communicate the value proposition I would bring (data science) to an organization. In other words, how can I explain the benefits of complicated topics such as recommendation engines and AI chat bots to a non-technical audience?


My primary criticisms of the course revolve around the vacuum the topics were presented in; the organizers simply failed to set the scene. Rather than starting with "what is data science", start with understanding the pain points of companies: trying to better understand customers, improve engagement, reduce operational costs, optimize resource utilization, data-based decision making, and more. Instead, this course rambled from relational databases to explainable AI with no logical flow (other than progressively more complicated topics) and in that regard they dropped the ball. DataCamp, as always, did an excellent job with the example problems, such as A/B testing (on which they have an entire course), but I didn't feel it made up for the lack of context and flow for this course.


Naturally, I was not the target audience for this course, so it's easy to dismiss my criticisms and there were many positives to take away. It's also entirely possible I missed the purpose of the course - "what is data science" rather than "how data science can help organizations". Ultimately I think this course fails because it doesn't connect the two.

Microsoft IoT Course 2 - Introduction to Device Programming: C Edition

This course is a rather gentle introduction to C and while I've already covered this C programming extensively in other courses, books, tutorials, etc., there is always something to pick up when taking on projects and the point of taking this professional program was to formalize things I've learned piecemeal about IoT in general, and Azure in particular. And I'm glad I have.


As shocking as it was, this Microsoft course started off by installing Ubuntu linux inside Windows. Essentially, we needed the Bash console, gcc, gnu make and other tools. Still, I did not see that coming! So already, it's been worth it to see how you can get Ubuntu's Bash terminal running inside Visual Studio. But on top of that, I also get to use a new microcontroller, the MXP AZ3166 with an STM32 MCU. This is the Azure IoT dev-kit and has a number of on board sensors like a magnetometer, pressure, temperature, humidity, accelerometer & gyroscope, microphone, headphone jack, IR and more. Pretty neat package in such a small form-factor (micro:Bit).


Module two builds a binary counter as a project and deploys it remotely to the Raspberry Pi 3 and the AZ3166. The binary counter is simply an exercise in binary and using GPIO for the LEDs to display the values (3 LEDs can represent 2^3 = 8 [values], which is 0 - 7). Thus, the LEDs lit up as 010 would mean two.


Pretty basic stuff so far, but it's always good to revisit the basics once in a while. It's really course 3, which is all about connecting to Azure IoT Hub that things will start to get interesting in a hurry.


This post will be updated as the remaining projects for this course are developed.

CUDA is Working!

During my graduate class in Machine Learning at Iowa State, I was given access to the University's High-Performance Computing cluster. Having never heard of parallel processing (or HPC in general), I wasn't able to take advantage of the opportunity and towards the end of the semester my ignorance came back to haunt me since I was unable to run as many variations of my reinforcement learning algorithm to find an optimal set of hyperparameter configurations.


Now that the semester is over, it's time to regroup over the Summer. C++, ROS, CUDA, a graduate level robotics course and physical manifestations of my virtual models are all being done. To get a jump into CUDA, I purchased a GeForce 1660 Ti GPU that NVIDIA has assigned its highest computing capability score of 7.5.



Originally, my plan was to install this card without connecting to monitors and just have it for CUDA, however, the drivers would not properly install or the card wasn't recognized without being in the primary PCI slot. This is unfortunate because the card has one DVI, one HDMI and one DisplayPort and I have two DVI monitors to connect. Maybe a splitter would work here. But if I keep it at the primary, I began to wonder how SolidWorks might improve so obviously there is some more experimenting to do here.


Along with the GPU, I have CUDA for Engineers, however this book, at only two years old, has already been a source of frustration in the appendices that discuss hardware and software installation - primarily due to Visual Studio 2019 (which I have zero experience with) compared to the earlier version of VS the book uses. To me it looks like VS is trying to be a jack-of-all-trades with Azure, Python, C++, Android, iOS, etc. so it's not even clear what I need to install just to get C++ to compile and run. 50GB installed later and some searching on NVIDIA's website and I got the deviceQuery sample code to build and run! Stellar moment.


CUDA is working!

Reinforcement Learning with Hindsight Experience Replay

My final project for my graduate class in Data Analytics and Machine Learning for Cyber-physical Systems was a comparative study of DDPG with Hindsight Experience Replay using a Fetch robot in OpenAI Gym. The result of using HER with training data and a sparse rewards system virtually eliminated the exploration problem of classic reinforcement learning and showed an astounding learning rate for the robot. The video below shows the robot already able to grasp and move the cube to the red target location. What is amazing is that this is the very beginning of the first training session.


You can read the original research paper by the team behind the development of HER here.


Displaying Android Notifications as Native Mac Notifications

Years ago, I recall being able to display Android notifications on my Windows computer. After observing native notifications on my MacBook Pro I started to wonder if I could build something to display notifications from my Nexus 6 as native notifications on the MacBook. Full disclaimer: I'm not a Computer Science major or professional programmer. I'm just a guy who likes to program by making things work. I want to also stress I am brand new to macOS so there may be better ways of doing everything I work on, but this is my approach.


I broke this project down into three phases, but note this is not remotely complete so most of this will probably change; for now, this is my thought. First, I'll need an Android app that has permissions to monitor all notifications. Once a notification is found, a post will be made to a handler on Google App Engine (part two) which will save the notification in the datastore until it is read, after which it will be deleted. Finally, the third part will involve a local Python script (possibly a local web app if it needs a UI) on the MacBook that will query GAE for any new notifications and display them using AppleScript in the system notifications.


Since I have loads of experience with App Engine and Android, the big challenge of this project is the local Python script that takes a web response and displays it as a native macOS notification. The first step was to install "requests" Python package just to make it easier to make/process web requests.


pip3 install requests

The next decision was how GAE would respond. Basically, the response is a string of a dictionary with the name of the app that posted the original notification and the message of the notification. I fired up the App Engine SDK and made a simple handler to respond to the local request (next step). For right now, this is just a fixed string simply to work on the local Python app.


{'App': app-name, 'Message': app-message}

GAE automatically makes this a string, so I needed to do a literal_eval to turn it into a dictionary.


import ast    # import the ast library

# d is a dictionary
d = ast.literal_eval(requests.get('http://localhost:8080/android/').text)

Finally, a simple function is created to display the notification.


def notify(title, text):
    '''Display a native macOS notification with the title and text'''
     os.system('''
              osascript -e 'display notification "{}" with title "{}"'
              '''.format(text, title))
    

This displays the most basic notification.


And so far, that's it. A basic Python script to process a dictionary of the app name and its notification, then display it as a local notification. So far, so good.

From Windows to Mac and My Future with Android

I received my first personal computer (an HP desktop) as a Back Friday deal in 2004. With the exception of a Sony Vaio Fit 15E, I have owned HP computers ever since and to date, only the Sony remains. The Sony Vaio's battery was atrocious the day I bought it; it didn't last the 2.5 hour trip from Omaha to Ames. Admittedly, I didn't think of battery life when I purchased it because I wasn't mobile then - I was more concerned with processor, RAM and the touchscreen it came with. These days, however, I am very mobile and I need a powerful laptop that can go the distance battery wise, and it needs to just work. As much as I loved Ubuntu, I had nothing but problems getting hardware to work - there seemed to be half a dozen ways to fix every problem and few were ever real solutions - and as a business owner, time was money. Lessons learned: I will never own another Sony anything nor will I put Ubuntu on anything.


Today, I am finding myself having to be very mobile, yet learning to tackle serious data science and optimization problems. With an hour and half break between classes I can't afford to spend a third of that trying to find a table in the library with an outlet so I can plug in just to work. I needed a laptop with a battery that could last, and a processor and a good deal of RAM.


So here I am with a MacBook Pro 15 (latest and greatest edition I could find). And wouldn't you know it, the first question my wife asks is if I'm going to switch from Android to iPhone. I admit, I didn't understand her question, because my choice of laptop wasn't a battle between Google and Apple, it was between Windows and Apple; my badass Nexus 6 had nothing to do with it.


For the most part, I am not a fan of Apple, and this laptop is a prime example of why. There are zero (0!!!!) usable ports on this thing besides charging. Apple, in their infinite wisdom, put four USB-C ports and one headphone jack. Now why they put a headphone jack on their best laptop when they couldn't be bothered to put it on their flagship phone is beyond me, but to put four useless USB ports without including a single industry-standard USB-A port is just plain stupid and arrogant. This laptop came with a free pair of Bluetooth Beats headphones which ironically only included a USB to mini-USB cable - a $299 pair of headphones that can't plug into the $2700 laptop I purchased. I can't even begin to explain their logic. Wanting to be more productive I also purchased a Magic Mouse 2 wireless mouse which came with the same USB cable as the headphones, which can't plugin to the damn laptop!!!


With the exception of the USB ports, my MBP has been a near flawless experience. I am addicted to Windows's window management snapping features, so after some frustration I purchased an app from the App Store that could provide the same functionality. The second problem has been the lack of speed of the trackpad and wireless mouse, but a little internet searching (yes, reminding me of Ubuntu days) provided a command-line hack to speed up the tracking.


The final, and most worrisome experience has been the screen. The space between the screen and the keyboard is almost non-existent, so much a problem in fact that I am developing marks on the screen from the keyboard (in a $2700 laptop that isn't a month old), a problem that is amplified by placing the laptop in a backpack that has a standalone padded sleeve. I have two permanent marks embedded in the screen and am searching for a better solution than a small stack of printer paper covered with two eye-glass cleaning cloths. A $20 solution on Amazon (essentially a larger eye-glass cleaner) only covers the keyboard, and yet the first mark to occur closes on the laptop where my wrists lay, not where the keyboard touches the screen. The internet is not alleviating my concern because there is a plethora of other users with the same problem.


Outside of these issues, my main problem with Apple is its lack of cross-platform use. Half my family has iPhones and the other half doesn't. So trying to video chat family to see my 8 month old daughter means having multiple apps on multiple devices. Apple has FaceTime and iMessages. Then there is Google with Hangouts (becoming exclusive to Business???) then Google Duo, Google Allo, and Messages, with the same questionable overlap as Gmail and Inbox. Add to this the most ubiquitous of these communication technologies, Skype, but I will end the list here because I don't care for Facebook (Messenger), WhatsApp, Snapchat, etc. Frankly, this is a pain in the ass. I'm not against innovation but the overlap in applications sends a poor message. Adopting Apple doesn't work for half my family, yet adopting Google apps can all-too-often be short lived before I have to migrate to their replacements.


The reality is I do all my development work on Google's platforms - Android and Google Cloud. I'm a GSuite subscriber and school uses GSuit as well. But Google isn't a hardware manufacturer, they are software (and software primarily involved in collecting data for advertising). In playing around with an iPhone, I just didn't care for it, however, I have a big reason to reconsider and that is support. My Nexus 6 is no longer receiving the new Android OS upgrades which pisses me off since I've only owned the phone for a few years. Think about today's mobile phone acquisition model: lease or pay for the phone outright. Do I really want to buy a $750+ phone that's only supported for a couple of years?


The struggle here stems from the fact that I do not want the latest and greatest - I want the best hardware that will last for quite a while. I built my own desktop computer in 2009 and this MacBook Pro and the Dell XPS are the first computers I've seen with comparable hardware. I want stellar hardware that will last me many many years. Ultimately, when I looked at the Dell XPS and the latest MBP, I went with Apple simply because I already had a pile of dead Windows machines collecting dust. I hope this thing lasts.

Intro to Python for Data Science Course

This semester my Intro to Data Science course, which is part of the new Data Science Minor at Iowa State University, provides us with free access to DataCamp courses, and yesterday I completed the first course: Intro to Python for Data Science.



You can also see a copy of the certificate on DataCamp here.

The Data Science Minor at Iowa State University

In the Spring of 2017 Iowa State University approved the creation of an undergraduate minor and a professional certificate in data science. Both the minor and certificate require the three established data science courses below.


  • descriptionDS 201X - Introduction to Data Science
    Data Science concepts and their applications; domain case studies; overview of data analysis; major components of data analysis pipelines; computing concepts for data science; descriptive data analysis; hands-on data analysis experience; communicating findings to stakeholders, and ethical issues in data science.
  • descriptionDS 202X - Data Acquisition and Exploratory Data Analysis
    Data acquisition: file structures, web-scraping, database access; ethical aspects of data acquisition; types of data displays; numerical and visual summaries of data; pipelines for data analysis: filtering, transformation, aggregation, visualization and (simple) modeling; good practices of displaying data; data exploration cycle; graphics as tools of data exploration; strategies and techniques for data visualizations; basics of reproducibility and repeatability; web-based interactive applets for visual presentation of data and results.
  • descriptionDS 301X - Applied Data Modeling and Predictive Analysis
    Elements of predictive analysis such as training and test sets; feature extraction; survey of algorithmic machine learning techniques, e.g. decision trees, Naïve Bayes, and random forests; survey of data modeling techniques, e.g. linear model and regression analysis; assessment and diagnostics: overfitting, error rates, residual analysis, model assumptions checking; communicating findings to stakeholders in written, oral, verbal and electronic form, and ethical issues in data science.

To satisfy the requirements for the minor you must also take two additional courses (domain-level). The current list of approved courses can be found in the proposal but it's important to note that this is a very fluid situation right now. The list of approved courses is being evaluated every month with more courses being added. As an example, industrial engineering optimization is currently approved, but mechanical engineering optimization is not. Looking further into the current list of approved courses there are no mechanical engineering courses approved yet, which makes me suspect they haven't been evaluated at all rather than believe they simply lack courses pertinent to data science.


This is an exciting time to be in data science and having an opportunity to be part of the experimental curriculum at Iowa State is outstanding. I can't wait to see where I can take this.

Air Force's X-37B's New Orbital Record

The U.S. Air Force's robotic X-37B space plane has now spent 675 days in orbit, breaking the previous program record of 674 days.



The purpose of the X-37B is unknown, however, the Air Force has always stressed the space plane was primarily built to test reusable spacecraft technologies such as navigation and control systems, TPS, avionics, autonomy and more. You may recall the X-33 scale prototype that was built to test similar technologies and was nearly 75% complete when it was cancelled by NASA. Where the X-33 was built by Lockheed-Martin, the X-37B is a product of Boeing.

AIAA Congressional Visit Day

I'm pretty excited that AIAA Congressional Visit Day (CVD) is fast approaching. It will be my first year travelling to DC for a day of advocacy and awareness with national decision makers. What's even more interesting is that this is a national AIAA event, not limited to our student branch, which means I'll have to opportunity to meet aerospace professionals from across the nation. Sounds like an opportunity to put my best foot forward and learn something.


I don't know if it's normal or not, but my preparations for CVD have been quite extensive. Just learning about the process of making appointments, understanding Hill visits, learning AIAA's position on key issues and learning more about the position of my audience (the representative) on past issues makes this quite a bit of work. On top of that I have been tasked as a team leader on my first year participating, so no pressure right?


This year we are trying to target specific leaders from states we have work experience in. For example, if some members have worked in Iowa for Rockwell Collins or UTC Aerospace, we have scheduled meetings with representatives from Iowa. Just to be clear, we are not there as advocates of those companies (we are still the voice of AIAA), but from the list of issues AIAA is concerned with we can pick those that would actually relate to those representatives. As far as I'm aware, there aren't any AIAA students from Kansas attending so we have meetings scheduled with Lynn Jenkins and Kevin Yoder as well as those from Wisconsin.


Anyway, the meetings are made, plane tickets bought, hotels reserved, transportation plan is in place (if Uber doesn't go out of business by Wednesday) and confirmations received. I'm pretty excited.

New Book: Data Science from Scratch

New book for April's reading list: "Data Science from Scratch", (ref to as Scratch from now on) by Joel Grus. As the name suggests (and is flatly stated on Amazon), "Data science libraries, frameworks, modules, and toolkits are great for doing data science, but they’re also a good way to dive into the discipline without actually understanding data science."


So if I've already learned a bit of NumPy, pandas, etc., then why study this book? Had this book been out when I started learning data science, I would have started with it. Regardless, there are a few reasons to take a step back and read this book.


First, I wanted exactly what this book promised - to understand more about data science than how to use the libraries, frameworks, etc. Second, I feel Scratch covers a bit more material. There are 24 chapters from probability and statistics, to machine learning, regression, neural networks, natural language processing and more.


Lastly, and most importantly, the writing of this book is what sold me. My favorite technical book series is "Head First" from O'Reilly, which teaches you as if you were on the job. For example, cleaning up data Coach Kelly has been collecting on his athletes so he can make better decisions. Although Grus is much wittier , he approached his book the same way in chapter one with "DataSciencester," a mock social network for data scientists in which the reader works through five data science projects on the social network data.


It remains to be seen if this book can deliver past Chapter 1 (my money says it will). April is the last month of the semester, so preparing for finals starts now. Hopefully I can still get some quality time with Data Science from Scratch.

Welcome to the New Website Design

Welcome!


After many months of planning, I've finally started rolling out my new website design. As you can see, it's mostly empty right now as I haven't updated the old database entities for the new models yet. I'm actually on the fence about updating all the old stuff - there's something refreshing about starting from scratch.


The new website design is actually just for me. The majority of my larger projects - robotics, home automation, aquaponics, all have Android applications that go with them. This website serves as the web interface and it's more pleasant when the web and mobile experiences are consistent (yes, always with the brand management).


If you're here looking for a specific post, I have not updated the older entries with the new entity model and I'm actually not sure if I ever will. There's something refreshing about starting from scratch.