Concepts starting with B
128 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- Background Computation with Threads — A shared resource is an object that more than one thread uses, such as the image object in the source's example.
- Backpropagation — Tensors provide the multi-dimensional representations used by neural networks.
- Backpropagation and Weight Updates — Identical starting weights make nodes in a layer perform the same operations and receive the same updates, so they never learn…
- Backpropagation in Neural Network Layers — The embedding layer is a lookup operation: a token ID selects a row of the weight matrix by position.
- Backward Elimination — Greedy selection evaluates feature subsets through the learning algorithm rather than separating selection from learning.
- Backward-view temporal-difference learning — The on-line λ-return algorithm motivates this topic because it combines strong performance with a complex forward-view…
- Balancing and Preprocessing the Dataset — Undersampling balances a dataset by reducing the majority class until it matches the minority class, using random selection.
- Balancing Exploration and Exploitation with Upper-Confidence-Bound Action Selection — UCB combines an estimated action value with an uncertainty bonus.
- Base Cases in Recursive Algorithms — A recursive binary search has two base cases: an empty range, which returns -1, and a value found at the middle position, which…
- Base Hypothesis Class — The base class B provides the individual hypotheses used as building blocks.
- Basic for loop syntax — Loops scan through data by following a three-part structure: initialize a tracking variable, compute on each item, and inspect…
- Basic if Statements — An if-else statement creates two mutually exclusive branches: one executes if the condition is true, the other if it is false.
- Basic Mathematical Functions — Python's trigonometric functions (sin, cos, tan) take arguments in radians, not degrees
- Basic Operators in Python — Operator precedence is a set of rules that determines which operations Python performs first when multiple operators appear in…
- Basic Output and Formatted Output — System.out.print(x) outputs x after converting it to a string when necessary.
- Basic Recursion and the Call Stack — A non-empty linked list splits into a head node and a tail, and the tail is itself a shorter linked list.
- Basic while loop syntax — Loops scan through data by following a three-part structure: initialize a tracking variable, compute on each item, and inspect…
- Batch Monte Carlo Methods — The maximum-likelihood model is built from observed transition frequencies and average observed rewards.
- Batch Processing in LLM Training — A PyTorch training run repeats a core update cycle: reset gradients, calculate loss, perform a backward pass, and update weights.
- Batch Processing in Neural Network Training — Hyperparameters are settings chosen before training, and a validation dataset is the held-out data used to find the best of them.
- Batch Size and Its Effect on Training — Stride is the number of positions by which the input window shifts when the next batch is created from an input dataset.
- Batch Size Trade-offs in Training — The source suggests testing the data loader with max_length=2 and stride=2, and with max_length=8 and stride=2, to build…
- Batch Updating — Batch updating keeps all episodes seen so far and repeatedly presents that growing batch until convergence.
- Batching Input Data for Language Models — CausalAttention extends self-attention with a causal mask and a dropout layer, and it accepts batched inputs of shape (batch…
- Batching Text Data for Training — Padding extends each input shorter than the target length until it reaches the maximum number of tokens the model supports, so…
- Batching Text for Language Model Training — A round trip of encode followed by decode reveals which words the vocabulary can represent.
- Bayes Optimal Classification — 1-NN is analyzed as a sample-dependent hypothesis h_S for binary classification.
- Behavioral Training — Shaping uses reinforcement to guide behavior through successive approximations.
- Bellman Equations — v*(s) is the maximum expected return from a particular state under an optimal policy.
- Bellman Optimality Equation for q* — v* assigns each state its maximum expected return.
- Benefits and Applications of the Three-Phase Frame — The three-phase frame is useful both for the day-to-day work and as an organizational tool.
- Benefits and Trade-offs of Heuristic Search — Heuristic search focuses on the current state and its likely successors.
- Bernoulli Variables — A Chernoff-bound problem begins with independent Bernoulli variables and their sum.
- Bias-Complexity Tradeoff — Model selection is the task of choosing an algorithm for a particular problem and setting its parameters.
- Bibliography and References in Machine Learning — Three important references are associated with neural network learning, pattern recognition and machine learning, and support…
- Big O Notation — Computational complexity measures the number of operations an algorithm performs.
- Binary Classification — X names the collection of objects being studied, while Y names the collection of possible labels.
- Binary Search — A recursive binary search has two base cases: an empty range, which returns -1, and a value found at the middle position, which…
- Binary Search Algorithm — A search compares the item with the root, then discards either the left or right subtree, and repeats on the remaining subtree.
- Binary Search on Sorted Arrays — A binary sort tree is a binary tree in which every node is at least as large as everything in its left subtree and no larger…
- Binary Tree Structure and Terminology — A subtree is a node together with all of its descendants, and it is itself a binary tree.
- Binomial Distribution — Slud's inequality converts a specified binomial probability into a normal-tail lower bound.
- Bipartite Ranking — A linear predictor for ranking is represented through the output y′ = h_w(x̄).
- Blackjack Policy Evaluation — Monte Carlo ES turns simulated Blackjack episodes into a search for a strong policy.
- Blocking Operations and the GUI Thread — ConnectionHandler is a subclass of Thread that opens the network connection and reads incoming messages, keeping blocking…
- Blocking Queues — wait() and notify() are instance methods of class Object, so any object can coordinate two threads
- Blocks and Compound Statements in Java — The if statement takes the form if ( boolean-expression ) statement-1 else statement-2.
- BNF Grammars and Syntax Rules — A recursive descent parser models every BNF grammar rule as a subroutine, so the structure of the program follows the structure…
- Boolean conjunctions — A Boolean conjunction maps X = {0, 1}^n to Y = {0, 1}.
- Boolean Expressions and Comparison Operators — Most statements (logical lines) that you write will contain expressions . A simple example of an expression is 2 + 3 . An…
- Boolean Expressions in Java — Boolean operators form complicated conditions from boolean values.
- Boolean Logic and Conditions — Sequential execution performs statements one after another in the order they appear in the script.
- Boolean Logic and Short-Circuit Evaluation — Defensive programming means asking 'What could go wrong?' before your program reaches users.
- Boolean Operators in Java — Java's relational operators are ==, !=, <, >, <=, and >=.
- Boolean Values and Comparison Operators — The and operator returns True only when both conditions are true; use it when you need multiple requirements to be satisfied…
- Boolean Values and Expressions — A boolean expression is any expression that evaluates to True or False; a condition is a boolean expression inside a conditional…
- Boolean Values and Logic — An if statement evaluates a condition and executes a block of code only if that condition is true.
- Boolean Values and Operators — The in operator is a boolean operator that returns True if a substring is found in a larger string, and False otherwise.
- Boosting Weak Learners — The task is binary face recognition: classify an image as a human face or not.
- Boosting: Improving Weak Learners — Weak learnability allows a learning algorithm to be useful even when its accuracy is only slightly better than random guessing.
- Bootstrapping in Temporal-Difference Learning — TD(0) and Monte Carlo can disagree because they use different evidence from the same episodes.
- Bootstrapping Methods — SGD variations are used to find a good weight vector for function approximation.
- Bottleneck Analysis in Operational Processes — A claims processing workflow is a chain of steps: opening the claim, gathering documentation, writing a narrative summary…
- Branches of Machine Learning — Supervised learning connects inputs with known targets through a collection of examples.
- Branching Statements — A while loop is a control structure for condition-based repetition.
- Breaking Down Complex Problems — Problem analysis identifies gaps and ambiguities in a problem statement before you begin coding.
- Breaking Down Problems into Steps — Programming is a creative partnership where humans provide ideas, creativity, and judgment while computers provide speed…
- Breaking Out of Loops with break — The else block is executed when the while loop condition becomes False - this may even be the first time that the condition is…
- Breaking Out of Loops: Using break and continue — An infinite loop never terminates because its condition never becomes false.
- Building a Basic Tokenizer — The tokenizer splits text with re.split at punctuation, the double dash, and whitespace, keeping matched punctuation through a…
- Building a Catalog of Reusable Work — A slice library is a moat for solo operators and small shops and a highway for larger teams, and it is valuable in both settings…
- Building a Content Database from Email Archives — Raw email data contains inconsistencies (mixed-case addresses, subdomain variations, gateway artifacts) that must be…
- Building a Convolutional Neural Network — Max pooling replaces each local window with its maximum value.
- Building a FeedForward Module — The FeedForward module maintains the shape of the input tensor, so the output has the same dimensions as the input.
- Building a GPT Model Architecture — Initializing the 124M GPT model and printing its output tensor gives a shape of [2, 4, 50257], where 50257 is the tokenizer's…
- Building a GPT Model from a Configuration Dictionary — BASE_CONFIG holds the settings shared by every GPT-2 size, including vocabulary size 50257, context length 1024, dropout rate…
- Building a GPT-Style Model from Transformer Blocks — The section's overall goal is to code a GPT-like large language model that can be trained to generate human-like text.
- Building a Growth Mindset for Programming — Programming mastery, like language fluency, requires time and patience to absorb and internalize concepts.
- Building a Language Model from Scratch — A large language model is a deep neural network designed to understand, generate, and respond to humanlike text.
- Building a Large Language Model — Emergent behavior is the ability of a model to perform tasks it was not explicitly trained to perform.
- Building a Minimal BPE Tokenizer from Scratch — Byte Pair Encoding is a tokenization method used in natural language processing, including in GPT-2.
- Building a Platform for Forward Deployed Engineers — An FDE is a customer-facing software engineer who deploys a technical product for a customer, and the role is justified only in…
- Building a Portfolio with Anthropic Plugins — Anthropic plugin templates are enterprise templates introduced at Code with Claude in 2026, spanning seven named industry areas.
- Building a PyTorch module for layer normalization — Layer normalization adjusts the activations of a layer so they have a mean of 0 and a variance of 1, which the source says…
- Building a Real Transformer Block — DummyGPTModel is a simplified GPT-style nn.Module. It builds token and positional embeddings, dropout, a stack of transformer…
- Building a Reusable Slice Library — A slice library is a collection of reusable code slices accumulated from past engagements and meant to be adapted for new…
- Building a Simple Tokenizer with encode and decode — The encode method converts a text string into a list of integer token IDs, and the allowed_special parameter tells it which…
- Building a Simple Web Client — When you call encode() on a string, Python looks up each character and converts it to one or more bytes according to the UTF-8…
- Building a Vocabulary from Text — A tokenizer class implements encode and decode, and it holds a vocabulary that maps text tokens to integer IDs along with an…
- Building a Vocabulary from Unique Tokens — Special tokens such as '<|endoftext|>' and '<|unk|>' are added to the token list after the regular unique words, using extend().
- Building a Web Scraper with Error Handling — Regular expressions operate on text as a linear sequence, while HTML is hierarchical. This fundamental mismatch causes regex…
- Building a Web Server with Sockets — A socket connection to port 80 establishes a reliable communication channel with a web server through a three-way handshake.
- Building AI Systems Incrementally — A minimal end-to-end slice is the smallest unit of work that forms a complete, end-to-end demonstration, and it is the first…
- Building and Consuming APIs — A web service is a set of services in an application's API that are made available over the web via HTTP.
- Building and Using Large Language Models — Custom-built LLMs are tailored to specific tasks or domains and can outperform general-purpose LLMs within them.
- Building Bespoke Layers for Competitive Advantage — AI has lowered the time and effort needed to build bespoke workflows, so many previously marginal workflows are now worth…
- Building Complex Models with the Keras Functional API — The Functional API describes a model as a connected route of tensor transformations.
- Building Complex Patterns with Alternation and Grouping — Raw strings (r'...') are mandatory for regex patterns because they prevent Python from interpreting backslashes as escape…
- Building Deployment Templates — A demo succeeds when it creates desire that leads to a contract, which means showing one valuable outcome clearly rather than…
- Building Dictionaries from Text — Convert a dictionary to a list of (value, key) tuples so that sorting operates on the values (frequencies) rather than the keys…
- Building Histograms from Data — Character counting uses a dictionary to store each unique character and its count.
- Building Histograms with Dictionaries — The get() method safely retrieves dictionary values, returning a default if the key is missing.
- Building Interactive Maps with OpenStreetMap and Leaflet — geodump.py converts database records into executable JavaScript code by extracting location names, latitudes, and longitudes and…
- Building LLMs from Scratch — The source material for this article does not describe the cover artwork, so the article teaches the historical context given in…
- Building Lookup Tables — Dictionaries outperform lists and variables for character counting because they only allocate space for characters that actually…
- Building Mental Models of Code — Programming is a language that requires gradual absorption over time, not linear mastery of isolated concepts.
- Building Network Applications — Web scraping is a program-based technique for retrieving web pages and extracting specific data from their HTML source code…
- Building Network Applications with Python — curl and wget are command-line tools for retrieving files from the web on Unix-like systems using HTTP or FTP protocols.
- Building Network Applications with Sockets — HTTP responses follow a three-part structure: status line, headers, blank line, and body.
- Building Network Applications: From HTTP to Web Scraping — A socket is a two-way connection between two programs that allows both reading and writing of data, similar to a file but…
- Building Normalized Email Databases with SQLite — Three Python scripts (gbasic.py, gword.py, gline.py) each answer a different question about email participation: who sent the…
- Building Panels and Containers in Swing — A grid layout can only have one component in each position, so a row that needs two pieces cannot place both directly into one…
- Building Programs with Variables, Expressions, and Statements — input() pauses program execution and waits for keyboard input from the user.
- Building REST APIs with JSON — JSON has become the industry standard for data exchange because its structure maps directly onto native data structures in…
- Building Swing Components — A layout manager is a java.awt class passed to setLayout() to decide how a container arranges its components.
- Building Your First API Request — An API is an application-to-application contract that publishes rules for accessing services provided by one program for use by…
- Building Your First GUI Application — Python bindings are translation layers that allow Python code to use GUI libraries written in C/C++, combining Python's…
- Building Your Own Objects — Web scraping demonstrates object orchestration: urllib fetches HTML, BeautifulSoup parses it into objects, and your code…
- Built-in Classes for Dialog Messages — Event handling is the process of handling events in a GUI application, and it can be implemented in different ways.
- Built-in Exception Types — Custom exceptions are user-defined classes that inherit from Exception, enabling you to represent errors specific to your…
- Built-in Functions and Their Types — Defining a function creates a variable that holds a function object with type 'function'.
- Built-in Functions for Inspection — The dir() function reveals all capabilities (methods and attributes) of any Python object by returning a list of strings.
- Built-in Functions: A Reference Guide — Built-in function names like max, len, sum, and print should be treated as reserved words and never used as variable names.
- Built-in Functions: max() and min() — Collect all numbers from the user into a list using a while loop that terminates when the user enters a sentinel value like…
- Built-in Subroutines and Functions — A subroutine is a named set of program instructions designed to perform a task.
- Byte Pair Encoding (BPE) Tokenizer — Tokenization breaks raw text into tokens, which can be words or characters, and then converts those tokens into integer token IDs.
- Byte Streams and Binary Data in Java — InputStreamReader and OutputStreamWriter wrap an existing byte stream so that a program can read and write characters instead of…
- Byte Streams with OutputStream and InputStream — DataOutputStream writes typed values such as int and double into a stream in internal, binary-number format, and it is used when…