Preparing a Machine for the 2022 Predictive Analytics World All-Day Workshop

I will be presenting an all-day, hands-on machine learning workshop at the 2022 Predictive Analytics World (PAW) and Machine Learning Week (MLW) events, on Monday, June 20, in Las Vegas. See https://www.predictiveanalyticsworld.com/machinelearningweek/.


The PAW / MLW events have lots of interesting talks and workshops.

The workshop will look at advanced neural architectures and techniques too. A key difference between the PAW / MLW workshop and most machine learning workshops is that attendees will actually create predictive models on their laptops — rather than just hear me talk about them.

Each example will be presented using both PyTorch and Keras/TensorFlow programs on a Windows (10 or 11) machine.

To prepare a Windows laptop for the workshop, there are three main steps:

1. Install Anaconda3 v2020.02 with Python 3.7.6https://jamesmccaffrey.wordpress.com/2022/05/10/installing-anaconda3-2020-02-with-python-3-7-6-on-windows-10-11/

2. Install PyTorch 1.10.0https://jamesmccaffrey.wordpress.com/2022/05/10/installing-pytorch-1-10-0-on-windows-10-11/

and/or

3. Install Keras/TensorFlow 2.8.0https://jamesmccaffrey.wordpress.com/2022/05/10/installing-keras-2-8-0-on-windows-10-11/

The links/URLs above give detailed, step-by-step installation instructions. Most of my colleagues prefer PyTorch but a few prefer the simpler but less flexible Keras/TensorFlow. Workshop attendees can use either library, or both libraries. Seeing side-by-side examples using both libraries will vividly point out differences between the libraries. (I like both libraries equally).

Topics covered in the workshop will include:

Deep neural multi-class classification
Deep neural binary classification
Deep neural regression
Deep neural Natural Language Processing (NLP) using LSTM networks
Deep neural image classification using convolutional neural networks (CNNs)
Deep neural anomaly detection

The installation instructions above, with minor changes, also work for MacOS machines, but we won’t explicitly use Mac machines in the workshop (see below). Additionally, I intend to set up some virtual machines in the Azure cloud so that anyone who attends the workshop can have a hands-on experience if they want it.

Although it’s not necessary for attendees to run the demo examples, most (but not all) attendees in the past have commented that running the examples really helped them understand the topics. But interestingly, some attendees in the past have been happy just listening and taking notes in the traditional way — people have different learning styles.

I will be assisted by my colleagues Dr. Leo Betthauser and Sam Lauren. With the three of us, every attendee can get personal help with installing and running the example programs.


This is the event page that describes the workshop Leo, Sam, and I are presenting. I worked with Leo on a cyber-security project that uses deep neural Transformer Architecture. We’ll probably talk about that at the workshop.

Besides the deep neural topics, the workshop will also look at some non-neural ML techniques including:

Naive Bayes classification
Data clustering using k-Means
Weighted k-NN classification
Logistic regression with SGD optimization
Reinforcement learning with Q-tables
Multi-armed bandit epsilon-greedy algorithms

Check out the PAW / MLW web site — it’s one of my favorite events and I’m really looking forward to it.


MacOS Users: Installing Python 3.7.6 and PyTorch 1.10.0 on a Mac

Installing Anaconda Python and PyTorch on a Mac machine is very similar to installing on a Windows machine. This blog post has step-by-step instructions:

jamesmccaffrey.wordpress.com/2022/06/05/installing-pytorch-1-10-0-on-a-macbook-laptop/


MacOS Users: Doing Machine Learning on a Virtual Windows Machine in the Cloud

According to Wikipedia, overall, the usage of Windows machines (~74 percent) is significantly greater than MacOS machines (~14 percent). But for ML the usage percentages are not nearly as skewed. According to a 2020 Stack Overflow survey, for ML the numbers are 46 percent Windows, 28 percent MacOS, 27 percent Linux. Based on my experience and collaborations, I think those estimates are basically correct. I regularly use all three platforms for my ML work and have no strong preference — all three work very well.

The workshop doesn’t want to exclude MacOS users so I will support MacOS machines, but only indirectly. I will set up a handful (maybe 6-8) of virtual Windows 10 machines in the Azure cloud that have been pre-configured with all the Python / PyTorch / Keras software. To access a Windows 10 virtual machine from a MacOS machine, you need to use a program called Remote Desktop Client, sometimes called Remote Desktop Connection (RDC).

To install RDC on a MacOS machine, do an Internet search for “remote desktop client for MacOS”. You’ll find a link to the program on the Mac App Store web site. When I wrote this blog post the URL was https://apps.apple.com/us/app/microsoft-remote-desktop/id1295203466?mt=12 but it could be different by the time you read this.

The App Store documentation says you need MacOS 10.14 (released in September 2018) or later .

After you install RDC on a MacOS machine, to connect to a virtual Windows 10 machine for the workshop, you’ll need the IP address of the VM, a user name for the machine, and a password. Those will be supplied at the workshop. Only one person can connect to a VM at a time. The two workshop Lab Assistants will help MacOS users who run into problems.



Left: To use Remote Desktop for Windows on a Mac, use Finder to launch Remote Desktop then click the “Add PC” button. Right: The PC name is an IP address. Be sure to check the “Swap mouse buttons” box so that your Mac keyboard will work in a Windows way. Click “Add”. After the connection has been added, double-click on it. You will be asked for a user name (such as “user001”) and the corresponding password. After you connect, it will be exactly like you are sitting in front of the Windows machine you’ve connected to.


Developing ML systems on a virtual machine isn’t as efficient as developing on a local machine. The commands on a VM are exactly the same as those on a local machine, but on a VM, especially over a wireless connection, you can run into latency, bandwidth, and connectivity issues. When I run workshops at my large tech company, using VMs over a wireless connection usually works for up to about 6-8 people in a room until latency and connectivity issues start to take noticeable effect.

During the workshop, we will discuss doing machine learning on a virtual machine in the cloud, so we can see firsthand the pros and the cons of that approach. Briefly, ML systems are best developed on a local machine but then training on a virtual machine often works well. However, you must be prepared for dropped connections by saving training-state checkpoints, which is a bit tricky. We’ll see how to do that.




Here are three photos from the 2019 event.


This entry was posted in Keras, Machine Learning, PAW, PyTorch. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s