Concepts starting with M
256 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- Machine Code and Binary: What the CPU Actually Understands — The CPU is the part of the computer built to obsessively ask 'What is next?' and determine the next operation to execute.
- Machine Language — A CPU directly executes machine language, not a high-level program.
- Machine Language and Binary Representation — A compiler translates an entire program from high-level source code to machine language in one complete pass, then saves the…
- Machine Language Instruction Execution — The CPU's normal behavior is a sequential fetch-and-execute process.
- Machine Language Instructions — A program is stored as a sequence of machine language instructions in main memory.
- Machine Learning — Deep learning is a subset of machine learning.
- Machine Learning Data Terminology — A class is a category in a classification problem.
- Machine Learning Datasets — Data provides the material from which deep-learning systems learn.
- Machine Learning Essentials — Unsupervised learning finds useful transformations of input data without target values.
- Machine Learning Foundations — The basic prerequisite is Python programming experience.
- Machine learning model capacity — Optimization and generalization measure different kinds of model performance.
- Machine learning model evaluation — Model evaluation starts with a deliberate division of data into training, validation, and test sets.
- Machine Learning Problem Definition — Think of machine learning as a workflow of connected decisions, not only as model construction.
- Machine Learning Problem Types — Data preparation turns raw, heterogeneous information into scaled and appropriately formatted tensors.
- Machine Learning Workflow — Part 1 is a staged introduction rather than a single isolated topic.
- Magic Methods and Protocols — Special methods are methods with double underscores that have special significance in Python classes. They are called…
- Main Memory and CPU Data Movement — Registers are small CPU memory units that hold individual numbers for immediate access.
- Maintaining Dashboard Relevance in AI Engagements — The customer dashboard is a trust mechanism that keeps an AI engagement aligned with what the customer values.
- Maintaining Data Structural Integrity — Text is inherently unstructured, so data placed in a text-based model's context loses its layout unless structure is maintained…
- Managing AI Model Memory Limitations — Anterograde amnesia is the failure of an AI model to retain information from one session to the next.
- Managing Challenges 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…
- Managing Dynamically Allocated Arrays in Classes — The copy constructor creates a new object by allocating new storage with elem{new double[a.sz]}, setting sz from a, and copying…
- Managing Project Timelines in Customer Work — A lead's role expands gradually, supported by a senior shadow who observes and gives specific feedback.
- Managing Shared State Between Threads — Multiple threads can be coordinated by tracking how many of them are still running in a shared counter named threadsRunning.
- Manipulating Tensor Shapes — torch.tensor() creates a PyTorch tensor from a Python value that you pass to it as an argument.
- Manipulating Tensors in NumPy — Tensor slicing is the selection of specific elements in a tensor.
- Manual Gradient Computation with the grad Function — Calling .backward on the loss computes gradients for the leaf nodes of the graph, so you do not need to derive them by hand.
- Many-to-Many Relationships and Junction Tables — A one-to-many relationship connects one entity instance to multiple instances of another entity.
- Map, Filter, and Reduce Functions — Lambda functions used as sort keys provide a temporary comparison value for each element without modifying the original list.
- Maps and key-value pairs — Subscripting a map uses a key of the first type to return the value of the second type associated with it
- Maps and Their Sequences of Key-Value Pairs — A predicate is a specified requirement or condition that an element must fulfill, and an algorithm can accept it as a parameter…
- Maps in the Java Collection Framework — The Java Collection Framework divides generic data structures into collections, represented by Collection<T>, and maps…
- Margin and Hard-SVM — Hard-SVM connects large-margin classification to a constrained optimization problem.
- Marginal Distribution — Realizability demands perfect agreement between some hypothesis in H and a target labeling function.
- Margins and Generalization — Compression keeps a smaller representation from which a zero-training-loss predictor can be reconstructed in the realizable case.
- Markov Decision Process State and Action Spaces — Dynamic programming solves MDPs with a worst-case operation count bounded by some polynomial function of the number of states…
- Markov's Inequality — The PAC-Bayes theorem bounds an expected-loss quantity using training-set loss and a square-root term.
- Masked and Autoregressive Language Models — A language model encodes statistical information about one or more languages, which tells us how likely a word is to appear in a…
- Masking Additional Attention Weights with Dropout — Dropout is a training technique in which randomly selected hidden layer units are ignored, which helps prevent overfitting by…
- Massart Lemma — The H1 proof reduces a Rademacher-complexity calculation to a finite-set problem.
- Mastering Conditional Statements in Java — An empty statement is a statement that consists simply of a semicolon and tells the computer to do nothing.
- Mastering Customer Simulation Exercises — Bad news delivered with heavy softening can leave the customer unsure of the core fact and what they must do next.
- Mastering Customer Simulation Scenarios — Effective bad news communication follows five moves in order: lead with the news, take specific responsibility, name the cause…
- Mastering Feature Representation for Machine Learning — Feature transformations should be selected according to the property that needs to change.
- Mastering Object Lifecycle Operations — An object is copied or moved in five situations: as the source of an assignment, as an object initializer, as a function…
- Matching Patterns in Streams — Searching a stream for a pattern is the simplest use of a pattern.
- Matching Patterns with regex_search — A submatch is the text captured by a parenthesized part of a regular expression, and matches[0] holds the complete match.
- Matching the End of Lines with $ — The caret (^) is a zero-width anchor that matches the position at the very beginning of a line, not a character.
- Matching Words in a String with Regular Expressions — A reg ex_iterator reports the matches of a pattern over a range, and it cannot be pointed directly at an istream, so text should…
- Mathematical Foundations of Neural Networks — A tensor is a container for data, almost always numerical data.
- Mathematical Functions in C++ — C++ is widely used for scientific, engineering, financial, and other computation involving sophisticated numerics, especially…
- Mathematical Operators in Python — Order of operations (PEMDAS) determines which calculations happen first: Parentheses, Exponentiation, Multiplication/Division…
- Matrices and Arrays — A 3D tensor is a collection of matrices packed into a new array.
- Matrices, Sets, and Domains — Lowercase letters commonly denote scalars or abstract objects; boldface lowercase letters emphasize vectors.
- Matrix Multiplication — Dimensionality reduction maps vectors from R^d to R^n using a linear transformation, where n is smaller than d.
- Matrix Multiplication on the GPU — GPU timing results are specific to the hardware used, so a speed-up ratio is only meaningful with its hardware and measurement…
- Matrix Multiplication with Tensors — Reshaping changes how a fixed sequence of values is grouped into rows and columns; the total number of elements must stay the…
- Matrix Properties — RIP is a property of a matrix W, not a property of an individual vector.
- Matrix Rank — Eigenvectors are non-zero vectors that a matrix transforms only by scaling.
- Matrix representations of data relationships — A similarity graph represents each data point as a vertex and each pairwise similarity as an edge weight.
- Max-Margin Methods — Separating polynomials are functions of the form sign(p(x)), with p a degree-r polynomial on R^d.
- Maximum and Minimum Loops — A histogram is a frequency count stored in a dictionary, where keys are unique values (like email addresses) and values are…
- Mean Squared Error — Regression loss functions measure more than whether a prediction is wrong: they quantify the discrepancy between prediction and…
- Mean Squared Value Error — SGD performs an immediate, small weight-vector adjustment for each example.
- Mean Squared Value Error (MSVE) — The on-policy distribution describes states under the target policy π.
- Measure Concentration — Vectors in this setting are column vectors in finite dimensional Euclidean spaces.
- Measure Concentration Inequalities — Hoeffding's Inequality bounds the probability that a sample mean differs from the true mean by at least a chosen positive amount.
- Measures of Clustering Quality — Clustering groups similar data points into clusters.
- Measuring How Long a Program Takes — Efficiency is important, but it is secondary to correctness, and a program that is not correct is not efficient regardless of…
- Measuring Inference Latency and Throughput — Online APIs optimize for latency and process requests as they arrive, while batch APIs optimize for cost and can accept longer…
- Measuring Knowledge Base Size in Tokens — For Claude models, the guidance recommends including the entire knowledge base in the prompt, with no need for RAG or similar…
- Measuring Model Performance — An evaluation set is a dataset used to test and validate the performance of a model or system, and the source recommends…
- Measuring Outcomes in AI Sales Contracts — An all-or-nothing payment is either fully triggered or not, which makes it fragile when measurement is messy.
- Measuring Success in Deployed AI Systems — The Jobs-to-be-Done lens asks what job a person hired the product to do, and in AI deployments the answer is usually an outcome…
- Measuring Training Performance on Different Hardware — Moving a training loop to a GPU changes where the data and model live, not the training logic itself.
- mem_fn() function — bind() is the topic of this section, which sits within the Function Objects module of Understanding Type Functions in C++.
- Member Functions and the this Pointer — The function adaptor mem_fn(mf) produces a function object that can be called as a nonmember function.
- Member Functions in C++ — A class declaration defines a new class type and lists its members: member functions and data members.
- Member Variables and Encapsulation — A getter method provides read access to a variable by returning its current value to the caller.
- Memory and References — A variable is a named location in your computer's memory where you store information.
- Memory and References in Python — Lists are passed to functions by reference, meaning the function receives access to the original list, not a copy.
- Memory and Storage: How Computers Remember — The CPU is the part of the computer built to obsessively ask 'What is next?' and determine the next operation to execute.
- Memory Footprint in Foundation Models — LSTM, a type of recurrent neural network, was the dominant architecture of deep learning for NLP before the transformer…
- Memory Hierarchies in Computer Architecture — FLOP/s measures the peak number of floating-point operations per second a chip can perform, and achieved throughput is often…
- Memory Hierarchy and Applications — Memory is treated as essential for AI models, and adding a memory system to a model brings several benefits.
- Memory Hierarchy for Deep Learning Workloads — An accelerator's FLOP/s rating is a peak theoretical figure, and the ratio of achieved to peak FLOP/s is a practical utilization…
- Memory Layout and Data Movement on Accelerators — An accelerator is a chip designed for a specific type of computational workload, and an AI accelerator is designed for AI…
- Memory Layout of Strings — Short-string optimization keeps short string values inside the string object itself and places only longer strings on the free…
- Memory Management and Garbage Collection — Objects have a complete lifecycle: creation (via __init__), active use, and destruction (via __del__). Python calls these…
- Memory Management When Converting from malloc and free to new and delete — C and C++ can use different linkage conventions, mainly because C++ emphasizes type checking and supports overloading.
- Memory Math for Model Training — Full finetuning trains every parameter, which for a 7B model in 16-bit format adds up to about 56 GB before activations, more…
- Memory Required for Gradients and Optimizer States — Weight memory equals the parameter count multiplied by the bytes per parameter; a 13B model at 2 bytes per parameter needs 26 GB…
- Memory Requirements for Serving Models — Replica parallelism copies the whole model to handle more requests at once, at the cost of more chips; it does not make an…
- Memory Retrieval in AI Systems — Memory management decides what information is stored in short-term and long-term memory, using add and delete operations.
- Memory Systems for Language Models — A RAG system works in two steps: it first retrieves relevant information from external memory, then uses that information to…
- Memory-Efficient Training — GaLore is a research project aimed at making LLM pretraining more efficient.
- Memory: How Computers Store Information — Input devices capture user actions and send data into the computer; output devices receive data from the computer and present it…
- Metadata and Program Structure — An annotation is metadata, or metatext, written about a main text rather than as part of it.
- Method Declarations and Signatures — A Java interface is a reserved word that introduces a set of instance method declarations with no implementations.
- Method Definition and Calling — Special methods enable custom classes to mimic built-in type behaviors through double-underscore naming conventions.
- Method Overriding — Inheritance is a mechanism that implements a type and subtype relationship between classes to enable code reuse.
- Method Overriding in Java — super is a special variable used inside a subclass to refer to the object's superclass view, and it remembers only that the…
- Method Overriding in Subclasses — Polymorphism allows a subtype to be treated as an instance of its parent type, enabling flexible code that works with multiple…
- Method Parameters and Return Values — A Javadoc comment begins with /** and ends with */, and has the same form as a /* */ block comment.
- Method Parameters in Java — An interface declares a set of methods that implementing classes must provide, and a variable of the interface type can refer to…
- Method References in Practice — A method reference is a shorthand for a lambda expression that invokes one specific method.
- Method vs. Function: When to Use Each — Tuples are immutable and therefore do not provide .sort() or .reverse() methods. These methods modify sequences in place, which…
- Methods and Attributes: Accessing Object Capabilities — The dir() function reveals all capabilities (methods and attributes) of any Python object by returning a list of strings.
- Methods and Attributes: The Building Blocks of Objects — A zone is a self-contained unit combining code (methods) and data (attributes) with well-defined interactions with other zones…
- Methods and How They Access Object State — The class keyword creates a new type in Python, not just a container for code.
- Methods and Object State — A constructor is used to initialize classes and exists to guarantee and simplify that initialization.
- Methods and the __init__ Constructor — A base class defines shared attributes and methods; derived classes inherit from it and add their own specialized features.
- Methods and the self Parameter — Class methods have only one specific difference from ordinary functions - they must have an extra first name that has to be…
- Methods for Function Approximation — Feature representation techniques provide different named approaches associated with function approximation.
- Methods in Classes — A child class extends a parent class using the syntax class ChildClass(ParentClass):, inheriting all parent variables and…
- Metric Approximation — An r-cover provides a nearby representative for every point in A.
- Meurer's Periodization of FDE Work — The title on an FDE posting does not reveal the vintage of the work, so identical titles can hide different jobs.
- Minimum Description Length — SRM divides the overall hypothesis class H into classes H_n and represents H as their union.
- Minimum Description Length and Hypothesis Hierarchies — PAC-Bayes bounds define a hierarchy over a hypothesis class H.
- Mistake Bounds — SOA begins with V_1 = H and maintains the hypotheses consistent with observed labels.
- Mixture-of-Experts Models — Model merging builds a new model from several existing ones, and it can add value through better quality or a smaller memory…
- Modal and Modeless Dialogs — The predefined dialogs come from JColorChooser, which provides the color chooser, and from JOptionPane, which provides message…
- Model Adaptation in AI Engineering — The infrastructure layer is the bottom of the AI engineering stack and contains tooling for model serving, data and compute…
- Model Adaptation through Finetuning — Finetuning means continuing to train a previously trained model using its existing weights.
- Model Availability — An action value evaluates a state together with a particular action.
- Model Bootstrapping with Reverse Instruction — Model distillation trains a smaller student model to mimic a larger teacher, treating the teacher's performance as the student's…
- Model Build Versus Buy Decision — An inference service hosts a model, receives user queries, runs the model to produce responses, and returns them, while the…
- Model Build Versus Buy Decision: the broader framework this article belongs to — The gap between open source and proprietary models is narrowing on benchmarks, but the strongest open source models are expected…
- Model Calibration — The test set should not be used to guide model calibration.
- Model Capacity — Overfitting is reduced by making memorization less easy and generalizable representations more useful.
- Model Distillation — Finetuning improves a model's quality on a specific task and can teach it to follow particular output structures.
- Model Ensembling Methods — Simultaneous finetuning trains one model on a combined dataset of all tasks, and it usually needs more data and training because…
- Model Evaluation and Text Generation — The evaluate_model function measures training and validation losses after model updates, so training progress can be judged…
- Model evaluation during training — generate_and_print_sample takes a starting text, encodes it into token IDs, and asks the LLM to generate a continuation of up to…
- Model Evaluation Fundamentals — A rise in purchases does not by itself show that a recommendation model is responsible, because promotional campaigns and new…
- Model evaluation on unseen data — Optimization and generalization measure different kinds of model performance.
- Model FLOPS Utilization and Hardware Choice — A higher peak FLOP/s number does not guarantee faster serving; MFU measures how much of the available compute your workload…
- Model Gateways and Routing — Guardrails sit on both sides of the model call, with input guardrails checking requests and output guardrails checking responses.
- Model Hosting and Benchmarking — Data lineage is the origin and history of the data used to train a model, and it has to be known before a model's use can be…
- Model Improvement Through Feedback — Eval-driven validation judges a model with a labeled eval set before the model is deployed to production.
- Model Inference Basics — Inference optimization aims to make models faster and cheaper when they produce outputs, and both goals matter to different…
- Model Licensing and Usage Rights — Using a model API means calling a provider's model, while hosting means running the model on infrastructure you operate or rent.…
- Model Memory Footprint During Inference — Weight memory equals the parameter count multiplied by the bytes per parameter; a 13B model at 2 bytes per parameter needs 26 GB…
- Model Merging — Full finetuning updates every weight, and its memory cost grows with the number of parameters being trained, which made it…
- Model Performance Evaluation — Final evaluation measures accuracy on the training, validation, and test sets, and the test set serves as the held-back check on…
- Model Selection — Validation uses some training data as a validation set.
- Model Selection and Validation — Getting Started introduces how to approach the course rather than requiring you to memorize its entire structure.
- Model Selection and Validation Techniques — Model selection combines algorithm choice with parameter setting.
- Model Selection Criteria — Model quality must be weighed against latency and cost, and the firmest requirements should be fixed first and used to filter…
- Model Size and Compute Requirements — Parameter count sets a model's capacity to learn, and within one family a larger model generally performs better, but capacity…
- Model Size Calculation — The program estimates a model's memory size by multiplying the total parameter count by 4, assuming each parameter is a float32…
- Model Training and Backpropagation — Hyperparameters are architecture-level choices, such as layer count, units or filters, activation functions, and dropout rates…
- Model Training Data Extraction — Model training data extraction is the process of pulling the data used to train a model back out of that model or its training…
- Model Training in PyTorch — torch.save() writes data to a file. In the source example, the data is model.state_dict() and the file is "model.pth".
- Model Training Loss Minimization — A falling training set loss is evidence that the function is working on the data it was trained on, but it does not by itself…
- Model Validation — Model selection is the task of choosing an algorithm for a particular problem and setting its parameters.
- Model Versioning and Evaluation — A technology decision that is sound today can become the wrong choice when provider prices or providers change, so each…
- Model-Based Algorithms — Latent learning separates the occurrence of learning from its immediate expression in behavior.
- Model-Based and Model-Free Reinforcement Learning — Model-free and model-based reinforcement learning provide a distinction for studying brain processes.
- Model-Based Learning and Decision Making — Goal-directed behavior can use model-based simulation of future actions, while habit behavior is associated with model-free…
- Model-Based Planning — Planning and learning share value-function estimation as a central operation.
- Model-Based Policy Computation — Incorrect models give planning an inaccurate description of the environment.
- Model-Based Processes — Dyna-Q combines one-step tabular Q-learning for direct reinforcement learning with random-sample one-step tabular Q-planning.
- Model-Based Reinforcement Learning in the Brain — Goal-directed and habitual behavior rely on different, though not necessarily exclusive, brain contributions.
- Model-Free and Model-Based Algorithms — The model-free versus model-based distinction concerns how an action is selected.
- Model-Free and Model-Based Learning — Latent learning occurs without an apparent reward and can be revealed when a reward is later introduced.
- Model-Free and Model-Based Reinforcement Learning — Terminology must be interpreted within the field that uses it.
- Model-Free Learning — Goal-directed behavior can use model-based simulation of future actions, while habit behavior is associated with model-free…
- Model-Free Reinforcement Learning — A model gives an agent a way to infer how the environment may respond.
- Model-Level Optimization Techniques — The attention mechanism is a key bottleneck of transformer models, so many optimization techniques aim to make attention more…
- Model-level techniques for inference optimization — Inference optimization has two families: model-level techniques such as quantization, distillation, and attention optimization…
- Modeling Relationships Between Variables — Linear regression is used to model relationships between explanatory variables and a real-valued outcome.
- Models and Planning Fundamentals — Models let agents predict environment responses instead of treating every possible response as unknown.
- Models of Classical Conditioning — The Rescorla-Wagner model links learning to surprise.
- Models of the Environment — The key distinction is whether the model exposes the full probability description or only one sampled outcome.
- Modern Reinforcement Learning — Samuel's checkers player combined a search role with a learning role.
- Modern Switch Statements with Arrow Labels — The traditional switch uses a colon after each case label, and a case label may hold one constant before Java 17.
- Modifying a JList through its Model — A JList gets its items from a list model, the object that knows the actual list of items and the operations that can be…
- Modifying and Deleting Dictionary Items — Dictionaries are created empty using dict() or {} and store key-value pairs.
- Modifying Dictionaries: Adding and Updating Pairs — A dictionary is a mapping between keys and values, not a sequence indexed by position like a list.
- Modifying Dictionary Values — Dictionary lookups use keys, not integer indices: dictionary[key] retrieves the value associated with that key.
- Modifying List Elements — List indexing uses the bracket operator with zero-based indices: the first element is at index 0, the second at index 1, and so…
- Modifying Lists During Iteration — For loops are the most common and natural way to iterate through list elements, using identical syntax to string iteration.
- Modifying lists with methods — A list is a sequence of values that can contain any data type, unlike strings which contain only characters.
- Modifying Lists: Assignment and Methods — pop removes an element by index and returns it; del removes an element by index without returning it.
- Modifying Object State with Methods — A method is a function that belongs to a class and includes a self parameter that refers to the specific object the method is…
- Modifying Pretrained LLMs for Classification Tasks — The general approach sets the number of output nodes equal to the number of classes.
- Modifying Sequences — Membership tests (in and not in) check if an item exists anywhere in a sequence.
- Modifying Table Models — A table's data lives in a table model, and methods such as setValueAt, removeRow, and addRow change that data; the view updates…
- Modifying Table Structures with ALTER TABLE — DROP TABLE IF EXISTS safely removes a table and allows scripts to run repeatedly without errors.
- Modular Programming with Functions — The complete 3N+1 program uses the predefined function nextN() in a full program, showing how a function is put to work after it…
- Modularity and Abstraction in C++ Programs — The type system is the major tool C++ offers for preventing errors, because higher-level types and algorithms limit…
- Modularity and Abstraction in Error Handling — Error handling reaches beyond language features into programming techniques and tools, and C++ offers help through its type…
- Modularity and Component Design in AI Applications — Observability means understanding how a system fails, designing metrics and alerts around those failures, and building the…
- Modularity in AI Systems — A high-level AI application architecture is a framework for understanding how components fit together, and the exact layout of…
- Modularity in Programming — Reuse means writing a set of instructions once, naming it, and calling that name multiple times throughout a program
- Module Basics — How It Works A string on the first logical line of a function is the docstring for that function. Note that DocStrings also…
- Module Naming Conventions — Every Python program is a module; creating a module requires only saving a file with the .py extension.
- Module Scope and Namespaces — An import statement tells Python to find a module file, execute its code, and make its contents available to your program.
- Module Search Paths and sys.path — The sys.path contains the list of directory names where modules are imported from. Observe that the first string in sys.path is…
- Monitoring AI Models in Production — A constrained rollout releases a system to a limited scope, such as a small group of users in one region, while using real…
- Monitoring and Logging API Usage — Rate limits are a deliberate constraint on API usage designed to protect server resources and ensure fair access across users.
- Monitoring Conversational Applications in Production — Natural language feedback is feedback extracted from the content of messages, found in the wording people use when they reply to…
- Monitoring Models and Collecting User Feedback — The model evaluation workflow has four stages: filtering by hard attributes, using public information, running experiments with…
- Monitoring Production AI Systems — Observability is the practice of instrumenting a system so that its internal state can be inferred from its logs and metrics…
- Monitoring Training Progress Across Multiple Processes — CUDA_VISIBLE_DEVICES restricts which GPUs a single launch can use, by listing GPU indices on the command line, and it does this…
- Monte Carlo backup — The λ-return is a normalized weighted average of n-step backups.
- Monte Carlo Control Methods — GPI is a coordinated process, not a choice between policy improvement and value estimation.
- Monte Carlo Control without Exploring Starts — Exploring starts assumes that all actions can be explored at the beginning, but this assumption is considered unrealistic.
- Monte Carlo Methods in Reinforcement Learning — λ identifies important endpoint cases of the λ-return.
- Monte Carlo Policy Evaluation — Continual exploration is necessary for Monte Carlo policy evaluation of action values.
- Monte Carlo Policy Gradient Methods — This practice section applies REINFORCE to gridworlds.
- Monte Carlo Prediction Methods — TD methods learn transition by transition, whereas Monte Carlo methods wait until an episode ends.
- Monte Carlo State-Value Prediction — The Gradient Monte Carlo Algorithm evaluates a policy by adjusting the weights of a differentiable value-function approximation.
- Monte Carlo Tree Search for Planning — MCTS connects planning with policy decisions.
- Mouse and Key Events in Java — Event-oriented programming lets classes communicate by having one class emit events that other classes listen for and respond to.
- Mouse Events and Listener Registration — Input focus decides which component receives keyboard events: exactly one element holds it at a time, and all keyboard events go…
- MouseEvent and MouseListener — MouseListener is an interface that requires five instance methods: mousePressed, mouseReleased, mouseClicked, mouseEntered, and…
- MouseListener and Mouse Click Handling — Mouse motion events are handled through the MouseMotionListener interface, which declares mouseDragged and mouseMoved.
- Move Selection in MCTS — MCTS repeatedly searches from the root of the current partial game tree.
- Multi-Agent Reinforcement Learning — Collective reinforcement learning changes the focus from one learner to the behavior of a population of reinforcement learning…
- Multi-Agent System Design — A strong answer to a production failure question covers both technical diagnosis and customer communication.
- Multi-Agent Systems: Use Cases and Limitations — Multi-agent systems work for read-heavy, parallelizable tasks such as research, retrieval, and exploration.
- Multi-Head Attention — Two self-attention implementations can be made equivalent by assigning the weights from one instance to the other, with…
- Multi-Head Attention in Large Language Models — Matrix multiplications help implement attention computations more efficiently and compactly by replacing nested for loops.
- Multi-Input Models — A Keras functional model can share one representation and branch into several named prediction heads.
- Multi-step reinforcement learning — Off-policy learning separates the policy that generates experience from the policy being learned.
- Multi-Step Semi-Gradient Methods — The algorithm extends Expected Sarsa to an n-step form.
- Multiclass Classification — Ranking problems arrange instances by relevance rather than assigning an isolated label to one instance.
- Multiclass Classification and Ranking — Hinge loss is a classification loss defined in the source for binary classification.
- Multiclass Learnability — Shattering is a relationship between H and a set C contained in X.
- Multiclass Learnability and the Natarajan Dimension — Multiclass learnability concerns hypothesis classes with multiple possible labels.
- Multiclass Linear Predictors — Multiclass prediction can be reduced to binary classification, but the reduction must include a rule for combining binary outputs.
- Multiline Mode and Regex Flags — The caret (^) is a zero-width anchor that matches the position at the very beginning of a line, not a character.
- Multilingual Models and Language Representation — Common Crawl is a widely used web dataset for training LLMs, and its language mix is highly uneven.
- Multimodal Embedding Models — Multimodal data is data in more than one form, and it can be retrieved either through metadata such as titles, tags, and…
- Multiple Assignment and Parallel Assignment — Tuple assignment unpacks multiple values from a tuple into separate variables in a single statement, with the number of…
- Multiple Assignment and Simultaneous Binding — Tuple unpacking (a, b = b, a) is the fastest and most Pythonic way to swap two variables
- Multiple catch Clauses and Exception Types — A try..catch statement lets a program catch a thrown exception of a named type and keep running instead of crashing.
- Multiple Parameters and Arguments — A function call transfers execution to the function's code block and returns to the caller when the function finishes.
- Multiple Return Values and Tuples — Next, we access each key-value pair of the dictionary using the items method of the dictionary which returns a list of tuples…
- Multiple-Choice Question Evaluation — A model's domain-specific capabilities are constrained by its configuration and training data, so evaluation must check whether…
- Multithreading and Exceptions — An exception is any circumstance during execution that is treated as a departure from the normal flow of control, and it is not…
- Multivariate Performance Measures — Bipartite ranking is a two-label ranking problem involving relevant and non-relevant elements.
- Multiway If Statements in Java — A switch statement and a multiway if statement can have the same effect, and the source notes that any switch can be replaced by…
- Mutability: Strings vs Lists — A list of characters is fundamentally different from a string, even though both are sequences.
- Mutable vs. Immutable Data Types — Passing a list to a function gives the function a reference to the original list, so modifications inside the function affect…
- Mutable vs. Immutable Objects — Variables are references to objects in memory, not the objects themselves.
- Mutable vs. Immutable Types — Identity (is) checks whether two variables refer to the same object in memory; equivalence (==) checks whether two objects have…
- Mutating Lists: append(), remove(), and Assignment — List traversal comes in two main forms: simple for loops for reading elements, and index-based loops using range(len()) for…
- Mutating Lists: pop(), append(), and extend() — The remove() method deletes the first occurrence of a value from a list when you know the value but not its index.
- Mutex Basics and Critical Sections — A call to lock() with several mutex arguments proceeds only after it has acquired all of them.
- Mutex Basics and lock() and unlock() — A unique_lock acquires its mutex in its constructor by calling lock() and releases it when it goes out of scope by calling…
- Mutex Management with unique_lock — A thread is a type-safe interface to a system thread, so your code works with a typed handle rather than the system thread…
- Mutexes and Critical Sections — A deadlock occurs when threads each hold one resource and wait for a resource held by another thread, so none of them can proceed.
- Mutexes and Locks — A mutex is a mutual exclusion object that controls access to shared data.