Read Latex

Tuesday, February 05, 2019

Computing and the Future HW 2: Exponential Growth, ML, Soft Logic, Delphi


Introduction


Last week we looked at exponential curves and their self-similar "hockey stick" shape. The analytical solution is developed here, the first of three promises I made to myself during an interesting introductory lecture. These curves, like exponential goldfish that grows to the size of their numerical bowl, are self-similar to within a scale factor. Then as the second of three math problems I extended an existing notebook on the prey-predator population equations making them an interactive simulation in this Python notebook, which takes about 3 minutes to load. The character of these equations is that the population of one species provides a scale factor for the others, thus, in some sense, they are also coordinate free or invariant with respect to absolute value. The same solution can be scaled to different absolute populations. In the graph below, a population of 15 could be 15,000 or 150:

Since I have also been an Calculus instructor at this college, I was also fascinated by a novel grading policy. In trying to understand its statistical properties I built this interactive simulation / numerical experiment that also takes a couple of minutes to load via the launch|binder button on github. I barely finished all three of these in time for class, but it was a fun sprint that left me breathless. Things that could still be added are Runge-Kutta fourth order solutions to prey, and a search for chaotic solutions.

This Week's Questions:

Q1: In the  course, "Information, Computing and the Future", HW2, 
       Dr. Daniel Berleant asks us to:

      "Estimate the doubling time of the software development productivity

       of the average programmer, if productivity increases at 6%/year."

A1: The short answer is about 12 years. The long answer is a non-trivial variant of last week's exploration. Using the symbol r for the rate of productivity in percent per year we write:


              the productivity at year 0 = n

              the productivity at year 1 = n*(1+r)
              the productivity at year 2 = n*(1+r)(1+r)
              the productivity at year y = n*(1+r)^y



Therefore programmer productivity doubles every 11 years, 10 months and 27 days if productivity increases by 6% per year.






Q2: In the  course, "Information, Computing and the Future", we are asked:

        "Discuss what topic(s) and format(s) [] considering for [] term project."

A2: Out of four topics I have three candidates described below. I would like to use a code demonstration format on a projected screen in real time.


I am interested in machine learning (ML) and functions that estimate future outcomes. In current ML practice there are:

  • convolutional neural networks (CNN's),
  • recurrent neural networks (RNN's) ,
  • generative adversarial networks (GAN's)
  • reinforcement learning (RL)
CNN's work over 2-D arrays that either are, or are similar to images. In my first homework I demonstrated the tensorFlow playground which is a great example of these. I have also used the source code to extend this example to use different basis functions to more quickly recognize difficult to distinguish patterns such as the spiral pattern. I could develop and use this as a semester project. It would have the advantage that I already have a running start. It would have the advantage for the class of showing them the CNN playground in a visual way. It would have the disadvantage of not being written by me from bare metal so in that sense would be derivative work. This could be combined with some hyperparameter exploration to determine the best CNN architecture to solve a given feature space. Here is a snapshot of the version I extended with the two spatial functions in the feature recognition column.




RNN's work over 1-D arrays that represent functions or signals changing over time. I am interested in their predictive power for functions, stock market signals and so forth. I am really interested in these and have coded them in the past. They would have also have the advantage of a running start. They are a simpler to understand and compare. They show the strengths and weaknesses of machine learning. They would make an effective classroom demonstration running in a Python Jupyter notebook which anyone interested in Machine Learning needs to pick up. Here is one that estimates periodic function values from the TensorFlow lecture on RNN's by Jose Portilla. 



GAN's use an agent (the generator) and a critic (the adversary) to generate and evaluate anticipated moves. They are useful for games like Go and Chess. I have little to no experience with these, but they are powerful mechanisms for machine learning. The same goes for RL.

CBL's Continuous Boolean logic (CBL), as opposed to the discrete Boolean logic we currently use. I invented this in July and call it "Soft Gate Technology". It is an architecture suitable for implementing fuzzy logic problems and may have application addressing the explainability problem in AI, raised in Homework 1. It also could be used to optimize AI, which is an extended discussion. It is a bare metal project that could be done in Jupyter Python. It is experimental, brittle and less likely to look polished a demonstration setting, but would be interesting for those exploring alternate computing architectures and reasoning systems. Here is what Soft Gate 'And" looks like when compared to hard gates we currently use. Compare the AND(HardRising, HardFalling) with the AND(SoftRising, SoftFalling) in the diagram below.





In summary my three candidate proposals are:

CNN: feature extension and hyperparameter optimization using TF Playground

RNN: demonstration for predicting signals over time.
CBL: Soft Gates & Continuous Boolean Logic as a future computing architecture

Some interactive discussion will help reveal the best choice.




Q3 Part AFor your question that we used the Delphi Method on in class, find the median and the range of the middle 50% of the responses. Using a graphics editor [] make a graph that is [] similar to the one in the lecture notes, showing the total range, middle 50% range, and median.

A3 Part A. Here is the graph from the lecture notes:

My initial question was:

When will Uber Flying Taxis happen?

This was sharpened to:

What month and year will 'Uber' Flying Taxis happen in Silicon Valley?

Tabulating the first and second pass results in the graph and statistics below. The Delphi Display has been transposed for compactness:



After two passes 4/10 of the respondents favored earlier dates while 3/10 favored later dates. The median response 1/2050 shifted by 1 month to 2/2050. The total range compressed from infinite - due to one respondent saying 'never", to the finite value of 45 years. The standard deviation compressed from undefined to 12 years. After some extended discussion the range of the middle 50% of the responses (which was actually the middle 40% since there were an even number of respondents) went from  1.1 years to 9.5 years, which was more reflective of the overall standard population deviation of 12 years.


Q3 Part B. Read up on the Delphi method on the Web Explain how the process that we went through in class differs from the process as described in the source you found.

In the classic Delphi method as described here, anonymity is more strictly enforced than we did in class, since our answers were submitted verbally rather than it writing. The results seemed to correlate slightly with the seating closeness of the respondents. Also the discipline of writing the answer before  stating it got a little looser towards the end as the discussion increased in speed and quantity.


Q3 Part C. Based on what you find out about the Delphi method, what shortcomings, risks, or other weaknesses do you see for the process that we followed in class? Also do you see a way to fix some of these, if we wanted to follow a more rigorous approach?


Strict anonymity of the responses, while retaining free flow of discussion could be accomplished by keeping the whole process in writing including distributing and picking up the response slips. An app could be built that would facilitate this in the computerized classroom setting. There are two parts to this, the date prediction activity, and the chat activity which could be made orthogonal in an application. Chat would not have to be automated in the classroom setting, simplifying the app to a simple authenticated ssh relay of some kind. Further rounds could be enabled until the answers and their accompanying statistics quit changing. An app would speed up the process of distributing and picking up slips by eliminating it.




Q4. Grad students only: [] Find reviews of the book online. Amazon often has them. Read the reviews and make sense out of them. For example, what things about the book can you glean from them? Do they all complain or praise the same things, or are they all different and make it hard to see anything about the book that many readers seem to agree on? Etc. This should be a complete analysis of the reviews such that there would not be anything much that someone might be able to add about the reviews.

I purchased the book, Human Race to the Future... by D. Berleant. Since this book is sold on Amazon there is excellent data in both quality and quantity reviewing the book. For verified customers there were 35 reviews, some lengthy and detailed, some abbreviated. Amazon publishes a summary of each review, the number of stars that quantify whether the user liked the book, the date of the review, and the number of users that found the review helpful.  There are two figures presented below, a spreadsheet summarizing each review and some statistics resulting from an analysis of the reviews. 




The following figure shows the mean and standard deviation and also the review value versus time.



The reviews were slightly bimodal in distribution:


I attribute this a to the fact that the 14 five star reviews were made by people primed to appreciate the material. It is an impressive feat that the majority of the reviews were at the top of the ranking scale. Those who weren't as enthusiastic about the material, approach or timeline chosen were more reserved. Two of the three star reviews were made by people (#32 and #43) who couldn't or didn't spell properly including one who wanted, 'MOAR SCIENCE'. Oh well. Those who made more lengthy reviews tend to be ranked as more "Helpful" by other users.

I'm looking forward to a deep dive into this book to be done as a set of consecutive incremental reviews that accumulate here.