Concepts starting with C
496 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- C Identifiers and Keywords — C++ has many more keywords than C, and any C++ keyword used as an identifier in C code must be changed for the code to be…
- C-Style String Representation — Positions in a string run over a fixed range, and a position outside that range does not refer to a character in the string
- C++ Class Design Best Practices — A concrete type is the simplest kind of class.
- C++ Evolution and Standardization — A language standard does not reliably finish on the schedule its early planning suggests; the source explicitly notes that…
- C++ Function Definitions — A function's interface names the function, its return type, and its parameters.
- C++ Implementations and Their Facilities — Standard-library components are part of every complete C++ implementation and are portable across implementations.
- C++ Mathematical Functions Overview — The mathematical functions for complex numbers are provided in the <complex> module.
- C++ Standards and the Move to C++11 — C and C++ are separate languages with their own standards, so code valid in one is not automatically valid in the other.
- C++98 and the First ISO Standard — C++11, known for years as C++0x, was produced by the WG21 committee and ratified by a 21-0 national vote in August 2011 as the…
- Cache Implementation — Exact caching reuses a stored result only when the exact same item is requested, so the lookup key must match precisely.
- Calculating Classification Loss — Classification accuracy is the performance measure a practitioner reports, but it is not differentiable, so a gradient-based…
- Calculating Memory Requirements for Model Weights — Activation memory can be much larger than the memory used by model weights, so the weights are not always the main memory cost.
- Calculating Model Memory Usage (Chapter 7) — Nonlinear functions are needed to break the linearity of feedforward layers, and simpler functions that are faster to compute…
- Calculating Model Parameters — The program estimates a model's memory size by multiplying the total parameter count by 4, assuming each parameter is a float32…
- Calculus — Backpropagation is an algorithm for computing the gradient values of a neural network.
- Calling a Function — A function call transfers execution to the function's code block and returns to the caller when the function finishes.
- Calling Built-in Functions — Arguments are values passed to a function during a call; parameters are variables inside the function that receive those values.
- Calling Functions and Passing Arguments — C++ programs get their work done mainly by calling functions.
- Calling Functions and Using Return Values — A function is written like a regular subroutine, with the addition that you must specify the value it returns.
- Calling Functions with Multiple Arguments — Functions are reusable pieces of programs. They allow you to give a name to a block of statements, allowing you to run that…
- Calling Methods on Objects — The self parameter is the first parameter in every class method and refers to the instance itself.
- Calling Subroutines in Java — Local variables belong to the subroutine where they are declared.
- Capture Lists in Lambda Expressions — A lambda expression is a notation for generating a function object, and it does so in the same way as an expression such as…
- Capturing Groups and Backreferences — Greedy quantifiers expand to match the last occurrence of a pattern; non-greedy quantifiers match the first occurrence.
- Capturing Slices From Completed Engagements — A slice library is a collection of reusable code slices accumulated from past engagements and meant to be adapted for new…
- Carathéodory's Theorem — The compressed object is a subset of training points, not the weight vector itself.
- Career Paths in Forward Deployed Engineering — The source treats deployment FDE and pathfinder FDE as two different careers, not two levels of the same role.
- Casting Between Pointer Types — In C, a void* may be assigned to a pointer of any type without a cast; in C++ this implicit conversion is not allowed.
- Catching Exceptions with try and except Blocks — The Python interpreter recovers from errors and returns a prompt; a script terminates immediately with a traceback.
- Category-Defining AI Products — The passage defines vertical AI startups as companies building category-defining AI products in specific verticals, and it…
- Cauchy-Schwartz Inequality — H2 ◦ S consists of all m-coordinate inner-product vectors produced by allowable w vectors.
- Causal Attention — Multi-head attention extends causal attention across several heads, each operating independently with its own weights.
- Causal Attention and Language Modeling — Two self-attention implementations can be made equivalent by assigning the weights from one instance to the other, with…
- Causal attention and multi-head attention — All context vectors are computed with one matrix multiplication: attn_weights @ inputs.
- Causal Attention in Large Language Models — A causal attention mask zeroes out attention weights for future positions so that each position attends only to itself and…
- Causes of Software Failure — Software failures range from annoyances to serious losses, and their consequences grow in proportion to the importance of the…
- Centroids and Cluster Representatives — The k-Means objective measures the sum of squared distances from each point to the centroid of its cluster.
- Chain Rule — Backpropagation computes gradients that help minimize the error between predicted and actual outputs.
- Chaining Conditions with elif — An if-else statement creates two mutually exclusive branches: one executes if the condition is true, the other if it is false.
- Challenges in Evaluating Sophisticated Models — Evaluating ML models is already difficult, and foundation models make evaluation even harder.
- Challenges of Evaluating Foundation Models — Evaluation mitigates risks and uncovers opportunities across model selection, benchmarking, deployment readiness, and production…
- Change Control in Vendor Contracts — The engagement scope is defined by a signed scoping document attached as Schedule A, so the scope is read through that document…
- Changing Tensor Datatypes with .to() — The .to() method transfers a tensor to a GPU, and it is the same method used to change a tensor's datatype.
- Chapter 12: the loop from telemetry to evals and prompt changes — Designing for handoff means shaping the project from its earliest days so the customer's team can run the system after the…
- Chapter 4: Founder Traits — The founder role selects for four traits: technical depth, product instinct, commercial fluency, and ambiguity tolerance, and…
- Character Classes and Anchors — A pattern piece matches exactly once by default, and a suffix changes how many times it may occur
- Character Classes and Escape Sequences in Regex — Greedy quantifiers expand to match the last occurrence of a pattern; non-greedy quantifiers match the first occurrence.
- Character Classes and Quantifiers in Regex — Raw strings (r'...') are mandatory for regex patterns because they prevent Python from interpreting backslashes as escape…
- Character Classes and Quantifiers in Regular Expressions — The caret (^) is a zero-width anchor that matches the position at the very beginning of a line, not a character.
- Character Classes and Square Brackets — The backslash (\) is the escape character that converts special regex characters into literal symbols
- Character Classes in Regular Expressions — A C++ identifier pattern is an underscore or letter followed by a possibly empty sequence of letters, digits, or underscores…
- Character Classes: Matching Specific Sets of Characters — The period (.) in a regular expression is a wildcard that matches any single character—letters, digits, spaces, punctuation, or…
- Character Literals in Java — true and false are the only boolean literals, and they are written without quotes.
- Characteristics of Specialized Containers — A heterogeneous container can hold elements of different data types.
- Characteristics of Successful Early-Career Candidates — Early-career candidates who succeed tend to show three properties together: publicly shipped non-trivial AI work…
- Chat Templates and Model-Specific Formats — Data for finetuning must be in the format the target model expects, which includes the tokenizer and the chat template.
- Checked and Unchecked Exceptions — A custom exception class must extend Throwable or one of its subclasses, and it is usually built to represent a failure that no…
- Checking Your PyTorch Installation — The default command pip install torch automatically installs the GPU-capable build when the machine has a CUDA-compatible GPU…
- Chernoff's Bounds — Bennet's inequality bounds the probability of a large positive deviation by a sum of independent random variables.
- Choosing a Container for Lookup — The cost of a map lookup is $O(\log(n))$, where n is the number of elements, and the source notes that a map with 1,000,000…
- Choosing a Measure of Success — Think of machine learning as a workflow of connected decisions, not only as model construction.
- Choosing and Setting Up a Python Editor — A Python source file must be saved with the .py extension (for example, hello.py) so that the operating system and Python…
- Choosing Between Building and Buying AI Models — A technology decision that is sound today can become the wrong choice when provider prices or providers change, so each…
- Choosing Between Commercial APIs and Self-Hosted Models — The model evaluation workflow has four stages: filtering by hard attributes, using public information, running experiments with…
- Choosing Between Loop Types — Control structures in Java can contain other control structures, and any combination of one inside another is possible.
- Choosing Between Sequential and Associative Containers — A map is usually implemented as a red-black tree and is the choice when elements must be iterated over in order.
- Choosing Between Structs and Unions — A union is a struct in which all members are allocated at the same address.
- Choosing Between Vectors and Linked Lists — When all you need is a sequence of elements, a vector and a list are both options, and the default is a vector unless you have a…
- Choosing Between Workflows and Agents — Agentic over-engineering is the pattern of adding agents, multi-agent designs, or orchestration frameworks where a simpler…
- Choosing Loss Functions for Classification and Regression — A Keras functional model can share one representation and branch into several named prediction heads.
- Choosing Meaningful Variable Names — Redundant comments restate what the code already shows; useful comments add context, meaning, or reasoning that the syntax…
- Choosing Meaningful Variable Names: Mnemonics and Readability — Descriptive variable names can paradoxically make code harder for beginners to parse because they blur the line between reserved…
- Choosing Models for Application Tasks — A larger model is usually paired with more training data, because the goal is to maximize its performance rather than to match a…
- Choosing Network Architectures — The hypothesis space is the set of possible transformations or solutions available to a learning algorithm.
- Choosing Numeric Types for Computation — The properties of numeric types are accessible through numeric_limits.
- Choosing Portfolio Projects — The recommended number of projects for a portfolio is three.
- Choosing Random Elements from a List with random.choice() — random.randint(low, high) generates a random integer within an inclusive range, including both the low and high endpoints.
- Choosing Rank and Alpha for LoRA — Freezing sets requires_grad to False on every original parameter, so none of the pretrained weights are updated during…
- Choosing Representative Examples for Prompts — A shot is one example placed inside a prompt, and a prompt with examples is few-shot learning, while a prompt with none is…
- Choosing the Right Container — Choosing a container is a performance decision that should match the data's usage.
- Choosing the Right Container for a Task — The standard library provides several containers because its containers serve common but different, often overlapping needs.
- Choosing the Right Fine-Tuning Approach — Instruction fine-tuning improves a model's ability to understand and generate responses based on specific user instructions, and…
- Chunking Documents for Retrieval — Chunk context generation produces a short context that situates a chunk within the overall document, with the aim of improving…
- Chunking Strategies for Documents — A chunk cut from its document can lose the context needed to say what it is about, and augmentation is a way to restore that…
- Class Definition and Instance Methods — You must be wondering how Python gives the value for self and why you don't need to give a value for it. An example will make…
- Class Definition and Instantiation — The self parameter is the first parameter in every class method and refers to the instance itself.
- Class Definition and Structure — The __init__ method is a special method that runs automatically when you create an object, allowing you to initialize its state…
- Class Derivation and Inheritance — A derived object is usually manipulated through its abstract base class, and it may be deleted through a pointer to that base…
- Class design best practices — Redefine or prohibit copying when the default copy behavior is not appropriate for a type.
- Class Files and Compilation in Java — A resource is data a program uses that is not code, such as images, sounds, and text; the user normally does not need to know…
- Class Hierarchies and Virtual Functions — Forgetting to suppress a copy or move operation is only partly harmless: in the source's case with a user-declared destructor…
- Class hierarchy — Inheritance connects a specific subclass to a more general superclass.
- Class Imbalance in Training Data — Data coverage is about whether the training data spans the kinds of inputs and behaviors a model will meet, not only how much…
- Class Members in C++ — A class separates the interface of a type, which everyone may use, from its implementation, which holds the hidden data.
- Class Templates — A template alias defines a new template by binding some or all of the template arguments of an existing template.
- Classes and Access Control — A header file such as Vector.h holds the declarations that specify a module's interface, and users include it to reach that…
- Classes and Access Modifiers in C++ — The first design of C++, called C with Classes, included function declarations with argument type checking and implicit…
- Classes and Member Functions — A class is commonly split into a header file that declares its interface and a source file that implements its member functions.
- Classes and Member Variables — Access control determines the visibility and usability of a class member.
- Classes and Objects — A class defines a new type; an object is one real instance of that type, the same way an integer value like 5 is one instance of…
- Classes and Objects Fundamentals — An object created from a class is an instance of that class, and the variables it contains are called instance variables.
- Classes and Objects in Java — A package can contain both classes and other packages, and a package contained in another package is called a subpackage.
- Classes and Objects in Python — In Python, everything used in a program is generically called an object—numbers, strings, functions, and more.
- Classes and Objects: The Basics — __init__ is a special method that runs automatically when an object is instantiated, marking the beginning of the object's…
- Classes and Subroutines in Java — Text blocks provide a readable Java 17 syntax for multiline strings.
- Classes and User-Defined Types — C++ represents computations as functions and function objects, and this article focuses on the classes that give those…
- Classes as Types — Classes have a dual role: they can contain static members and describe objects.
- Classes of Functions — Intervals over the real numbers form a class of binary-valued functions.
- Classical Conditioning and Model-Based Processes — Model-free reinforcement learning learns through trial and error without a model of the environment.
- Classical Conditioning and Prediction — The defining question is whether reinforcement depends on the animal's behavior.
- Classical Conditioning: Learning Predictive Relationships — Error-correction learning updates associative strength according to prediction error.
- Classical Machine Learning Algorithms — Feature engineering transforms raw data into more meaningful features before modeling.
- Classification — Supervised learning connects inputs with known targets through a collection of examples.
- Classification Algorithms — Early neural networks were explored decades before modern deep learning, but their development was constrained by training…
- Classification and Ranking Problems — A machine learning project needs an observable definition of success before progress can be measured.
- Classification Error — The Bayes optimal predictor f_D is defined relative to a probability distribution D.
- Classification Fine-tuning — The general process of creating an LLM has two stages: pretraining, which trains on a large, diverse dataset to build a broad…
- Classification Fine-Tuning for Large Language Models — Instruction fine-tuning trains a language model on a set of tasks, with each task presented alongside a specific instruction.
- Classification Fine-Tuning for Spam Detection — Running a pretrained model on a spam instruction and reading the generated text is a direct way to test whether it already…
- Classification Fine-Tuning Workflow — Final evaluation measures accuracy on the training, validation, and test sets, and the test set serves as the held-back check on…
- Classification Loss Functions — Logistic loss evaluates how bad a prediction is for its true label.
- Classification Models — Model ensembling pools outputs from multiple models rather than relying on one model.
- Classification Problems — A class is a category in a classification problem.
- Classification tasks — Machine learning discovers data-processing rules from examples of inputs and expected outputs.
- Classification with Logistic Regression — Logistic regression is used for classification tasks.
- Classification with Softmax Outputs — Multi-input models use separate branches for separate data sources.
- Classifiers — Generalized loss functions provide a broad way to assign nonnegative values to model-domain pairs.
- Client and Server Roles in a Networked Game — The full Poker game state is known only to the PokerHub, not to the players.
- Client-Server Architecture — A socket is a two-way connection between two programs that allows both reading and writing of data, similar to a file but…
- Closing Files and Resource Management — Opening a file asks the operating system to locate the file by name and verify it exists and is readable.
- Cloud GPUs for Model Training — Larger models such as gpt2-medium (355M) are more computationally intensive than gpt2-small (124M), because they have more…
- Clustering — The supplied source pack does not define PCA or variance maximization.
- Clustering Algorithms — Linkage-based clustering begins with every data point as its own cluster.
- Clustering Objectives — Mutual information I(X;Y) measures dependence between two random variables.
- Clustering Techniques — Dimensionality reduction maps vectors from R^d to R^n using a linear transformation, where n is smaller than d.
- Clustering Techniques and Dimensionality Reduction — Clustering organizes objects into groups based on resemblance.
- Coarse Coding with Multiple Tilings — Multiple tilings provide the overlapping receptive fields needed for coarse coding.
- Code Comments and Readability — A docstring is a documentation string that Python stores as part of a function object, making it accessible during program…
- Code Completion and Code Generation — AI coding tools assist with coding tasks; code completion, as in GitHub Copilot, is one important type, and specialized tools…
- Code Comprehensibility and Function Overloading — Function overloading lets several functions share one name as long as their parameter lists differ.
- Code Organization and Structure — Reuse means writing a set of instructions once, naming it, and calling that name multiple times throughout a program
- Code Readability and Maintainability — Do not say in comments what can be clearly stated in code, because a repeated statement adds noise and no understanding.
- Code Style and Conventions — Redundant comments restate what the code already shows; useful comments add context, meaning, or reasoning that the syntax…
- Code Testing and Validation — The software development process has five phases: What (Analysis), Do It (Implementation), Test (Testing and Debugging), Use…
- Coding a Text-Generating LLM — An LLM can generate text, and the source material notes that it can be coded to do so, making generation the foundation of an…
- Cognitive Maps in Reinforcement Learning — Latent learning separates the occurrence of learning from its immediate expression in behavior.
- Collecting and Understanding User Feedback — Seamless feedback collection means gathering opinions through a channel built into the user's workflow, so that giving feedback…
- Collecting and Using User Feedback — A single overall evaluation score can reverse the ranking that subgroup results show, which is the core of Simpson's paradox, so…
- Collecting User Feedback — Different quality criteria can call for different evaluation methods, and each criterion deserves a method suited to it.
- Collecting User Feedback for AI Applications — Feedback can and should be collected throughout the user journey, and users should have a way to report errors whenever the need…
- Collections of Values — Most computing involves creating collections of values and then manipulating those collections.
- Collections: Lists, Tuples, and Dictionaries — A tuple 1 is a sequence of values much like a list. The values stored in a tuple can be any type, and they are indexed by…
- Collective Reinforcement Learning in Multi-Agent Systems — REINFORCE and error backpropagation can support comparable learning in multilayer networks, but they use different processes.
- Colors and Fonts in Java Graphics — A graphics context is an object that bundles drawing subroutines with data such as the current color, the current font, and the…
- Colors and Pixel Control in Java Graphics — A pixel is one of the small squares arranged in rows and columns that make up a screen, and the computer controls each pixel's…
- Colors and the Color Class in Java — A transparent color is a Color object created with an alpha component, which controls its opacity; an ordinary three-argument…
- Colors in Java Graphics — A Paint object describes a fill or line color; it has no effect until it is installed in a Graphics2D context with setPaint().
- Column Class and Display — A table's data lives in a table model, and methods such as setValueAt, removeRow, and addRow change that data; the view updates…
- Combining Boolean Expressions with and, or, and not — A boolean expression evaluates to True or False, which belong to the bool data type.
- Combining Conditions with and and or — An if statement checks a boolean condition and executes an indented block only if that condition is true.
- Combining Search and Extract Operations — The $ anchor marks the end of a line in regular expressions, not a literal dollar sign character
- Command Line and IDE Development Environments — A jar file packs Java classes and resource files into one archive, and an executable jar names the class with the main() routine…
- Command Line Basics for Windows — Windows does not include the zip command by default; download and install it from the GnuWin32 project page
- Command-Line Basics for Unix and Linux — grep stands for Generalized Regular Expression Parser. It is a command-line program built into Unix, Linux, and macOS systems…
- Comments and Documentation in Java — An annotation is metadata, or metatext, written about a main text rather than as part of it.
- Common Exception Types — The try..except statement separates normal code (try block) from error-handling code (except blocks).
- Common Exception Types in Python — The Python interpreter recovers from errors and returns a prompt; a script terminates immediately with a traceback.
- Common Failure Modes in AI Engineering Engagements — A sponsor change can strand an engagement when the new sponsor does not care about the project, even if the technical work is…
- Common Python Errors and How to Fix Them — Syntax errors are usually easy to find, but there are a few gotchas. Whitespace errors can be tricky because spaces and tabs are…
- Common Python GUI Libraries and Their Features — Python has no single standard GUI tool; the choice depends on your specific project constraints rather than a universal best…
- Common Regex Patterns for Email and Phone Numbers — re.search() returns a match object when a pattern is found, or None when no match exists.
- Common STL Algorithms and Their Inputs — An STL algorithm operates on one or more sequences.
- Common String Methods — Strings are Python objects that bundle both data (the characters) and methods (built-in functions) into a single entity.
- Comparative Evaluation and Model Ranking — An AI can judge responses in three ways: scoring one response against the original question, checking a generated answer against…
- Comparative Evaluation and Preference Models — Language modeling metrics count tokens, and a token can be a character, a word, or part of a word, so tokenization must be fixed…
- Comparators and Sorting Keys — A TreeMap stores associations in a sorted tree, so its keys must be comparable, either through the Comparable interface or…
- Comparing and Sorting Data Structures — Tuples are immutable sequences indexed by integers, meaning their elements cannot be changed after creation.
- Comparing and Sorting Tuples — The DSU pattern transforms custom sorting into three simple, clear phases: decorate (add sort keys), sort (use Python's tuple…
- Comparing Dataset Sizes Across Language Models — The GPT-3 table's subsets total 499 billion tokens, but the model was trained on 300 billion tokens, and the source does not…
- Comparing Deployment and Pathfinder Careers — The source treats deployment FDE and pathfinder FDE as two different careers, not two levels of the same role.
- Comparing Generated Responses to Reference Data — Lexical similarity measures how much two texts overlap, most simply by counting how many tokens they share with a reference.
- Comparing Model Performance Fairly — Functional correctness evaluates AI outputs by measuring whether they achieve a measurable objective, such as a game score or…
- Comparing Objects in Java — Selection sort repeatedly finds the smallest remaining item in the unsorted region and places it at the boundary, so the sorted…
- Comparing Objects with compareTo — The == operator tests identity: whether two references refer to the same object in memory.
- Comparing Sequences and Strings — Tuple comparison proceeds element by element from left to right, stopping as soon as a difference is found.
- Comparing Strings: Equality and Ordering — Python treats uppercase and lowercase letters as different characters during string comparison because they have different ASCII…
- Comparing Tuples and Lists — Tuples support read-only indexing and slicing operations identical to lists.
- Comparing XML and JSON for Data Exchange — An XML element is a complete unit consisting of an opening tag, content, and a closing tag; it can also be represented as a…
- Comparison and Logical Operators — Comparison operators test relationships between values and return True or False, forming the foundation of conditional logic in…
- Comparison of Methods for Solving Finite Markov Decision Problems — Finite Markov decision problems can be approached with dynamic programming, Monte Carlo methods, or temporal-difference learning.
- Comparison Operators — Returns whether x is less than y. All comparison operators return True or False . Note the capitalization of these names.
- Comparison Operators and Boolean Logic — A palindrome is a text that reads the same forwards and backwards, identified by comparing the original string to its reversed…
- Comparison Operators and Boolean Results — The >> operator reads input into a variable, and the variable's type determines what input is accepted.
- Comparison operators and conditionals — Loops scan through data by following a three-part structure: initialize a tracking variable, compute on each item, and inspect…
- Comparison Operators and Logical Expressions — Initialize the extreme variable to None before the loop to mark it as empty.
- Comparison Operators in Python — An if-else statement creates two mutually exclusive branches: one executes if the condition is true, the other if it is false.
- Competitive Pressure and Market Pricing — A well-designed contract aligns the vendor's revenue with the customer's outcome and turns the engagement into a flywheel rather…
- Compile-Time Checks with static_assert — numeric_limits is a standard library class, declared in <limits>, that provides properties of built-in types such as the maximum…
- Compile-time Error Checking — Static assertions perform simple checks on properties known at compile time and report failures as compiler error messages.
- Compile-Time Errors in Java — Definite assignment requires the Java compiler to determine that a variable has been assigned before its value is used, and this…
- Compile-Time Evaluation — Generic programming writes one piece of code that works with many types by using type parameters, and the actual type is chosen…
- Compile-Time Evaluation with constexpr Variables — A constexpr function must be simple: its body is a return statement computing a value.
- Compile-Time Evaluation with static_assert — A constexpr function is declared with the constexpr keyword so that the compiler can evaluate it at compile time.
- Compile-time type functions — The sizeof operator returns the number of bytes in an object.
- Compiler Warnings and Errors — A Java annotation is a modifier with no direct effect on the program it annotates; its value comes from what a compiler can…
- Compilers: Translating Code Before Execution — An interpreter translates and executes source code line by line, making Python suitable for interactive programming where you…
- Complex Numbers — The mathematical functions for complex numbers are provided in the <complex> module.
- Complex Numbers: Real and Imaginary Parts — Complex numbers support the usual arithmetic operations, so they can be added, subtracted, multiplied, and divided.
- Complex Swing Components and the Model-View-Controller Pattern — The model for a JTextComponent is an object of type Document, separate from the component you see.
- Compliance Considerations for AI Products — AI is applied in marketing automation, content generation, and data analysis, each handling a different kind of routine or…
- Components of the Statistical Learning Framework — This lesson orients you to the workflow of this course.
- Compound Assignment Operators — Operator overloading redefines operators for user-defined types by writing an ordinary function whose name is the keyword…
- Compression Bounds — A hypothesis class H is a set of functions from X to Y.
- Compression Bounds in Machine Learning — Axis aligned rectangles have all sides parallel to the axes and form an uncountable infinite class.
- Compression Schemes — Axis aligned rectangles have all sides parallel to the axes and form an uncountable infinite class.
- Compression Schemes for Halfspaces — Separating polynomials are functions of the form sign(p(x)), with p a degree-r polynomial on R^d.
- Compression-Based Generalization Bounds — Theorem 30.2 considers a learning rule A that receives m examples but returns a hypothesis determined by k of them through a…
- Computation Graphs — A computation graph is a sequence of computations drawn as a directed graph, so each intermediate value has a clear source and…
- Computation Graphs and Backpropagation — Manual gradient computation uses grad(loss, tensor) from torch.autograd to ask how the loss changes with respect to a chosen…
- Computational Complexity of Learning Algorithms — Computational complexity measures the number of operations an algorithm performs.
- Computational Complexity of Training Neural Networks — Approximate ERM can remain computationally infeasible.
- Computational Foundations of Reinforcement Learning — Reinforcement learning algorithms are not uniformly modeled on neuroscience.
- Computationally feasible feature-selection approaches — Feature selection reduces a full feature collection to a subset used by the predictor.
- Compute-Optimal Model Design — A model's parameter count is usually written at the end of its name, as in Llama-13B.
- Computer Memory — Binary numbers use only 0 and 1.
- Computer Networks — The Internet is a worldwide network containing millions of connected computers.
- Computer Vision — The course is divided into two parts.
- Computer Vision with Deep Learning — Chapter 5 examines practical computer-vision examples with a focus on image classification.
- Computing Attention Scores for a Query — Normalization turns attention scores into attention weights that sum to 1, which helps interpretation and training stability
- Computing Attention Weights for All Input Tokens — Attention scores are dot products between input vectors and can be computed with nested loops or with inputs @ inputs.T.
- Computing Attention Weights Step by Step — Self-attention with trainable weights keeps the basic idea of computing context vectors as weighted sums over input vectors…
- Computing Context Vectors with Attention Weights — Attention scores are dot products between input vectors and can be computed with nested loops or with inputs @ inputs.T.
- Computing Gradients via Autograd — The grad function computes one gradient on request and returns it, while the backward method fills the grad attribute of every…
- Computing Gradients with loss.backward in PyTorch — The gradient measurement runs a forward pass, computes a loss against a target, calls backward, and reports one mean absolute…
- Computing Softmax Probabilities for a Classifier — torch.argmax with dim=1 returns the index of the highest value in each row, which turns a row of class scores into a class label.
- Computing Training Set Losses — Computing training and validation set losses is a way to assess the quality of LLM-generated text during training.
- Computing v* with Policy Iteration — Policy iteration is applicable to action values, not only state values.
- Computing Validation Set Losses — Computing training and validation set losses is a way to assess the quality of LLM-generated text during training.
- Concrete Classes and Their Uses — Concrete classes, especially those with small representations, are used much like built-in types: as local variables, accessed…
- Concrete Subclasses and Object Creation — An abstract class is not used to construct objects; it exists only as a basis for making subclasses and to express the…
- Concurrent Programming with Tasks and Threads — A thread is joined when the caller waits for that thread to terminate.
- Concurrent Programming with Threads and Locks — The standard library's facilities are classified into groups, which gives you a map of the whole library before you learn each…
- Concurrent Tasks and Futures — Threads of one program share a single address space, so they can communicate through shared objects, while processes generally…
- Conditional Execution with if Statements — try-except blocks allow programs to catch and handle errors gracefully instead of crashing when unexpected situations occur.
- Conditional Logic — Python has no switch statement; this is a deliberate design choice, not an oversight.
- Conditional Logic and Decision Making — The Guardian Pattern strategically places a guard condition before a risky operation in an 'and' expression to prevent runtime…
- Conditional Logic in Python — Python has no switch statement; this is a deliberate design choice, not an oversight.
- Conditional Logic with Dictionaries — Dictionaries outperform lists and variables for character counting because they only allocate space for characters that actually…
- Conditional Logic with if Statements — An interactive input loop uses while True to run indefinitely and break to exit when the user provides a specific command.
- Conditional Probability — Realizability demands perfect agreement between some hypothesis in H and a target labeling function.
- Conditional Probability in Classification — 1-NN is analyzed as a sample-dependent hypothesis h_S for binary classification.
- Conditional Statements — A dictionary is a data structure that stores key-value pairs, allowing you to look up values by their meaningful keys rather…
- Conditional Statements (if, elif, else) — The if statement is used to check a condition: if the condition is true, we run a block of statements (called the if-block )…
- Conditional Statements (if/else) — When Python encounters a continue statement, it immediately stops executing the current iteration and returns to the top of the…
- Conditional Statements and Boolean Logic — The counter pattern is a fundamental computational technique: initialize a counter to 0, loop through data, check a condition…
- Conditional Statements and Comparisons — Counting uses a counter initialized to 0, incremented by 1 on each iteration, to track the number of elements processed.
- Conditional Statements and Control Flow — Python allows non-boolean values as operands in logical operators, interpreting any nonzero number as 'true'
- Conditional Statements and Decision Making — All programs are built from four fundamental patterns: sequential code (executing instructions in order), conditional code…
- Conditional Statements and Logic — raw_input() captures text from the keyboard and returns it as a string to your program.
- Conditional Statements and User Input — User-supplied comments in backup filenames provide context and improve file organization when managing multiple backups.
- Conditional Statements in Java — Boolean operators form complicated conditions from boolean values.
- Conditional Statements with if and else — The in operator is a boolean operator that returns True if a substring is found in a larger string, and False otherwise.
- Conditional Statements: if, elif, and else — A boolean expression evaluates to True or False, which belong to the bool data type.
- Conducting Effective Discovery Interviews — A discovery interview, as the source presents it, is a conversation of about thirty minutes aimed at learning how work is…
- Configuring the GPT Model with a Dictionary — The GPTModel architecture uses dropout layers in three distinct places: the embedding layer, the shortcut layer, and the…
- Configuring the PATH Variable — Open the Windows command line by clicking Start, then Run, typing cmd, and pressing Enter
- Connecting a Client to a Server in Java — TCP/IP is the paired protocol arrangement behind Internet communication, and its TCP half provides reliable two-way communication.
- Connecting Attention and Linear Layers in a Transformer Block — Gradients are computed for each layer with loss.backward(), and a per-layer mean of absolute gradient values makes layers easy…
- Connecting Field Feedback to Product Decisions — The FDE role is described by practitioners in two ways: as a product strategy that discovers what the product must become, and…
- Connecting Python to SQLite Databases — Use the Database Browser for SQLite to verify that your Python programs are correctly reading and writing data to the database.
- Connecting to a Database and Creating Tables — SELECT retrieves specific columns and rows from a database table using WHERE to filter and ORDER BY to sort results.
- Connecting to a Database with Python — DROP TABLE IF EXISTS safely removes a table and allows scripts to run repeatedly without errors.
- Consistent Algorithms — The Halving algorithm predicts by majority vote among the hypotheses that remain viable.
- const and Immutable Values — constexpr is the C++ keyword for generalized and guaranteed constant expressions.
- Const Correctness in C++ Classes — A constructor is a special member function used for object initialization, so it is the place to make sure each new object…
- const Correctness in Function Parameters — A function can return a result by modifying the data its caller passed in, which works when an argument is taken by nonconst…
- Const References — The unary suffix & in a declaration means reference to, and a reference is another name for an existing object.
- Const References and Read-Only Parameters — A task can hand back a result by modifying data that the caller passed by non-const reference, which is a less obvious route…
- Constant Expressions and Compile-Time Evaluation — const means roughly 'I promise not to change this value,' and the compiler enforces that promise. It is used primarily to…
- Constant Expressions in C++ — A constexpr function is declared with the constexpr keyword so that the compiler can evaluate it at compile time.
- Constant-α Action-Value Methods — Initial estimates affect action-value methods because they provide the starting values used before experience is available.
- Constants and Shared Values in Programs — The chat room application consists of two programs: a server, ChatRoomServer.java, and clients.
- Constraint Enforcement during Optimization — Optimization-based artificial intelligence can behave unpredictably because a system may discover paths to its objective that…
- Constructing JSON with Python Dictionaries and Lists — json.loads() transforms a JSON string into a Python data structure by parsing the text and building corresponding lists…
- Constructors and Class Design in C++ — Declare a function noexcept when it may not throw; the keyword makes that promise visible in the declaration.
- Constructors and Destructors — An object must be constructed before it is used, and it is destroyed at the end of its scope.
- Constructors and Destructors for Resource Handles — Copying of an object of a class is defined by two members: a copy constructor and a copy assignment.
- Constructors and Initialization — A Vector variable is created with a size, as in Vector v(6);, and that size is the number of elements the object describes.
- Constructors and Initialization in C++ — A container is an object holding a collection of elements, and Vector is the example used to introduce cleanup.
- Constructors and Instance Variables — A custom exception class extends Exception or RuntimeException.
- Constructors and Member Initialization — A member function marked const promises that it will not modify the object it is called on, and the compiler enforces that…
- Constructors and Object Creation in Java — Date, Random, and Color are standard Java classes in java.util and java.awt, and each must be imported before use.
- Constructors and Object Initialization in Java — A simple name inside a method is resolved first against local variables and parameters in scope, and only then against member…
- Container Algorithms in C++ — Standard-library algorithms tend to be more carefully designed, specified, and implemented than the average hand-crafted loop.
- Container Characteristics in the STL — An almost container holds elements and is therefore a container, but it has restrictions or added facilities that make it…
- Container iteration with range-based for loops — find_all() finds all occurrences of a specified character in a container and returns a range of iterators pointing to them.
- Container Iterator Names — Every iterator supports two shared operations: ++ yields an iterator that refers to the next element, and * yields the element…
- Container Operations in C++ — Standard library algorithms are defined in namespace std, presented in the algorithm header, and take sequences as their inputs.
- Container Operations: push_back() and erase() — Algorithms such as replace() and sort() can change element values without changing the number of elements.
- Container Overview — A container is an object that holds elements, and each element is one of the items it holds.
- Container-specific Iterator Implementations — Iterator types differ because each iterator must hold the information needed to do its job for a particular container type.
- Containers and Algorithms in the Standard Library — The standard library's facilities are classified into groups, which gives you a map of the whole library before you learn each…
- Containers and Components in Swing — Calling container.setLayout(null) removes the layout manager, so the programmer takes complete responsibility for positioning…
- Containers and Their Elements — Iterator types differ because each iterator must hold the information needed to do its job for a particular container type.
- Containers in C++ Standard Library — Specialized containers are containers that hold elements but have restrictions or added facilities.
- Containers of Polymorphic Objects — A resource leak happens when a resource, such as dynamically allocated memory, is acquired but never released, leaving it…
- Context and Conversation History in Models — A model has three memory mechanisms: internal knowledge, short-term memory (context), and long-term memory (external sources…
- Context Construction for Foundation Models — The context given to a model for each query shapes both its accuracy and its exposure to risk, while instructions tend to stay…
- Context Length and Efficiency — Context length is the maximum amount of information a single prompt can include, so it acts as a budget that every prompt spends…
- Context managers and the with statement — The finally block executes unconditionally after try and except blocks, making it ideal for resource cleanup.
- Context Vectors and Input Representations — An attention mechanism transforms input elements into enhanced context vector representations.
- Contextual Retrieval — Chunk context generation produces a short context that situates a chunk within the overall document, with the aim of improving…
- Contextualized Output Embeddings — LLMs commonly produce their own embeddings, which are part of the input layer and are updated during training.
- Continual Learning in Language Models — In-context learning teaches a model a behavior through examples or instructions placed in the prompt, without updating the…
- Continuing Tasks and On-Policy Distributions — The on-policy distribution describes how state probability is distributed under a policy.
- Continuous-Valued Features — RBFs turn the binary idea of coarse coding into a continuous feature response.
- Contract Alignment in Outcome Pricing Deals — Standard enterprise procurement is configured for SaaS-style contracts with predictable monthly fees, defined seat counts, and…
- Contract Analysis Script — The demo session ran a contract analysis script on five real inbound contracts, producing a memo for each that the deputy GC read.
- Contract Issue Identification — The demo session ran a contract analysis script on five real inbound contracts, producing a memo for each that the deputy GC read.
- Contract Structures for AI Deployments — A milestone-based contract releases a fraction of the total fee each time an agreed milestone is hit, so payment follows…
- Contract Structures for AI Pricing — A hybrid base-plus-outcome pricing model combines a base subscription fee with an outcome component.
- Control Abstractions and Machine Independence — A black box is a component that can be used without knowing its implementation, provided its interface is known.
- Control Flow and Program Logic — An Easter Egg is a harmless, hidden feature programmers add for fun; in this exercise, it is a special message triggered by the…
- Control Flow and Program Structure — A nested conditional is an if or if-else statement placed inside another, creating a hierarchy where the inner condition is only…
- Control Flow: if Statements — As you might have guessed, this is achieved using control flow statements. There are three control flow statements in Python if…
- Control Flow: if, elif, else Statements — Reserved words are a fixed set of 35 words that have unchangeable, singular meanings to Python and form the core of the…
- Control Flow: Loops and Conditionals — Use the continue statement to skip lines that do not meet your criteria, jumping immediately back to the next iteration of the…
- Control Flow: Making Decisions with if Statements — Programming languages, like natural languages, have vocabulary (words that must be spelled correctly) and grammar (rules for…
- Control or Operations Research Perspectives on Reinforcement Learning — Choose a resource category according to your reading goal.
- Control Statements — A control statement determines which statements run next, so the same code can take different paths depending on values at run…
- Control Statements and Subroutines — Control statements control the flow of a program's execution, which is the order in which its statements are carried out.
- Control with Function Approximation — Function approximation introduces distinctive challenges into reinforcement learning.
- Controlling Prompt Length — A few-shot prompt pairs finished examples with an open slot, and the model is asked to complete that slot.
- Convergence in Optimization — Variable step size SGD changes the update scale during optimization.
- Convergence in Reinforcement-Learning Estimates — Sample-average updating reduces the step size according to αn(a) = 1/n.
- Convergence of Gradient Descent — Projection adds a constraint-enforcing second stage to the ordinary SGD update.
- Convergence of Semi-gradient Sarsa — Semi-gradient Sarsa with function approximation was first explored by Rummery and Niranjan in 1994.
- Convergence of TD Methods — Both TD and Monte Carlo methods can approach the correct predictions.
- Conversational Bots — Conversational bots serve many applications, including customer support, product copilots, social simulation, and 3D characters…
- Converting a Single Token ID into an Embedding Vector — An embedding layer applied to several token IDs returns a matrix with one row per input ID, so the row count follows the length…
- Converting Between Data Types — int() converts values to integers by truncating (not rounding) the decimal portion
- Converting Between Data Types: An Overview — float() converts integers and numeric strings to floating-point numbers, adding decimal representation where none existed.
- Converting Between Lists and Tuples — Commas create tuples, not parentheses. Parentheses are optional and exist only for readability.
- Converting Bitsets — to_string() is the inverse of the constructor that takes a string, and it returns the bitset's binary value as text with the…
- Converting GPT Model Outputs into Text — Initializing the 124M GPT model and printing its output tensor gives a shape of [2, 4, 50257], where 50257 is the tokenizer's…
- Converting Lists Back to Strings — A list of characters is fundamentally different from a string, even though both are sequences.
- Converting Logits to Class Labels — compute_accuracy returns the fraction of correct predictions on a dataset, a value between 0 and 1.
- Converting Python Objects to JSON with json.dumps() — json.loads() transforms a JSON string into native Python structures—lists and dictionaries—not a special JSON type.
- Converting Skeptical Stakeholders to Supporters — Stakeholders include anyone who can affect or be affected by a project, which usually goes beyond the technical team.
- Converting Strings to Numbers — NumberFormatException occurs when a string is not a legal representation of a number, as in Integer.parseInt("fred"), and…
- Converting Strings to Numbers with int() and float() — str() converts any value into its string representation without modifying the original value
- Converting to Integers with int() — float() converts integers and numeric strings to floating-point numbers, adding decimal representation where none existed.
- Converting to Strings with str() — float() converts integers and numeric strings to floating-point numbers, adding decimal representation where none existed.
- Converting Tokens to IDs — A vocabulary maps each unique token to a unique integer called a token ID, and it is built from the tokens in the training text.
- Converting XML to JSON — fromstring converts an XML string into a tree structure, enabling programmatic access to its data.
- Convex Functions — Convexity of a learning problem has two requirements.
- Convex Hulls and Convex Combinations — The compressed object is a subset of training points, not the weight vector itself.
- Convex Learning Problems — Convexity of a set means that every line segment joining two points in the set stays inside the set.
- Convex Learning Problems and Regularization — Linear regression can be expressed as a convex learning problem by representing each hypothesis with a parameter vector.
- Convex Loss Functions — Tikhonov regularization augments the loss with λ ‖w‖2.
- Convex Optimization — Regularization changes the optimization target by adding a term to the loss objective.
- Convex Sets — Convexity of a learning problem has two requirements.
- Convnet Filter Visualization — DeepDream uses the input to a convnet as the object being optimized.
- Convolutional Feature Maps — Subsampling replaces local groups of feature-map values with averaged summaries.
- Convolutional layers — The example creates a Keras Sequential model and adds layers in a fixed order.
- Convolutional Neural Network Architecture — A pretrained network is a saved network trained previously on a large dataset, such as ImageNet.
- Convolutional Neural Network Feature Visualization — DeepDream changes an existing image by maximizing activations inside a convolutional network.
- Convolutional Neural Network Representations — Style transfer assigns content and style to different input images and seeks a generated image that combines them.
- Convolutional Neural Networks — The convnet progressively exchanges spatial detail for deeper feature representations.
- Copy and Move Construction — A constructor is a member function that initializes objects of a class, and it is selected by the arguments supplied at…
- Copy and Move Operations — The compiler can generate default implementations for special member functions as needed; an ordinary constructor is not…
- Copy Assignment — A copy constructor creates a new object from an existing one, and for the Vector class it allocates space for the required…
- Copy Assignment and Self-Assignment — Copying of an object of a class is defined by two members: a copy constructor and a copy assignment.
- Copy Assignment Operator Design — The copy constructor creates a new object by allocating new storage with elem{new double[a.sz]}, setting sz from a, and copying…
- Copy Constructor Basics — The copy constructor creates a new object by allocating new storage with elem{new double[a.sz]}, setting sz from a, and copying…
- Copy Constructors and Copy Assignment — A move constructor transfers ownership of an object's resources to a new object without copying them.
- Copy Constructors and Copy Operations — Move semantics transfers a resource to a new scope instead of duplicating it.
- Copy Control and Ownership of Resources — A constructor that acquires a resource creates a duty, and the class needs a destructor to release that resource.
- Copying Arrays Element by Element — Assigning one array variable to another copies the reference, so both variables refer to the same array object.
- Copying Objects in C++ — A concrete type allows direct manipulation of its objects.
- Copying Values into Container Storage — A braced list such as {1,2,3,4,5} causes the compiler to create a std::initializer_list object, which is then given to the…
- Correct Labeling Function — Classifier error measures the probability of an incorrect prediction on a randomly drawn instance.
- Correctness of Programs — Efficiency is important, but it is secondary to correctness, and a program that is not correct is not efficient regardless of…
- Correlation between AI Judges and Human Evaluators — AI judges are fast, easy to use, and relatively cheap compared with human evaluators, which makes them practical to run often.
- Cosine Annealing for Learning Rate Schedules — Linear warmup gradually increases the learning rate from initial_lr to peak_lr during the first warmup_steps batches of training.
- Cost Minimization Clustering Objectives — The k-Means objective measures the sum of squared distances from each point to the centroid of its cluster.
- Cost Per Request for Inference Services — Throughput measures the output tokens per second an inference service generates across all users, and it can also be expressed…
- Cost Planning for Model Inference — Using a model API means calling a provider's model, while hosting means running the model on infrastructure you operate or rent.…
- Cost-Benefit Analysis in Model Selection — A comparative ranking identifies which model is better but does not establish that either model is good enough for a given use…
- Cost-Benefit Analysis of Redesign — Early stakeholder involvement means bringing a stakeholder into the design process at the start, so objections can change the…
- Costs and Resource Planning for Model Training — General-purpose models can outperform domain-specific models as they become more capable, so the assumption that specialized…
- Counter and Accumulator Patterns — A divisor D of a positive integer N is a number where N % D equals zero, meaning the remainder is zero.
- Counting and summing patterns — Loops scan through data by following a three-part structure: initialize a tracking variable, compute on each item, and inspect…
- Counting and Summing: Accumulating Values in Loops — Initialize the extreme variable to None before the loop to mark it as empty.
- Counting Neighbors on a Grid — Each cell's next state depends on whether it is alive or dead in the current time step.
- Counting Parameters in a GPT Model — The size of a GPT model is its parameter count multiplied by the bytes per parameter, and this example assumes 4 bytes for each…
- Counting Up with a Loop — A countdown loop repeatedly decreases a control variable until a condition is no longer true, printing or using the variable at…
- Counting with Loops — Data scanning loops follow a three-step construction: initialize variables before the loop, perform computation on each item…
- Counting Words and Analyzing Text Data — translate() with str.maketrans() is the most flexible method for removing or replacing characters; use empty fromstr and tostr…
- Counting Words with a Map — Sorting WordData objects by frequency in descending order means placing the record with the highest count first.
- Covering and Rademacher Complexity — An r-cover provides a nearby representative for every point in A.
- Covering Numbers — The chaining technique uses covering numbers to bound Rademacher complexity.
- CPU and GPU Memory in AI Accelerators — An AI accelerator uses three memory tiers: on-chip SRAM caches, GPU high-bandwidth memory, and CPU system memory, each with a…
- Crafting Effective Training Data — An AI model is only as good as the data it was trained on, so its performance is tied to the quality and relevance of that data.
- Creating a Custom Dataset for Instruction Data — Each split is loaded by creating an InstructionDataset for it and then wrapping that Dataset in a DataLoader.
- Creating a JFrame Window — The default close operation, set with setDefaultCloseOperation, decides what happens when the user clicks a JFrame's close box.
- Creating a Program Specification — Problem analysis identifies gaps and ambiguities in a problem statement before you begin coding.
- Creating a Runbook for a Software Project — A showcase README has six sections in a fixed order: project description, impact statement, architecture diagram and…
- Creating a Table with CREATE TABLE — INSERT adds new rows to a table; specify the table, columns, and values.
- Creating a Vocabulary from a Training Set — Tokenization cuts text into individual tokens, and a new text sample is cut in the same way before any numbers are assigned.
- Creating Actions with AbstractAction — An Action can be passed to the constructor of a JButton or a JMenuItem, so one Action can drive several components.
- Creating an Effective Portfolio — A portfolio holds artifacts that a reviewer can examine, not restated resume bullets.
- Creating an Effective Project Showcase — The eval set is documented in /evals, with a README inside that directory.
- Creating and Assigning Variables — Variable names must start with a letter or underscore and can contain letters, numbers, and underscores. They cannot start with…
- Creating and Connecting to a Database — INSERT adds rows to a database table; commit() must be called to permanently save changes to the database file.
- Creating and Filling an Array of Objects — Once an array of objects is filled, classlist[i] refers to a Student object, and it can be used anywhere a Student variable…
- Creating and Indexing Lists — append adds a single element to the end of a list, treating the argument as one indivisible object
- Creating and Initializing Arrays — A parameter may have an array type such as int[], so one argument can deliver an entire array to a subroutine.
- Creating and Initializing Dictionaries — A dictionary is a mapping between keys and values, not a sequence indexed by position like a list.
- Creating and Initializing Lists — Lists are mutable: you can change their contents after creation by reassigning elements using bracket notation on the left side…
- Creating and Modifying Database Tables — A database is a persistent, disk-based file that stores data as key-value pairs, unlike a dictionary which lives in RAM and…
- Creating and Modifying Dictionaries — Keys and values are the two components of a key-value pair (item). Keys are unique identifiers; values are the data they point to.
- Creating and Modifying Lists — Built-in functions (len, sum, max, min) extract information from lists without requiring custom loops.
- Creating and Organizing Modules — An import statement tells Python to find a module file, execute its code, and make its contents available to your program.
- Creating and Querying Databases with Python — The Database Browser for SQLite is a visual tool that reads SQLite database files and displays their contents in a user-friendly…
- Creating and Querying Relationships Between Tables — The fundamental rule of database normalization is to never repeat the same string data in a column more than once.
- Creating and Running Threads — A thread can be defined by creating a subclass of Thread and overriding the run() method.
- Creating and Saving Python Files — Running a Python script means telling the Python interpreter to read and execute code from a file, rather than typing code…
- Creating and Starting Threads in Java — A thread is alive from the time it is started until it terminates, and a dead thread cannot be restarted; isAlive() tests…
- Creating and Unpacking Tuples — Tuples are immutable collections created using comma-separated values, optionally enclosed in parentheses. Once created, their…
- Creating and Using Custom Objects — The dir() function reveals all capabilities (methods and attributes) of any Python object by returning a list of strings.
- Creating and Using Objects in Java — Declaring an array of objects uses the class name as the base type, such as Student[] classlist.
- Creating and Using Your Own Modules — Import the math module using import math to load it into your program and create a module object.
- Creating Buttons in Java GUI Programming — A JButton can show an icon in addition to text, or instead of text, and icons are represented by the Icon interface.
- Creating Buttons in Java Swing — A BufferedImage is an in-memory canvas with a fixed width, height and type, and Graphics2D is the tool that paints onto it.
- Creating Common Dialog Boxes with JColorChooser — A dialog is a window used for short, single-purpose interactions, such as showing a message, asking a question, or letting the…
- Creating Custom Classes — A class is a blueprint; an object is an instance of that blueprint. When you assign a value like i = 5, you create an object of…
- Creating Custom Cursors — The ARGB color model stores each pixel with alpha, red, green, and blue components, and the alpha channel controls transparency.
- Creating Custom Exception Classes — Exceptions whose classes are not subclasses of Error or RuntimeException are checked exceptions, and the compiler requires the…
- Creating Custom JPanel Components — The main panel of the card game uses a BorderLayout, with the drawing surface in CENTER and the subpanel of three buttons in…
- Creating Data Loaders for Text Classification — Padding extends each input shorter than the target length until it reaches the maximum number of tokens the model supports, so…
- Creating Effective Portfolio Pieces with Anthropic Plugins — Anthropic plugin templates are enterprise templates introduced at Code with Claude in 2026, spanning seven named industry areas.
- Creating Function Objects with bind() — Placeholders for bind() live in the subnamespace std::placeholders.
- Creating Menus and Menu Items — A JMenuBar is a container for menus with no name and a no-parameter constructor; menus are placed in it with add(JMenu).
- Creating Objects and Object Variables — Assigning one object variable to another copies the reference stored in the first variable, not the object it refers to.
- Creating Objects from Classes — A class is a template that defines what data and code each object will have; the class keyword does not create an object.
- Creating Objects with Constructors — An instance variable can receive an initial value directly in its declaration, such as public int die1 = 3;, and that value is…
- Creating Objects with new — An object is garbage when no variable refers to it, and the system reclaims its memory
- Creating Objects with the new Keyword — A variable of object type holds a reference to an object, never the object itself, so the object is not 'stored in' the variable.
- Creating Portfolio Projects without Real Customers — A candidate without a real customer can find one person with one real problem and treat solving it as a genuine engagement.
- Creating PyTorch Dataset Objects — Instantiating a PyTorch dataset means calling a custom class such as SpamDataset with a CSV file name and keyword arguments…
- Creating Reusable Code with Generic Classes and Methods — A type parameter is a placeholder written in angle brackets after a class name, and it works much like a formal parameter in a…
- Creating Streams — An array does not have a stream() method, so you cannot create a stream by calling stream() on the array itself.
- Creating Streams from Collections and Arrays — Stream.generate(supplier) creates a sequential stream that is effectively infinite: it keeps producing values forever or until…
- Creating Tables and Defining Schemas — A database connection is established using sqlite3.connect(filename), which creates a link to a local database file or remote…
- Creating Tables with SQL — Databases require you to declare column names and data types before creating a table, unlike Python lists or dictionaries which…
- Creating Tensors with torch.tensor — A tensor is a multi-dimensional data container, and PyTorch tensors are data containers for array-like structures.
- Creating Threads with Runnable — ExecutorService is a Java interface in java.util.concurrent that defines services for executing submitted tasks, and it is used…
- Creating Token Embeddings — Input-target pairs for next-word prediction are made by taking the input tokens and shifting them one position to form the…
- Creating Token Embeddings for LLM Training — A continuous vector representation, or embedding, is necessary because GPT-like LLMs are deep neural networks trained with the…
- Creating Training Batches for Language Models — A tokenizer's vocabulary can be extended with special context tokens that carry meanings ordinary words cannot express.
- Creating Tuples with make_tuple — Tuple elements are numbered starting from zero, unlike pair elements that are named first and second.
- Creating Your First Java Project in Eclipse — A workspace is the directory where your work is stored, and you can use several workspaces and choose one at startup.
- Creating Your First Python Class — An object bundles data (attributes) and behavior (methods) into a single, organized unit.
- Creating Your Own Classes — A class is a blueprint or template; an object is a specific instance created from that blueprint with its own state.
- Creating Your Own Classes and Objects — Lists are objects that bundle together data (the items they contain) and behavior (methods like append(), sort(), and…
- Creative AI for Image Generation — A latent space of images is a low-dimensional vector space whose points can be mapped to realistic-looking images.
- Creative applications of computer vision — Neural style transfer is a two-source image-modification task: the target supplies content and the reference supplies style.
- Cross Entropy — Perplexity is the exponential of entropy or cross entropy, not a relabeled version of them.
- Cross Entropy in Language Models — Bits per token is not directly comparable across language models that use different tokenization methods, because each token can…
- Cross Entropy Loss in Language Modeling — A compute-optimal model delivers the best performance achievable for a fixed compute budget, so teams usually start from the…
- Cross-entropy loss — Perplexity evaluates a model in language modeling by expressing uncertainty about the next token.
- Cross-Entropy Loss for Language Models — Padding positions in a batch are excluded from the training loss by assigning them the placeholder value -100 in the target lists.
- Cross-Entropy Loss in Language Model Training — Instruction masking replaces the target token IDs for the instruction with -100, the ignore_index value, so the cross-entropy…
- Cross-Platform Development Considerations — Python has no single standard GUI tool; the choice depends on your specific project constraints rather than a universal best…
- Cross-Platform File Handling in Python — sys.version_info is a named tuple that breaks down your Python version into major, minor, micro, and releaselevel components…
- Crowdsourcing Comparisons for AI Model Evaluation — Crowdsourced comparisons collect wide, hard-to-game signals, but they make standardization and quality control difficult because…
- CRUD Fundamentals: Create, Read, Update, Delete — UPDATE modifies existing records in a table using the SET keyword to specify columns and new values.
- Cultivating Good Taste in Product Development — Taste in product development is described as the ability to produce high-quality work by exposing oneself to good things.
- Cumulative Reward — Return turns a sequence of rewards into one quantity using a specified function.
- Curating Data for Model Training — A model's tool use ability can be improved by showing it tool use examples, typically written with domain experts who know which…
- Curating Data for Specific Languages and Domains — Large, easily collected web data such as Common Crawl is convenient but contains real quality problems, including clickbait…
- Curating Specialized Datasets — General-purpose models carry the knowledge of their training data, so they often struggle with specialized domains that were…
- Curly Braces and Function Bodies in C++ — Comments in C++ are written for the human reader, and the compiler ignores them.
- Custom Component Creation — A custom Swing component can be defined as a subclass of JPanel, which supplies its layout, size handling, and inherited colors…
- Custom Input and Output Operators for User-Defined Types — The is>>c input operator skips whitespace by default, so it stores the first non-whitespace character it finds.
- Custom Sorting with Lambda Functions — Tuple comparison proceeds element by element from left to right, stopping as soon as a difference is found.
- Customer Dashboard Essentials — The source calls the customer dashboard a trust surface, not a sales surface, because it shows the customer what the system is…
- Customer Discovery in Early Product Work — Rapid prototyping means building a demo quickly and putting it in front of potential customers, because a tangible product draws…
- Customer Engagement Planning — The customer is not one person. The source describes it as at least four stakeholder roles: sponsor, blocker, line user, and…
- Customer Engagement Storytelling — Simulation interviews ask you to recount specific past customer engagements, so specificity and clear structure matter more than…
- Customer Handoff for Regulated-Industry Systems — The belief that fewer missing fields is always better can be wrong when the customer's real requirement is audit-readiness…
- Customer Integration Engineering — A forward-deployed engineer is embedded inside a customer organization to build integrations and handle the politics that…
- Customer Success as an Outcome Strategy — An FDE is a customer-facing software engineer who deploys a technical product for a customer, and the role is justified only in…
- Customizable Features — Generalizing a feature starts with a solution built for one customer and asks what shared version belongs in the platform.
- Customizing Table Editing and Display — A table's data lives in a table model, and methods such as setValueAt, removeRow, and addRow change that data; the view updates…