Concepts starting with T
317 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- Tabular n-step TD algorithm — The semi-gradient n-step TD algorithm is the function-approximation extension of tabular n-step TD.
- Tabular Solution Methods in Reinforcement Learning — Bandit problems are the single-state special case of reinforcement learning.
- Tabular TD(0) for Estimating Value Functions — The TD error is the difference between the current estimate V(S_t) and the one-step estimate R_t+1 + γV(S_t+1).
- Task Division in Parallel Processing — Equal-sized subproblems do not guarantee equal completion times, because the work inside each piece and the speed or…
- TD Control Methods — The cliff-walking task requires safe movement from S to a goal in a grid world.
- TD Error and Dopamine Neuron Activity — TD error, denoted δt, is examined as a quantity that changes over the course of learning.
- TD Error Concept — The hypothesis is about an error between old and new estimates of expected future reward.
- TD Errors — The reward prediction error hypothesis links dopamine neuron activity with reward prediction errors.
- TD Prediction Methods — The value of n is an important performance setting in n-step TD methods.
- TD-Gammon Self-Play — Self-play is useful only when its generated experience is relevant to the opponents and situations encountered in the target game.
- TD(λ) Algorithm and Eligibility Traces — TD(λ) changes the weight vector at every learning step.
- Team Learning in Multi-Agent Systems — Non-contingent eligibility traces do not correlate actions with consequent changes in the reward signal.
- Technical Screen Preparation — The technical screen is a sixty- to ninety-minute conversation with an engineer on the FDE team, and it is Stage 2 of the process.
- Techniques for Improving Convolutional Neural Networks — Fine-tuning starts with a pre-trained convnet rather than an uninitialized model.
- Techniques for Writing Correct and Robust Programs — Program correctness is the idea that programs should be free from errors.
- Telemetry and Observability in Production Systems — For AI systems, testing does not end at launch, because production behavior is the only signal that fully matches what…
- Temperature and Token Sampling — A GPT model is built from an embedding stage, a sequence of transformer blocks run with nn.Sequential, and a linear output head…
- Temperature Forecasting — A CNN and an RNN can be viewed as successive sequence-processing stages, but the source material does not prescribe a particular…
- Temperature Forecasting with Recurrent Networks — The supplied section places bidirectional recurrent layers within advanced techniques for recurrent neural networks.
- Temperature Scaling for Text Generation — Top-k sampling restricts the candidate tokens to the k most likely ones; it does not force the single highest-scoring token to…
- Temporal-Difference Error — Eligibility traces preserve decayed information about earlier state visits and actions during an episode.
- Temporal-Difference Learning — Reinforcement learning uses approximation because its problem framing cannot guarantee optimal behavior throughout the entire…
- Temporal-Difference Learning and Associative Strength — The TD model uses stimulus timing and representation to simulate important classical-conditioning findings.
- Temporal-Difference Learning and US Predictions — A TD model's stimulus representation is a substantive modeling choice, not a minor implementation detail.
- Temporal-Difference Learning Methods — Off-policy learning separates the policy collecting experience from the policy being learned.
- Temporal-Difference Learning Summary — Generalized Policy Iteration describes interaction between approximate policy and value functions.
- Temporal-Difference Prediction Methods — Bootstrapping is the process of learning a guess from another guess.
- Tensor Creation — Reshaping changes how a fixed sequence of values is grouped into rows and columns; the total number of elements must stay the…
- Tensor Data Types — Tensor rank counts axes; shape records the size along each axis; dtype identifies the contained data type.
- Tensor Operations — A neural network's anatomy includes data representations, tensor operations, layers, models, and training mechanisms.
- Tensor Operations in Neural Networks — An element-wise operation applies a rule independently to each tensor entry.
- Tensor Operations in PyTorch — PyTorch supports matrix multiplication through the .matmul method and the @ operator, and the source shows both producing the…
- Tensor Reshaping — Reshaping changes how a fixed sequence of values is grouped into rows and columns; the total number of elements must stay the…
- Tensor Shapes — Broadcasting makes tensors with different shapes compatible for operations such as addition when possible and unambiguous.
- Tensor Shapes and Dimensions — A scalar, vector, and matrix differ by the number of axes they have.
- Tensor Shapes and Dimensions in PyTorch — A tensor is a multi-dimensional data container, and PyTorch tensors are data containers for array-like structures.
- Tensor Shapes and Reshaping — PyTorch supports matrix multiplication through the .matmul method and the @ operator, and the source shows both producing the…
- Tensor Shapes in Deep Learning — A 3D tensor is a collection of matrices packed into a new array.
- Tensor Transpose — Reshaping changes how a fixed sequence of values is grouped into rows and columns; the total number of elements must stay the…
- Tensors and Basic Tensor Operations in PyTorch — A device is where computations occur and data resides, and the CPU and the GPU are both examples of devices.
- Tensors and PyTorch Fundamentals — torch.tensor() creates a PyTorch tensor from a Python value that you pass to it as an argument.
- Tensors and Shapes in PyTorch — tokenizer.encode(input_text) converts a string into a list of integer token IDs
- Tensors and Tensor Operations — Part 1 is a staged introduction rather than a single isolated topic.
- Terminal Operations in Java Streams — Filter and map are the two most basic intermediate operations in the Java Stream API, as described in the source.
- Terminal Operations in Stream Processing — reduce combines the values of a stream into one result using a BinaryOperator, and a sum is one example where the operation is…
- Testing Against Requirements — Specifying program requirements means translating a vague problem into concrete, measurable specifications that leave no room…
- Testing and Debugging Code — The computegrade function takes a score as a parameter and returns a letter grade as a string, using if and elif conditions to…
- Testing and Debugging Functions — Reusable functions are general-purpose solutions to well-defined problems that work across many different programs.
- Testing and Debugging Strategies — Determinism is the property that identical inputs always produce identical outputs in a computer program—this is expected and…
- Testing and Validating Your Code — Dividing a long program into functions allows you to debug the parts one at a time and then assemble them into a working whole.
- Testing and Validation Strategies — Debugging by bisection cuts debugging time from linear to logarithmic by eliminating half the search space with each checkpoint…
- Testing and Verifying Programs — A program is correct when it correctly implements a complete and correct specification, so passing against a specification does…
- Testing Programs Against Valid and Invalid Input — A program is correct when it accomplishes the task it was designed to perform, and this is judged against the inputs it is meant…
- Testing Python Code — The __name__ attribute tells you whether a module is being run directly (__main__) or imported (module name).
- Testing Versus Proving Program Behavior — A program is correct when it produces the correct result as specified, so correctness is always measured against a specification.
- Testing Your Code — Syntax errors break Python's grammatical rules and prevent the program from running. Python reports them immediately with a line…
- Testing Your Code Systematically — Debugging is the process of finding the cause of an error in your code, triggered by error messages or incorrect results.
- Text Area Component — A GUI window can be understood as a collection of related components.
- Text Classification with Fine-Tuned LLMs — classify_review takes a text together with a fine-tuned model, its tokenizer, a device, and a maximum length, and returns a…
- Text Classification with Language Models — Classification fine-tuning replaces the output layer of a large language model with a smaller classification layer.
- Text Completion with Language Models — GPT was introduced by Radford et al. from OpenAI in the paper Improving Language Understanding by Generative Pre-Training.
- Text Components and Editors — The model for a JTextComponent is an object of type Document, separate from the component you see.
- Text Data Preprocessing — Sequence data includes text, timeseries, and other ordered inputs.
- Text Generation in GPT Models — A transformer block is a core structural component of GPT models that combines masked multi-head attention modules with fully…
- Text Generation Strategies — A weight parameter is a model parameter that is learned during training, not typed in by hand.
- Text Generation with a Language Model — Training loss measures fit on the training data, and validation loss measures fit on held-out data; both should be read together.
- Text Generation with a Trained GPT Model — The generation loop visits each test entry, builds a prompt, calls generate, decodes the output, and cleans it so that only the…
- Text Generation with LSTM — A language model learns the statistical structure of language by modeling possible next tokens.
- Text Input and Output Fundamentals — System.out.print(x) outputs x after converting it to a string when necessary.
- Text Input using TextIO — TextIO offers separate input functions for int, double, boolean, char, one-word String, and complete-line String values.
- Text Preprocessing — Text vectorization changes raw text into numeric tensors.
- Text Preprocessing and Word Embeddings — Word embeddings turn words into dense vector representations.
- Text Preprocessing for LLMs — Tokenization is the process of splitting input text into individual tokens, and it is a required preprocessing step for creating…
- Text Vectorization — Sequence models operate on ordered numeric representations, not raw text.
- Text-Based Card Game with Deck, Hand, and Card Classes — The main panel of the card game uses a BorderLayout, with the drawing surface in CENTER and the subpanel of three buttons in…
- TextIO and User Input — Scanner is a standard Java alternative to TextIO for user input.
- Texture generation — Neural style transfer is a two-source image-modification task: the target supplies content and the reference supplies style.
- The __init__ Constructor — A class is a reusable blueprint; an object is a concrete instance created from that blueprint.
- The __init__ Method — The __init__ method is a special method that runs automatically when you create an object, allowing you to initialize its state…
- The __init__ Method and Instance Variables — A child class extends a parent class using the syntax class ChildClass(ParentClass):, inheriting all parent variables and…
- The Agent-Environment Interface for Rewards — The learning-agent boundary follows control, not the outer boundary of a physical body.
- The append() Method and List Mutation — The running total method maintains only a sum and count, discarding individual numbers after computing the average.
- The assert Statement — The assert statement verifies that a condition is true; if false, it raises an AssertionError
- The Attention Mechanism in Large Language Models — The chapter's plan has three parts: stage 1 covers data preprocessing and the attention mechanism, stage 2 covers coding and…
- The Binary Fundamental Theorem — The proof has separate lower-bound and upper-bound routes.
- The Birthday Problem — Sequential access processes array elements one after another in array order, while random access lets you reach any element…
- The break and continue Statements — An interactive input loop uses while True to run indefinitely and break to exit when the user provides a specific command.
- The break Statement: Exiting a Loop Early — continue skips the rest of the current loop iteration and jumps back to the loop condition to begin the next iteration
- The Canonical Constructor — An additional constructor is any constructor in a class other than the canonical constructor, and it gives callers an…
- The Chain Rule in Computational Graphs — A partial derivative measures how a multivariate function changes along one input while the other inputs are held fixed.
- The Comparable and Comparator Interfaces — A set is a collection in which no object occurs more than once, and adding a duplicate has no effect.
- The Comparable Interface — Collections.sort() is a static method of the java.util.Collections class, and it sorts a list into ascending order when called…
- The Comparator Interface — Collections.sort() is a static method of the java.util.Collections class, and it sorts a list into ascending order when called…
- The Constructor and the self Parameter — The real power of object-oriented programming is creating multiple instances of a class, each with its own independent data.
- The Constructor: Initializing Objects with __init__ — Objects have a complete lifecycle: creation (via __init__), active use, and destruction (via __del__). Python calls these…
- The count() Method for Counting Substring Occurrences — find() returns the starting index of a substring if found, or -1 if not found
- The CPU: The Brain of the Computer — Input devices capture user actions and send data into the computer; output devices receive data from the computer and present it…
- The Destructor: Cleaning Up with __del__ — __init__ is a special method that runs automatically when an object is instantiated, marking the beginning of the object's…
- The Dictionary get() Method — Character counting uses a dictionary to store each unique character and its count.
- The Document-Producing Motion in Large Firms — Exceptions to the document-producing default do exist within the Big Four, usually in specific practices within AI or applied…
- The engine of neural networks: gradient-based optimization — Part 1 moves from the context of deep-learning growth to mathematical foundations and then toward practical development with…
- The Eval Suite from Chapter 9 — The first-commit repository layout has a README, a prompts folder, a src folder with three Python files, an evals submodule, and…
- The Eval-Driven Loop (Chapter 9) — An eval-set-plus-prompt-stack is a small artifact made of a labeled eval set of a hundred examples, a version-controlled…
- The Executive Sponsor's Role in Procurement — The contract is the architectural expression of the relationship the FDE built during scoping, so its structure should reflect…
- The find() Method and String Search — Use find() to locate a delimiter like a colon within a string, which returns the index of that character.
- The for Loop: Iterating Over Sequences — A while loop repeats code as long as a condition is true, checking the condition before each iteration.
- The Forward Deployed Engineer Role — The FDE role expects you to write production code, so hands-on coding is a core requirement rather than an optional extra.
- The Fundamental Theorem of PAC Learning — The Fundamental Theorem of Statistical Learning links risk behavior and hypothesis-class complexity.
- The Gap That Forward Deployed Engineers Close — A Forward Deployed Engineer is explicitly not a sales engineer, a cloud-vendor solutions architect, or a customer success…
- The gears of neural networks: tensor operations — Part 1 moves from the context of deep-learning growth to mathematical foundations and then toward practical development with…
- The General k-NN Rule — k-NN regression predicts a real-valued target by combining the targets of the k nearest neighbors.
- The generate Function in GPT-Style Models — Top-k sampling restricts the model's next-token choice to the top k tokens, and the value of k sets how many candidates remain.
- The GPT Model Architecture — GPT_CONFIG_124M is a dictionary of settings that determines the shape of the GPT model, and the chapter changes only…
- The Gravel-Road-to-Highway Pattern — A slice library is a collection of reusable code slices accumulated from past engagements and meant to be adapted for new…
- The Guardian Pattern for Robust Programs — File parsing crashes often occur when code assumes data that is not always present, such as non-empty lines or fields at…
- The Hedonistic Neuron Hypothesis — STDP makes synaptic change sensitive to the order and timing of neural spikes.
- The id() Function and Object Identity — Variables are references to objects in memory, not the objects themselves.
- The if-else Statement in Java — The if statement takes the form if ( boolean-expression ) statement-1 else statement-2.
- The Import Directive in Java — A static import lets a static member of a class be referred to by its simple name, which removes the need for compound names…
- The import Statement — How It Works First, we import the sys module using the import statement. Basically, this translates to us telling Python…
- The Java Standard Library Overview — A package groups related classes, and it can also contain other packages, which gives Java a way to organize code at several…
- The Java Virtual Machine — Just-in-time compilation translates Java bytecode into native machine language during program execution.
- The k-Armed Bandit Problem: Balancing Exploration and Exploitation — Exploration chooses a nongreedy action to improve knowledge about its value.
- The Keras Functional API — Advanced deep learning combines tensor-based data representation, tensor operations, and gradient-based optimization.
- The Learner in Statistical Learning — Training data is the learner’s input and consists of a finite sequence of labeled examples.
- The len() Function — List traversal comes in two main forms: simple for loops for reading elements, and index-based loops using range(len()) for…
- The main() Method and Program Entry — Command-line arguments are the words typed after a program's name, and Java passes them to main() in the args array of strings.
- The Model-View-Controller Pattern in Swing — A JList gets its items from a list model, the object that knows the actual list of items and the operations that can be…
- The Modulo Operator: Finding Remainders — In Python 3, the / operator always returns a float, even when dividing two integers—a significant change from Python 2.
- The Monthly Synthesis Review Process — Founders of early-stage vertical AI startups can be too close to the technology to see what customers are actually telling them.
- The Multiclass Fundamental Theorem — The proof has separate lower-bound and upper-bound routes.
- The Neural Basis of Addiction — Many drugs of abuse increase dopamine in or around dopamine neuron axon terminals in the striatum.
- The Object Class — The default equals(obj) inherited from class Object tests whether two references point to the same object, which gives the same…
- The Original Transformer Architecture — GPT employs only the decoder portion of the original transformer and drops the encoder.
- The os Module for System Interaction — The logging module allows you to store debugging, information, warning, and critical messages to a file for post-execution…
- The Perceptron Algorithm — Margin separation supplies the condition for the Perceptron convergence guarantee.
- The Print Function — def say_hello(): # block belonging to the function print 'hello world' # End of function say_hello() # call the function…
- The print() Function: Displaying Output — The interactive interpreter automatically prints expression results; scripts do not.
- The Production Phase of an FDE Engagement — The FDE is the institutional memory of the engagement, responsible for continuity across change.
- The QuickSort Algorithm — A separate thread is useful for animation when the thread runs a recursive algorithm and the display must be redrawn many times…
- The range() Function — Index-based iteration combines range() and len() to generate indices, enabling you to read and modify list elements.
- The re Module and Pattern Matching — A grep simulator reads a file line by line, tests each line against a user-supplied regular expression, and counts how many…
- The Realizable Assumption — Weak learnability allows a learning algorithm to be useful even when its accuracy is only slightly better than random guessing.
- The Realizable Case in Online Classification — The realizable case assumes that labels come from a hypothesis h⋆ in a known hypothesis class H.
- The Reinforcement Learning Agent — A policy connects each perceived state with an action.
- The Rescorla-Wagner Model — Error-correction learning updates associative strength according to prediction error.
- The RLM Rule — Tikhonov regularization augments the loss with λ ‖w‖2.
- The Role of Advisors in AI Engineering — A Forward Deployed Advisor is a senior practitioner who runs a solo consultancy and sells FDE work without performing it.
- The Role of the Forward-Deployed Engineer — A demo should be built so that it can fail without the whole engagement falling apart; a demo that cannot fail is a sales…
- The round() Function and Rounding Behavior — int() converts values to integers by truncating (not rounding) the decimal portion
- The Scanner Class for Input — Scanner read methods throw an exception when they cannot return a value that matches the request.
- The self Parameter Explained — The __init__ method is a special method that runs automatically when you create an object, allowing you to initialize its state…
- The Shift Away from Per-seat Pricing in AI — Three structures replace per-seat pricing: milestone-based for engagement-shaped work, consumption-based for high-volume agent…
- The split Method: Breaking Strings into Lists — join is a string method that reverses split by combining list elements into a single string with a specified delimiter.
- The Standard Template Library in C++ — C++ is strongly typed, so the run-time style of generic programming used in Smalltalk is not possible in C++, but C++ has its…
- The Structure of a Python Statement — Python is not intelligent and cannot guess your intent. It is strict about syntax and will reject any code that violates its…
- The Training Loop for Next-Word Prediction — A large language model is a deep neural network designed to understand, generate, and respond to humanlike text.
- The Transformer Architecture — The Bahdanau attention mechanism lets the decoder selectively access different parts of the input sequence at each decoding step.
- The Transformer Architecture Explained — LLMs are AI models that can understand, generate, and interpret human language, where understanding means producing coherent…
- The try Statement and catch Clauses — A finally clause is the last step of a try statement and runs whether or not an exception occurs and whether or not it is caught.
- Theorem 21.11 — For the finite-class case, each hypothesis is treated as an expert.
- Theorem 26.12 — Theorem 26.12 and Theorem 26.15 have bounds that look similar apart from an extra log(d) factor in Theorem 26.15.
- Theorem 26.15 — Theorem 26.12 and Theorem 26.15 have bounds that look similar apart from an extra log(d) factor in Theorem 26.15.
- Thinking Like a Programmer: Computational Thinking — Programming is a creative partnership where humans provide ideas, creativity, and judgment while computers provide speed…
- Third Normal Form: Removing Transitive Dependencies — Redundancy occurs when the same information is stored multiple times across different rows in a table, such as repeating an…
- Thread Creation and Management — The program computes rowsPerThread as the image height divided by the thread count, using integer division.
- Thread Pools and ExecutorService — A Runnable is handed to an ExecutorService with execute, which returns as soon as the task is placed in a queue.
- Thread Pools and Reuse — ExecutorService is a Java interface in java.util.concurrent that defines services for executing submitted tasks, and it is used…
- Thread Priority in Java — The program computes rowsPerThread as the image height divided by the thread count, using integer division.
- Thread Programming Basics — GUIChat is an asynchronous chat program: a user can send messages without waiting for a response, and incoming messages are…
- Thread Safety in GUI Programming — SwingUtilities.invokeLater(task) adds a Runnable task to the GUI event queue rather than running its run() method immediately.
- Thread Synchronization and the volatile Keyword — A recursive thread may be many calls deep when a stop request arrives, so the request must be carried back up through every…
- Thread Synchronization Basics — wait() and notify() are instance methods of class Object, so any object can coordinate two threads
- Threads and Concurrency Essentials — A server that finishes one client before accepting the next, as the DateServer sample does, can be held up by a single slow or…
- Threads and Networking Essentials — Network input and output is blocking I/O, because those operations can block for indefinite periods of time, so network programs…
- Threads and Runnable Objects — A thread pool is a group of threads that can execute multiple tasks, with each task assigned to any idle thread in the pool…
- Throwing and Declaring Exceptions — A try..catch statement lets a program catch a thrown exception of a named type and keep running instead of crashing.
- Throwing Exceptions and Writing Your Own Exception Classes — A thrown exception is an object carrying the call stack and an error message from the failure point to the handler.
- Throwing Exceptions for Precondition Violations — A throws clause in a subroutine header announces the exception classes the routine might throw. It does not throw anything by…
- TicTacToe Game Design — The two-player Poker program follows a design similar to TicTacToe, with a Main class run by both players.
- TicTacToe Game State in a Networked Game — The full Poker game state is known only to the PokerHub, not to the players.
- TicTacToe Game State Management — The full Poker game state, including each player's hand and the full deck, is known only to the PokerHub.
- Tikhonov Regularization — Ridge Regression is a learning rule derived from linear regression with the squared loss.
- Tile Coding for Continuous State Spaces — Sarsa controls the acrobot through repeated online interaction rather than through access to a simulator model.
- Time Horizons in Online Algorithms — The doubling trick replaces dependence on an unknown total horizon with a sequence of expanding periods.
- Timers and Animation — An ActionListener is a functional interface whose single method, actionPerformed, receives an ActionEvent, so a lambda…
- Timers, Keyboard Events, and State Machines — A state machine is something that has a state and can change state in response to events or inputs, and its response to an event…
- Timeseries Forecasting — Sequence data includes text, timeseries, and other ordered inputs.
- Timing Code with %timeit in Notebooks — Move both operands to the GPU with a.to("cuda") before timing a GPU multiplication, otherwise the measurement does not describe…
- Token Embeddings — Sequence data includes text, timeseries, and other ordered inputs.
- Token Embeddings and Positional Information — Tokenization converts input text into token IDs, using the tiktoken tokenizer and its encode method.
- Token Embeddings and Vocabulary Mapping — An embedding layer maps each token to a vector and is sized by two values: the vocabulary size and the output dimension.
- Token IDs — Token embeddings are the last preparation step before LLM training: token IDs are converted into embedding vectors.
- Token IDs and the Vocabulary — The embedding layer is a lookup operation: a token ID selects a row of the weight matrix by position.
- Token IDs and Vocabularies — A token embedding is retrieved by looking up the row of the embedding layer's weight matrix that matches the token ID, with rows…
- Token Refresh and Expiration — OAuth libraries are free, pre-built tools that handle the complexity of the OAuth 2.0 protocol so you do not have to implement…
- Token-Based Authentication — Vendors require cryptographically signed messages to verify both the source of requests and that they have not been altered in…
- Tokenization — Sequence models operate on ordered numeric representations, not raw text.
- Tokenization and Building a Vocabulary — SimpleTokenizerV2 handles words outside the vocabulary by replacing each one with the special <|unk|> token during encoding.
- Tokenization and Byte Pair Encoding — A tokenizer's vocabulary can be extended with special context tokens that carry meanings ordinary words cannot express.
- Tokenization and Input Encoding — Fine-tuning adjusts a pre-trained model's weights to fit a specific task, and it can either update the whole model or only…
- Tokenization and the split() Function — The Python split() function preserves punctuation attached to words, treating 'soft!' and 'soft' as different tokens and…
- Tokenization and Token Embeddings in LLMs — The dimensionality of a word embedding is the number of values in the vector that represents one word, and it ranges from one to…
- Tokenization and Token IDs — An LLM generates text by predicting the next token from the current context, and the process repeats to extend that context.
- Tokenization and Vocabulary Construction — Special tokens such as <|unk|> and <|endoftext|> enhance a model's understanding and handle contexts like unknown words and…
- Tokenization Basics — Byte pair encoding (BPE) is a tokenization scheme, meaning a method for splitting text into tokens.
- Tokenization for LLMs — Input-target pairs are the training examples used for LLM training, generated from tokenized data.
- Tokenization Scheme — A tokenizer built on re.split keeps its separators when the pattern contains a capturing group, which is how punctuation becomes…
- Tokenization using a BPE Tokenizer — An LLM is pretrained by predicting the next word in a text, so training data is built as input-target pairs.
- Tokenization: Converting Text into Tokens — A token is a unit of text that a model reads, and dataset sizes are commonly reported as token counts, which roughly track the…
- Tokenizing Text for a GPT Model — DummyGPTModel is a simplified GPT-style nn.Module. It builds token and positional embeddings, dropout, a stack of transformer…
- Tokenizing Text for Large Language Models — This course is built around Python code, and running the examples is essential to understanding them.
- Tokenizing Text Messages with tiktoken — Variable-length messages must be made equal in length before they can be batched, and there are two main routes: truncation and…
- Tokenizing Text Using Byte Pair Encoding — Tokenization converts input text into token IDs, using the tiktoken tokenizer and its encode method.
- Tokenizing Text with the GPT-2 Tokenizer — SpamDataset loads a CSV file, tokenizes each text with the GPT-2 tokenizer, and returns padded token tensors with labels through…
- Tokens and How Text Is Counted — The GPT-3 table's subsets total 499 billion tokens, but the model was trained on 300 billion tokens, and the source does not…
- Tokens and Vocabularies in LLMs — Greedy decoding uses torch.argmax to always select the highest-probability token, which makes the next-token choice deterministic.
- Tokens and Vocabulary in Language Models — The GPT-3 dataset totals 499 billion tokens, but the model was trained on 300 billion tokens, and the source gives no reason for…
- Top-Down Design — Bottom-up design begins with known problems rather than the overall problem as a single starting point.
- Trace Mechanisms in the Nervous System — A stimulus trace persists in the nervous system after a stimulus ends.
- Tracing Conditional Logic — Code file order (top to bottom) is not the same as execution order (the actual sequence the program runs).
- Tracing Program Execution — The ListLetters program reads a line of text entered by the user and stores it in a String variable named str.
- Traditional Attention in Sequence-to-Sequence Models — Self-attention computes attention weights by relating different positions within a single input sequence, while traditional…
- Traditional for Loops with Arrays — A for-each loop is an alternative form of the for loop that makes it easier to visit every value in an array or collection.
- Traditional Switch Syntax in Java — A switch statement tests one expression and jumps to the case label that matches its value.
- Training a Convnet from Scratch on a Small Dataset — The original Dogs vs. Cats dataset contains 25,000 color JPEG images.
- Training a Keras model on IMDB data — The Keras example uses an LSTM layer in a model trained on IMDB data.
- Training a Large Language Model — The evaluate_model function measures training and validation losses after model updates, so training progress can be judged…
- Training a Machine Learning Model — A model receives samples and produces predictions; targets provide the external truth used for comparison.
- Training and Evaluating Machine Learning Models — A machine learning project needs an observable definition of success before progress can be measured.
- Training and test data — MNIST is a classic handwritten-digit classification dataset.
- Training and Test Splits in Machine Learning — Hyperparameters are settings chosen before training, and a validation dataset is the held-out data used to find the best of them.
- Training and Validation Loss — A Keras callback is an object passed to fit that is called at various points during training.
- Training and Validation Losses — A weight parameter is a model parameter that is learned during training, not typed in by hand.
- Training and Validation Metrics — TensorBoard is a browser-based visualization tool packaged with TensorFlow for inspecting Keras models using the TensorFlow…
- Training and validation performance — Optimization and generalization measure different kinds of model performance.
- Training and Validation Set Losses — The device line selects CUDA when torch.cuda.is_available() is true and falls back to the CPU otherwise, so the same code runs…
- Training and Validation Sets — Model selection uses validation to choose one predictor from several trained candidates.
- Training Data — Feature engineering transforms raw data into more meaningful features before modeling.
- Training Data and Labels — Supervised learning trains a model on a labeled dataset, pairing each example with its correct label.
- Training Data for Language Models — Self-supervised learning trains a model on data without explicit labels, creating labels from the structure of the data itself.
- Training Data Sources for Modern LLMs — The GPT-3 dataset totals 499 billion tokens, but the model was trained on 300 billion tokens, and the source gives no reason for…
- Training Error — ERM selects a predictor by minimizing its error on the training sample.
- Training Feedforward Neural Networks — A feedforward neural network is a directed acyclic graph whose nodes are neurons and whose directed edges are weighted…
- Training Large Language Models — Byte pair encoding (BPE) is a tokenization scheme, meaning a method for splitting text into tokens.
- Training Loop for LLM Pretraining — Pretrained weights are weights trained on a large dataset, and loading them gives an LLM a solid starting point for fine-tuning.
- Training Loops and Model Evaluation — Fine-tuning adapts a pretrained LLM to a specific task; for classification, the training data consists of examples that carry…
- Training Loops in PyTorch — train_classifier_simple nests a batch loop inside an epoch loop, and each batch resets gradients, computes loss, backpropagates…
- Training Sequence — A prediction rule maps a domain point to a label.
- Training Sequences and Hypothesis Selection — Theorem 30.2 considers a learning rule A that receives m examples but returns a hypothesis determined by k of them through a…
- Training, Validation, and Test Sets — The test set should not be used to guide model calibration.
- Transaction Management and Rollback — INSERT OR IGNORE silently skips an insertion if it would violate a constraint, allowing your program to continue without an error.
- Transactions and Rollback Behavior — A uniqueness constraint ensures all values in a column are unique by using a special index to detect and block duplicates.
- Transfer Learning — A pretrained convnet can be used to perform feature extraction.
- Transformer Architecture and Variants — Experimental LLM architectures are designs that are not based on the transformer, and the source uses them to show that LLMs…
- Transformer Architecture Basics — The self-attention mechanism lets a transformer weigh the importance of different words or tokens in a sequence relative to each…
- Transformer Block Assembly in GPT Models — The FeedForward module is a small network of two Linear layers with a GELU activation between them, and it is used in…
- Transformer Encoder and Decoder Blocks — An emergent behavior is an ability a model shows without having been explicitly trained to perform that task.
- Transforming Raw Data for Analysis — Responsible spidering means retrieving data at a controlled rate to respect server resources; gmane.py retrieves one message per…
- Transforming XML with XSLT — XML documents are organized as tree structures with a single root element containing all other elements as nested children.
- Transitioning AI Systems to Customers — The handoff process transfers day-to-day operation of the system from the FDE to the customer's internal team at the end of an…
- Transitioning from a Failed Startup to — The source recommends picking three vertical AI startups whose product you most respect and applying directly to each founder
- Transitioning from Consulting to AI Engineering — Customer empathy includes identifying the four kinds of key stakeholder: sponsors, blockers, line users, and regulators.
- Translating Customer Needs into Technical Specifications — The Jobs-to-be-Done lens asks what job a customer hired a product to do, and the answer is stated in the customer's language and…
- Transparency in Failure Reporting — Trust in a dashboard is granted by the reader, and it is often earned by visible honesty about failure rather than by polished…
- Traversing a Linked List with a Loop — A non-empty linked list splits into a head node and a tail, and the tail is itself a shorter linked list.
- Tree backup — n-step Q(σ) unifies Sarsa and tree backup by allowing sampling and expectation to be selected across backup steps.
- Tree Search — Monte Carlo Tree Search joins a tree-based search structure with random sampling.
- Tree Traversal — A search compares the item with the root, then discards either the left or right subtree, and repeats on the remaining subtree.
- Tree-backup Methods — The forward view of eligibility traces connects eligibility-trace ideas with n-step returns and the λ-return.
- Trigonometric Functions in the Math Module — math.log10() computes base 10 logarithms, essential for decibels, pH scales, and other common logarithmic scales
- Triple-Quoted Strings — You can specify multi-line strings using triple quotes - ( """ or ''' ). You can use single quotes and double quotes freely…
- Troubleshooting Python Installation Issues — The PATH variable is a list of directories that Windows searches to find executable programs; adding Python's directory to PATH…
- True and Approximate Value Functions — Value function approximation makes exact prediction for every state impossible in the described setting.
- True Error — ERM selects a predictor by minimizing its error on the training sample.
- True Error and Empirical Error — Overfitting is a mismatch between excellent training performance and poor true-distribution performance.
- True Error and Generalization — 1-NN is analyzed as a sample-dependent hypothesis h_S for binary classification.
- True Online TD(λ) Algorithm — True Online TD(λ) is derived from the online λ-return construction.
- True Risk — Approximation error measures the gap between the best hypothesis in a class and the true hypothesis.
- True Risk and Empirical Risk — Overfitting occurs when a hypothesis fits the training data too well but performs poorly on the true distribution.
- True Risk Estimation — Validation uses some training data as a validation set.
- Truncated Importance Sampling Ratio — Discounting-aware importance sampling uses the structure of discounted returns instead of treating each return as an indivisible…
- try and except blocks — We can handle exceptions using the try..except statement. We basically put our usual statements within the try-block and put all…
- Try-Except Blocks: Catching and Handling Errors — exit() terminates the entire program immediately and never returns to any caller.
- try...finally statements — Acquiring a resource in the try block and subsequently releasing the resource in the finally block is a common pattern. Hence…
- Tuple Assignment and Unpacking — The items() method returns a sequence of tuples, where each tuple contains one key-value pair from the dictionary.
- Tuple Basics and Syntax — Tuple assignment requires the number of variables on the left to exactly match the number of values on the right.
- Tuple Creation and Indexing — Python compares tuples element-by-element from left to right, stopping at the first index where elements differ.
- Tuple Creation and Unpacking — Tuple unpacking (a, b = b, a) is the fastest and most Pythonic way to swap two variables
- Tuple Methods and Operations — Empty tuples are created using empty parentheses: ()
- Tuple Ordering and Lexicographic Comparison — Sorting dictionaries by value requires reconstructing tuples from (key, value) to (value, key) because Python's tuple sort…
- Tuple Unpacking and Multiple Assignment — Tuples support read-only indexing and slicing operations identical to lists.
- Tuples and Immutability — Class methods belong to specific classes and are called using dotted notation on objects of that class.
- Tuples and Other Immutable Collections — A list is an ordered, mutable collection of items created with square brackets and commas
- Tuples as Data Structures — There are four built-in data structures in Python list, tuple, dictionary and set . We will see how to use each of them and how…
- Tuples as Dictionary Keys — Commas create tuples, not parentheses. Parentheses are optional and exist only for readability.
- Tuples vs. Lists: When to Use Each — There are four built-in data structures in Python list, tuple, dictionary and set . We will see how to use each of them and how…
- Tuples: Creating, Unpacking, and Using Immutable Sequences — The items() method converts a dictionary into a list of tuples, where each tuple contains one key-value pair.
- Tuples: Immutable Sequences — Unpacking is a syntactic feature that assigns multiple variables from a sequence in one statement, equivalent to index-based…
- Turbulence and Adaptive Control Policies — The best feature combination for staying in a rising column was vertical wind acceleration together with torques.
- Turning Custom Solutions Into Reusable Platform Capabilities — A forward-deployed engineer is assigned to a single customer, embeds with that customer's team, and writes code until the work…
- Turning Customer Solutions into Reusable Product Features — Accountability in this source means treating yourself as responsible for both the customer outcome and the product pattern at…
- Turning Project Patterns into Platform Capabilities — The belief that fewer missing fields is always better can be wrong when the customer's real requirement is audit-readiness…
- Type Checking and Runtime Errors — Scale down your dataset first: modify your program to read only the first n lines, then increase n gradually as you fix bugs.…
- Type Checking and Validation — A data type is a classification that specifies what kind of value a variable holds and what operations are valid on that value.
- Type Conversion — The format() method constructs strings by substituting placeholders with argument values, replacing the need for error-prone…
- Type Conversion and Casting — raw_input() captures text from the keyboard and returns it as a string to your program.
- Type Conversion and Casting in Python — In Python 3, the / operator always returns a float, even when dividing two integers—a significant change from Python 2.
- Type Conversion and the float() Function — Use find() to locate a delimiter like a colon within a string, which returns the index of that character.
- Type Conversion Functions — List comprehension creates a new sequence from an existing one by applying a transformation to each item in a single, compact…
- Type Conversion in Python — Python has two main numeric types: int (integers) and float (floating-point numbers).
- Type Conversion: Changing One Type to Another — The type() function is your tool for determining what kind of value you're working with in Python.
- Type Conversion: Converting Strings to Numbers and Vice Versa — The + operator performs concatenation when used with strings, joining them end to end to create a new string.
- Type Conversion: int(), float(), and str() — input() pauses program execution and waits for keyboard input from the user.
- Type Conversion: Strings, Integers, and Floats — try-except blocks allow programs to catch and handle errors gracefully instead of crashing when unexpected situations occur.
- Type Errors and Debugging — Then, type python and ensure there are no errors.
- Type Parameters and Their Limitations — A type parameter that can be any type limits you to operations that every type supports.