Deep Neural Network Classifier

A Scikit-learn compatible Deep Neural Network built with TensorFlow

TensorFlow is a open-source deep learning library with tools for building almost any type of neural network (NN) architecture. Originally developed by the Google Brain team, TensorFlow has democratized deep learning by making it possible for anyone with a personal computer to build their own deep NN, convolutional NN, recurrent NN, that can be applied in a diverse array of fields. Scikit-learn is an open-source machine learning library with implementations for developing and perfecting numerous types of machine learning models. Both libraries feature high-level functionality that make designing models in Python relatively simple, but both libraries also have their limitations: Scikit-learn has no native implementation for neural networks, while Tensorflow has no built-in functionality to efficiently evaluate a wide range of network hyperparameters. We can overcome both these problems by developing a Scikit-learn compatible deep neural network class using TensorFlow. We can then take advantage of Scikit-learn built-in model hyperparameter tuning tools such as GridSearchCV or RandomizedSearchCV to optimize our deep neural network.

All the code is written in Python and available on GitHub on my machine learning projects repository. The main files are dnn_classifier.py, the Python file containing the classifier, and Deep Neural Network Classifier.ipynb, a Jupyter Notebook with the implementations of the neural network. I welcome any criticism/comments and the code will change as I improve it over time. This project was inspired and aided by Hands-On Machine Learning with Scikit-Learn and TensorFlow by Aurelien Geron.

Read More

Nasa Internship Report

Near Earth Asteroid Scout Attitude Control System Validation and Verification

Author’s Note: The following is a report of my work I completed while an intern at the NASA Marshall Space Flight Center (MSFC) in Huntsville, Alabama. This project was conducted in Winter/Spring 2017 with the Near Earth Asteroid Scout Control, Navigation, and Mission Analysis Team. [Numbers in brackets are citations that refer to references listed at the end]

Abstract

Near Earth Asteroid (NEA) Scout is a 6-unit Cubesat which will sail to an asteroid within one Astronomical Unit (AU) of Earth. Upon rendezvous with asteroid 1991 VG, NEA Scout will perform optical scientific observations in preparation for an eventual crewed expedition to an asteroid. NEA Scout is a solar sailing satellite, a unique class of spacecraft propelled primarily by the reflection of photons from an eighty-six square meter composite sail. In addition to optical data gathering and characterization of an asteroid, NEA Scout will demonstrate the feasibility of solar sailing technology for interplanetary missions. The Attitude Control System (ACS) for NEA Scout is composed of three primary actuators: Reaction Wheels (RW), the Reaction Control System (RCS), and an Active Mass Translator (AMT). The Guidance and Control (G&C) software which manages the ACS is developed in MATLAB and modeled using Simulink Block Diagrams and will be autocoded into C before being uploaded to the spacecraft. Before the code development can be completed, it must undergo extensive verification, to ensure that it satisfies all expected requirements, and validation, to assess if it fulfills the intended purpose. Validation and Verification (V&V) of the NEA Scout ACS consists of numerous smaller tasks that form part of the larger ongoing development effort. For each V&V step, scripts must be written, data must be gathered and analyzed, and changes need to be implemented based upon the results. Hardware sensors, including sun sensors, must also be tested both for accuracy and to ensure smooth integration with the complete ACS software. Validation and Verification is crucial to the development of a robust ACS in advance of final preparation of NEA Scout for launch on the Space Launch System (SLS) Exploration Mission 1 (EM-1) planned for 2018.

Read More

The Triumph Of Peace

A review of The Better Angels of Our Nature: Why Violence Has Declined

One-Sentence Summary: Human violence at all levels and timescales has substantially declined due to a set of forces which have subdued our destructive impulses while promoting our peaceful tendencies.

For such a positive idea, the central premise of Steven Pinker’s The Better Angles of Our Nature: Why Violence Has Declined is remarkably controversial. Whenever I dare to mention that the 21st century is the most peaceful in history, I am greeted not by shouts of joy but by a chorus of vehement opposition. Is it not only that people do not believe this concept, but that they seem to not want to believe that humanity is really getting better all the time. The idea runs counter to all popular narratives and is so shocking that it requires altering one’s entire mindset about the world in order to acknowledge it. Initially, I found it difficult to accept as well, but after enough exposure to the concept, I have been convinced that humans are indeed treating each other better now than ever before. As a result, I have gradually become a rational optimist, and while I still have concerns about our society, I sleep a little better at night knowing that when viewed through the lens of history, we are on the right track. Pinker’s 832-page masterpiece exhaustively covering this topic has been by far and away the most influential work in the shifting of my outlook.

Before Pinker, a cognitive scientist at Harvard University, can explain why violence has declined, he needs to convince us that conflict levels really have fallen, a difficult task in the negativity-dominated media culture of today. Unlike a news broadcast though, Pinker does not need to rely on anecdotes because he can draw on statistics from hundreds of studies conducted all over the world. Amidst all the statistics is one dominant theme: violence on all scales has declined throughout the course of human history. Pinker breaks up this long gradual decrease into six distinct movements. At one end, on the level of entire human civilizations and millennia, is the Pacification Process, characterized by the transition from hunting/gathering to permanent agricultural societies beginning roughly 12000 years ago. This era saw at least a five-fold reduction in rates of violent death as feuding tribes coalesced into the first cities and states with central governments which provided a check on the chronic raiding and wars that had been a daily part of life. At the other end of the spectrum, on the scale on individual humans, is the movement Pinker calls the Right Revolutions, beginning in the decades since World War Two and continuing through today. The past 60 years have seen a decline in personal violence such as abuse against spouses, children, and animals, and expanding rights and freedoms for previously denigrated minority groups. To cite a single figure, in this period, rape declined by 80% and went from a topic that barely even acknowledged as an issue to a cause that is seen as the responsibility of our society to address. In between the large civilization-wide and the small personal scale are four intermediate trends that illustrate how genocide, interstate conflicts, civil wars, homicides, domestic abuse, child abuse, bullying, and torture have all decreased to historical lows.

Read More

Home Of The Scared

A review of A Culture of Fear: Why Americans are Afraid of the Wrong Things

One Sentence Summary: At the safest and most prosperous time in US history, Americans have been driven into a state of perpetual fear by a constant stream of dire news and politicians eager to take advantage of a wary populace.

In the midst of the McCarthy communism scare, pioneering American journalist Edward Murrow told the nation on See It Now, “We will not be driven by fear into an age of unreason, if we dig deep in our history and our doctrine, and remember that we are not descended from fearful men.” Murrow’s words seem to have been all but forgotten today, with daily news shows providing us with a litany of scares to keep us up at night and politicians running exclusively on fear-driven platforms — fear of outsiders, fear of the future, fear of the upper class, fear of the lower class, and most concerning, fear of each other. Yet, even as Americans report feeling less secure, the country is demonstrably becoming a safer place to live. (One typical example: In 2014, over 60% of Americans estimated that crime was increasing when actually, violent crime has dropped 50% since 1991.) What has created and maintained this misconception of a more dangerous world that runs counter to all statistics? In A Culture of Fear, Barry Glassner attempts to answer this question with an illuminating trip through a number of recent scares created and spread throughout the American consciousness.

A Culture of Fear was first published in 1999 and as a result, the majority of the focus is on panic “epidemics” from the 1990s, including violent children, teen moms, rap music, and plane crashes. While some of these fears remain prevalent (CNN’s theme seems to be “never let a good plane crash go unreported”), I was struck by how little I had heard of some of the others. Multiple Chemical Sensitivity (MCS) and Road Rage, bogus afflictions said to be affecting large swathes of the American population two decades ago, have barely crossed my radar and never been presented as serious issues. Gradually, I realized that this only served to underscore the fleeting nature of these manufactured fears. They have disappeared because they never existed in the first place. Once the public eventually catches on, rather than retract the story, the media simply moves on to the next event sure to “end civilization as we know it.” The motto of modern news organizations is best described as “alarm, confuse, manipulate.” Alarm the public about a false danger, confuse them with misleading statistics or none at all, and manipulate them into consuming ever-greater amounts of coverage and supporting whichever political party the media happens to be aligned with.

Read More

Capstone Project: Mercedes Benz Greener Manufacturing Competition

Udacity Machine Learning Engineer Nanodegree Capstone Project

Author’s Note: This is the report I completed for my Udacity Machine Learning Engineer Nanodegree Capstone Project. All work is original and feel to use/expand upon/disseminate. [Numbers in brackets are citations to the sources listed in the references section].

I. Definition

Project Overview

Safety and reliability testing is a crucial step in the automobile manufacturing process. Every new vehicle design must pass a thorough evaluation before it enters the consumer market. Testing can be time-consuming and cost-intensive as a full check of vehicle systems requires subjecting the car to all situations it will encounter in its intended use. Predicting the overall time for a vehicle to pass testing is difficult because each model requires a different test stand configuration.[1] Mercedes-Benz has been a pioneer of numerous vehicle safety and technology features and offers a range of custom options for each model. Every possible vehicle combination must undergo the same rigorous testing to ensure the vehicle is robust enough to keep occupants safe and withstand the rigors of daily use. The large array of options offered by Mercedes means a large number of tests for the company’s engineers to conduct. More tests result in more time spent on the test stand, increasing costs for Mercedes and generating carbon dioxide, a polluting greenhouse gas. Efforts by Mercedes Benz and other automakers to improve the efficiency of vehicle testing procedures have mainly focusing on developing automated test systems.[2][3] An automatic test system eliminates the variability inherent in human behavior, is safer than allowing humans in the driver’s seat, and results in an overall more efficient evaluation process.

Read More