
Sign up to save your podcasts
Or


O'Reilly's 2017 Data Science Salary Survey finds that location is the most significant salary determinant for data professionals, with median salaries ranging from $134,000 in California to under $30,000 in Eastern Europe, and highlights that negotiation skills can lead to salary differences as high as $45,000. Other key factors impacting earnings include company age and size, job title, industry, and education, while popular tools and languages—such as Python, SQL, and Spark—do not strongly influence salary despite widespread use.
LinksExplains the fundamental differences between tensor dimensions, size, and shape, clarifying frequent misconceptions—such as the distinction between the number of features ("columns") and true data dimensions—while also demystifying reshaping operations like expand_dims, squeeze, and transpose in NumPy. Through practical examples from images and natural language processing, listeners learn how to manipulate tensors to match model requirements, including scenarios like adding dummy dimensions for grayscale images or reordering axes for sequence data.
LinksTensor: A general term for an array of any number of dimensions.
NDArray (NumPy): Stands for "N-dimensional array," the foundational array type in NumPy, synonymous with "tensor."
Adding Dimensions:
Removing Singleton Dimensions:
Wildcard with -1:
Flattening:
Practical workflow of loading, cleaning, and storing large datasets for machine learning, moving from ingesting raw CSVs or JSON files with pandas to saving processed datasets and neural network weights using HDF5 for efficient numerical storage. It clearly distinguishes among storage options—explaining when to use HDF5, pickle files, or SQL databases—while highlighting how libraries like pandas, TensorFlow, and Keras interact with these formats and why these choices matter for production pipelines.
LinksData Sources and Formats:
Pandas as the Core Ingestion Tool:
Data Encoding for Machine Learning:
HDF5 for Storing Processed Arrays:
Pickle for Python Objects:
SQL Databases and Spreadsheets:
Typical Process:
Best Practices and Progression:
NumPy enables efficient storage and vectorized computation on large numerical datasets in RAM by leveraging contiguous memory allocation and low-level C/Fortran libraries, drastically reducing memory footprint compared to native Python lists. Pandas, built on top of NumPy, introduces labelled, flexible tabular data manipulation—facilitating intuitive row and column operations, powerful indexing, and seamless handling of missing data through tools like alignment, reindexing, and imputation.
LinksPurpose and Design
Memory Efficiency
Vectorized Operations
Relationship to NumPy
2D Data Handling and Directional Operations
Indexing and Alignment
Handling Missing Data (Imputation)
Use Cases and Integration
Summary: NumPy underpins high-speed numerical operations and memory efficiency, while Pandas extends these capabilities to powerful, flexible, and intuitive manipulation of labelled multi-dimensional data -together forming the backbone of data analysis and preparation in Python machine learning workflows.
After a year of job hunting, the host's answer to whether you need a master's for machine learning work is yes: certificates like Udacity Nanodegrees build a portfolio but don't count as credentials, and Georgia Tech's online OMSCS is a low-cost route. Also covers what a portfolio needs, how hiring differs from web development, and when a PhD is worth its years.
LinksMachine Learning Applied (MLA) is the free companion to Machine Learning Guide: shorter, practical episodes on careers, tools and libraries. This first one revisits MLG 006, on certificates and degrees, after a year of the host's own job hunting in machine learning, up to May 2018.
Who needs what?Udacity Nanodegrees and Coursera Specializations teach well and show you can finish hard work on your own, but they aren't accredited, and in the host's talks with hiring managers and recruiters neither counted as a credential. Udacity is now part of Accenture, which bought it in 2024, and sells Nanodegrees through a monthly subscription. On Coursera, DeepLearning.AI's Deep Learning Specialization and Andrew Ng's Machine Learning Specialization are the common machine learning picks.
What goes in a portfolio?One to three GitHub projects you can walk an interviewer through from start to finish: cleaning data with pandas and NumPy (MLA 002), exploring it, then building and evaluating a model in scikit-learn or a deep learning framework. Have it before you apply, whatever your degree.
Bachelor's or master's?In web development, a bachelor's on a job listing is a soft requirement; the host's colleagues included bootcamp graduates, people self-taught through sites like Codecademy, and people with degrees in other fields. In machine learning, "master's or PhD preferred" works closer to a requirement. The host, with a bachelor's in computer science, found machine learning work through people who heard this podcast; his direct applications got no interviews, and recruiters put that down to the missing master's. His advice: if you have a bachelor's, get a master's. Entry-level hiring has tightened since: SignalFire puts new-grad hiring at 12 big tech companies down about 65% from 2019 (MLA 030).
What does an online master's cost, and how long does it take?Research scientist roles, at labs like Google DeepMind and Meta, are where a PhD counts. Machine learning engineer and applied AI engineer roles hire many people with a bachelor's or master's and strong software skills. A PhD takes years of long weeks. The host's suggestion: finish a master's first, by which point you'll know whether you want research; if you do, carry on to the PhD.
The episode's $300,000, from 2018 forum posts, was research and PhD pay in Silicon Valley. On levels.fyi in November 2026, US median total compensation is $310,182 for research scientists and $289,000 for machine learning engineers. MLA 006 covers salaries.
More in the resources. Next: MLA 002, on NumPy and pandas.
Reinforcement learning (RL) trains an agent to act in an environment from rewards alone; agents are model-free or model-based and learn by policy gradient or value-based methods. Also covers PPO and DQN, credit assignment, Gymnasium, current RL frameworks and where to learn RL.
LinksReinforcement learning (RL) is the third kind of machine learning, beside supervised and unsupervised. An agent acts in an environment and learns from rewards and penalties, not labeled examples. Uses include Go (AlphaGo beat Lee Sedol in 2016), Atari and Doom, self-driving cars, walking robots and trading.
DeepMind's Differentiable Neural Computer (2016), a neural network with learned external memory, targets the reasoning, knowledge representation and memory that AI still leaves open.
Supervised learning vs reinforcement learning for tradingSupervised learning predicts the next price from past prices, or learns buy, sell and hold from expert labels. An RL agent learns to trade by making and losing money, with portfolio value as the reward. MLG 026 is the Bitcoin trading project.
Credit assignment and the discount factorRewards arrive late: a purchase costs commission now, gains later. The credit assignment problem is finding which earlier action earned a later reward. The discount factor γ, between 0 and 1, weights future rewards against immediate ones; with value estimates, it addresses credit assignment.
return G = r1 + γ·r2 + γ²·r3 + … Model-free vs model-based reinforcement learning"Model" means a model of the environment's transition dynamics: which state follows an action. A model-free agent reacts: its policy network maps observations to actions. A model-based agent is given or learns the dynamics and plans with them. AlphaGo and AlphaZero pair neural networks with Monte Carlo tree search over known rules; MuZero learns its model. Even model-free PPO learns to run in MuJoCo (Multi-Joint dynamics with Contact) simulations.
Policy gradient vs value-based methodsNeither wins outright; test both like hyperparameters (MLG 027).
Reinforcement learning frameworksOpenAI Baselines, Tensorforce, Intel's Coach and rllab are unmaintained; rllab became garage. Most RL code is now PyTorch:
OpenAI Gym continues as the Farama Foundation's Gymnasium, an API standard plus reference environments. A custom environment subclasses gymnasium.Env and implements reset and step. MuJoCo has been free since 2021 and open source since 2022; Gymnasium ships MuJoCo environments.
CartPole is the hello world: push a cart left or right to keep a pole upright, +1 per step it stays up.
Where to learn reinforcement learningIn order:
Next: MLG 032, on similarity and distance metrics.
Notes and resources: ocdevel.com/mlg/28
Try a walking desk to stay healthy while you study or work!
More hyperparameters for optimizing neural networks. A focus on regularization, optimizers, feature scaling, and hyperparameter search methods.
Hyperparameter Search TechniquesFull notes and resources at ocdevel.com/mlg/27
Try a walking desk to stay healthy while you study or work!
Hyperparameters are crucial elements in the configuration of machine learning models. Unlike parameters, which are learned by the model during training, hyperparameters are set by humans before the learning process begins. They are the knobs and dials that humans can control to influence the training and performance of machine learning models.
Definition and ImportanceHyperparameters differ from parameters like theta in linear and logistic regression, which are learned weights. They are choices made by humans, such as the type of model, number of neurons in a layer, or the model architecture. These choices can have significant effects on the model's performance, making them vital to conscious and informed tuning.
Types of Hyperparameters Model Selection:Choosing what model to use is itself a hyperparameter. For example, deciding between linear regression, logistic regression, naive Bayes, or neural networks.
Architecture of Neural Networks:They transform linear outputs into non-linear outputs. Popular choices include ReLU, tanh, and sigmoid, with ReLU being the default for most neural network layers.
Regularization and Optimization:These influence the learning process. The use of L1/L2 regularization or dropout, as well as the type of optimizer (e.g., Adam, Adagrad), are hyperparameters.
Optimization TechniquesTechniques like grid search, random search, and Bayesian optimization are used to systematically explore combinations of hyperparameters to find the best configuration for a given task. While these methods can be computationally expensive, they are necessary for achieving optimal model performance.
Challenges and Future DirectionsThe field strives towards simplifying the choice of hyperparameters, ideally automating them to become parameters of the model itself. Efforts like Google's AutoML aim to handle hyperparameter tuning automatically.
Understanding and optimizing hyperparameters is a cornerstone in machine learning, directly impacting the effectiveness and efficiency of a model. Progress continues to integrate these choices into model training, reducing the dependency on human intervention and trial-and-error experimentation.
Decision TreeTry a walking desk to stay healthy while you study or work!
Ful notes and resources at ocdevel.com/mlg/26
NOTE. This episode is no longer relevant, and tforce_btc_trader no longer maintained. The current podcast project is Gnothi.
Episode OverviewTForce BTC Trader
The project "Bitcoin Trader" involves developing a Bitcoin trading bot using machine learning to capitalize on the hot topic of cryptocurrency and its potential profitability. The project will serve as a medium to delve into complex machine learning engineering topics, such as hyperparameter selection and reinforcement learning, over subsequent episodes.
Cryptocurrency, specifically Bitcoin, is used for its universal and decentralized nature, akin to a digital, secure, and democratic financial instrument like the US dollar. Bitcoin mining involves running complex calculations to manage the currency's existence, similar to a distributed Federal Reserve system, with transactions recorded on a secure and permanent ledger known as the blockchain.
The flexibility of cryptocurrency trading allows for machine learning applications across unsupervised, supervised, and reinforcement learning paradigms. This project will focus on using models such as LSTM recurrent neural networks and convolutional neural networks, highlighting Bitcoin's unique capacity to illustrate machine learning concept decisions like network architecture.
Trading differs from investing by focusing on profit from price fluctuations rather than a belief in long-term value increase. It involves understanding patterns in price actions to buy low and sell high. Different types of trading include day trading, which involves daily buying and selling, and swing trading, which spans longer periods.
Trading decisions rely on patterns identified in price graphs, using time series data. Data representation through candlesticks (OHLCV: open-high-low-close-volume), coupled with indicators like moving averages and RSI, provide multiple input features for machine learning models, enhancing prediction accuracy.
Exchanges like GDAX and Kraken serve as platforms for converting traditional currencies into cryptocurrencies. The efficient market hypothesis suggests that the value of an instrument is fairly priced based on the collective analysis of market participants. Differences in exchange prices can provide opportunities for arbitrage, further fueling trading strategies.
The project code, currently using deep reinforcement learning via tensor force, employs convolutional neural networks over LSTM to adapt to Bitcoin trading's intricacies. The project will be available at ocdevel.com for community engagement, with future episodes tackling hyperparameter selection and deep reinforcement learning techniques.
A convolutional neural network slides small learned filters across an image, each making a feature map that is high where its pattern appears, and stacks these layers so later ones find larger patterns. Also covers window size, stride, same and valid padding, max pooling, and the CNN line from LeNet-5 to the ImageNet winners AlexNet, GoogLeNet and ResNet.
LinksA multilayer perceptron (MLP) flattens an image into a list of pixels and connects every pixel to every neuron of its first dense layer, each connection with its own weight. Nothing in that design tells it that neighboring pixels belong together, and a pattern it learns in one corner has to be learned again for every other position. A convolutional neural network (CNN, or ConvNet) builds both in: each neuron looks only at a small window of neighboring pixels, and the same filter is reused at every position, so a striped shirt is found wherever Waldo stands. That's why CNNs took over from MLPs for vision.
An 8-bit grayscale image stores each pixel as 0 (black) to 255 (white); scaled to 0–1, 1 is white. A color image has three channels, red, green and blue, so the input is a width × height × 3 volume.
What is a filter?A filter, or kernel, is a small grid of learned weights, say 5×5, that spans every channel of its input: a 5×5 filter on an RGB image holds 5×5×3 weights plus a bias. At each position it multiplies the window's values by its weights, sums the products, adds the bias, and usually passes the result through a ReLU. Weights can be negative, so a horizontal-stripe detector has rows of positive weights alternating with rows of negative ones. It responds strongly where light and dark stripes line up with it and weakly elsewhere.
Training learns the weights by backpropagation. You choose how many filters a layer has and their size. Filters in early layers tend to learn edges and color blobs, later ones textures and parts of objects.
Filter, feature map and convolutional layerA classifier CNN stacks convolutional layers, shrinking width and height while depth grows, then ends in dense layers with a softmax or sigmoid output. Many modern CNNs replace the big dense layers with global average pooling, which averages each feature map to one number, followed by a single dense layer.
Window, stride and paddingThe window is the filter's size; the stride is how far the filter moves between positions. For input width W, filter size F, padding P and stride S:
output width = (W − F + 2P) / S + 1Padding adds zeros around the border, on every side. "Same" padding adds enough that at stride 1 the output keeps the input's width and height (P = (F − 1)/2 for an odd F). "Valid" padding adds none, so the filter only visits positions where it fits entirely, and at stride 1 the output shrinks by F − 1.
What does pooling do?Max pooling keeps the largest value in each window of a feature map, typically 2×2 with stride 2, which keeps one value in four and halves width and height. It has no learned weights and works on each feature map separately, so depth is unchanged. It cuts the compute and memory later layers need and makes the network more tolerant of small shifts in where a feature appears. Average pooling takes the mean instead. Many modern CNNs downsample with strided convolutions in place of pooling.
Pretrained architectures and transfer learningThe number of layers, filter sizes, strides and pooling positions are hyperparameters that are hard to tune, so most projects start from a published architecture. An early landmark is LeNet-5 (1998), Yann LeCun and colleagues' network for handwritten digits. The ImageNet Large Scale Visual Recognition Challenge (ILSVRC), which ran yearly from 2010 to 2017, came later, and its winners and runners-up became the standard CNNs:
There is no yearly winner to pick now. The usual route is transfer learning: take a backbone pretrained on ImageNet or a larger dataset, such as ResNet, EfficientNet, ConvNeXt or a Vision Transformer, and fine-tune it on your own images. torchvision, timm and the Hugging Face Hub provide the pretrained weights.
CNNs, Vision Transformers and GPUsA Vision Transformer (ViT, 2020) cuts an image into patches and runs a transformer over them (MLG 033). Pretrained on enough data, ViTs match or beat CNNs on many vision benchmarks. CNNs stay common, especially with small datasets and on phones and other devices.
CNNs run far faster on a GPU than on a CPU, but they're no longer the most compute-hungry networks; large transformers are. The GTX 1080 Ti (11 GB) mentioned in the episode is several generations old. GPU memory caps the model and batch size you can train, and large data center GPUs such as NVIDIA's H100 carry 80 GB or more.
Where to learn CNNsNext: MLG 026, Project Bitcoin Trader, a community project applying deep reinforcement learning to crypto trading.