Concepts starting with S
381 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- Sample Complexity — Regression loss functions measure more than whether a prediction is wrong: they quantify the discrepancy between prediction and…
- Sample Complexity of Finite Hypothesis Classes — Three conjunctions connected by OR define a 3-term DNF.
- Sample Complexity of Neural Networks — VC dimension is a measure of hypothesis-class capacity based on shattering.
- Sample Model — Planning uses model-generated experience, while learning uses experience from the real environment.
- Sample Models in Blackjack — The key distinction is whether the model exposes the full probability description or only one sampled outcome.
- Sample Size Flexibility — The two notions share the same competitiveness requirement.
- Sample-Average Action-Value Estimation — A sample average is a natural estimate of an action value.
- Sample-Average Action-Value Methods — Initial estimates affect action-value methods because they provide the starting values used before experience is available.
- Sample-Average Method and Nonstationarity — Sample averages are challenged when the values they estimate do not remain fixed.
- Sampling from Probability Distributions — Character-level generation learns the relationship between a fixed-length character context and the character that follows it.
- Sampling Production Traces — The per-trace loop is the daily cycle the FDE works inside: production traces are sampled, a pattern is identified, a fix is…
- Sampling Random Tokens with torch.multinomial — The modified generate function adds top-k filtering and temperature scaling to the earlier loop.
- Sarsa — Expected Sarsa is a Q-learning variation based on an expected next-state value.
- Sarsa algorithm — Calculate the n-Step TD Error before applying the semi-gradient Sarsa update.
- Sarsa and n-step Sarsa — Differential value functions are the average-reward counterparts of familiar value functions.
- Sarsa and On-Policy TD Control — TD control joins value prediction with local policy improvement.
- Sauer's Lemma — The proof has separate lower-bound and upper-bound routes.
- Saving a GPT Model and Optimizer Checkpoint — Loading a GPT model and optimizer from a checkpoint is a two-part act: the program constructs live objects first, then attaches…
- Saving a PyTorch Model — torch.save(model.state_dict(), file_name) writes a model's state dictionary to a .pth file, so the fine-tuned model can be…
- Saving and Loading Keras Models — A Keras callback is an object passed to fit that is called at various points during training.
- Saving and Loading LLM Weights — A weight parameter is a model parameter that is learned during training, not typed in by hand.
- Saving and Loading Model Weights — Training loss measures fit on the training data, and validation loss measures fit on held-out data; both should be read together.
- Saving and Loading Model Weights in PyTorch — Temperature and top-k are settings that control the randomness of text generation, and they do so in different ways.
- Saving and Loading PyTorch Model Weights — A saved model can be resumed: load the model and optimizer in a new Python session or notebook, then continue pretraining for…
- Saving and Loading PyTorch Models — torch.save() writes data to a file. In the source example, the data is model.state_dict() and the file is "model.pth".
- Saving Model Weights in PyTorch — The recommended way to save a PyTorch model is to save its state_dict, passed as the first argument to torch.save.
- Saving PyTorch Models — torch.load("model.pth") reads the saved file and reconstructs the Python dictionary containing the model's parameters.
- Scaled Dot-Product Attention with Trainable Weights — Self-attention creates three views of each input token by multiplying it with three trainable weight matrices: W_q for queries…
- Scaling Images — The Graphics class provides the methods that copy an image onto the screen or an off-screen canvas, most commonly from inside…
- Scope and Namespace in Python — Built-in function names like max, len, sum, and print should be treated as reserved words and never used as variable names.
- Scope and Variable Lifetime in Functions — When you declare variables inside a function definition, they are not related in any way to other variables with the same names…
- Scope and Variable Visibility — Functions allow you to name groups of statements, which is the foundation of readable code.
- Scope Management in Forward Deployed Engagements — Practicing conversational responses means rehearsing specific words for situations that can be anticipated, so they are…
- Scope: Local and Global Variables — Expressions and variables can both be passed as arguments to user-defined functions, just as they can be passed to built-in…
- Scoping an Engagement with the Customer — The customer outcome metric is the measure agreed in scoping and the one you are graded on internally.
- Scoping and Validation Before Delivery — The delivery phase deploys a developed system to a live environment, and it goes well when scoping and validation have been done…
- Scoping Data Work in AI Deployments — A clean sample is evidence about the sample; production data can differ, and the source reports exactly that gap.
- Scoping Discipline and Documentation — A scoping document is a one-page record of the shared understanding between customer and vendor, and its format matters less…
- Scoping Discipline in Deployment Work — Demand for deployment FDEs is in the tens of thousands of roles, and current supply is only a fraction of that, so deployment…
- Scoping in AI Projects — The Validation Phase is the second phase of the FDE motion and validates the scoped thing before the team commits to delivery.
- Scoping in Consulting Engagements — Standard consulting moves from scoping directly to a statement of work and a delivery timeline.
- Scoring Model Responses — generate_model_scores builds a prompt for each entry, asks a model for a 0 to 100 score, converts the reply to an integer, and…
- Search in Game-Playing Programs — A value function may be internally consistent without being useful for choosing moves.
- Searching a List with Linear Search — The List interface extends Collection and adds methods that act on items by numerical position.
- Searching an Array — Whole-array problems are solved by visiting every element with a for loop and combining what you find.
- Searching an Array for a Value — An index equal to an array's length is illegal, because the legal indices run from 0 to length - 1.
- Searching and Filtering Strings — Traversal is the process of handling a string one character at a time, from beginning to end.
- Searching and Pattern Matching in Strings — A sequence is an ordered set of values identified by integer indices starting at 0; strings are sequences of characters.
- Searching the Space of Policies — Evolutionary methods evaluate a fixed policy through many game outcomes.
- Second Normal Form: Removing Partial Dependencies — Redundancy occurs when the same information is stored multiple times across different rows in a table, such as repeating an…
- Secondary Reinforcement — Eligibility traces help reinforcement learning algorithms address delayed reinforcement.
- Secondary Reward — A reward signal is a numerical evaluation, not necessarily a physical reward.
- Secondary Storage: Permanent Data — Input devices capture user actions and send data into the computer; output devices receive data from the computer and present it…
- Secure Credential Storage and Environment Variables — API keys are the mechanism vendors use to identify users and monitor their service consumption.
- Securing API Access with OAuth — OAuth libraries are free, pre-built tools that handle the complexity of the OAuth 2.0 protocol so you do not have to implement…
- SELECT Statements and Query Basics — JOIN reconstructs data from multiple normalized tables by matching rows based on key values specified in the ON condition.
- SELECT Statements: Retrieving Data from Tables — SQL uses a single equal sign (=) for equality testing in WHERE clauses, not the double equal sign (==) used in Python.
- SELECT: Retrieving Data from Tables — UPDATE modifies existing records in a table using the SET keyword to specify columns and new values.
- Selecting Trainable Layers — Fine-tuning adjusts a pre-trained model's weights to fit a specific task, and it can either update the whole model or only…
- Selection Sort — A shuffling algorithm aims to put the elements of an array into a random order, with the typical case being shuffling a deck of…
- Self-Attention in Transformer Language Models — A causal attention mask is used when an LLM reads and generates text from left to right, to prevent access to future tokens.
- Self-Attention in Transformers — The Bahdanau attention mechanism lets the decoder selectively access different parts of the input sequence at each decoding step.
- Self-attention with trainable weights — All context vectors are computed with one matrix multiplication: attn_weights @ inputs.
- Self-Play — TD-Gammon combined self-play with TD learning to improve its backgammon performance.
- Self-Play Learning Methods — TD-Gammon's importance came from learning strong play with little backgammon knowledge.
- Semi-gradient methods — Episodic Semi-gradient Sarsa learns a value function by updating value-function weights θ during episodes.
- Semi-gradient Methods for Value Prediction — SGD performs an immediate, small weight-vector adjustment for each example.
- Semi-gradient n-Step Sarsa — Differential semi-gradient n-step Sarsa extends semi-gradient n-step Sarsa with differential reward estimation.
- Semi-gradient prediction methods — Action-value prediction changes the training input from a state to a state-action pair.
- Semi-Gradient Q-Learning — Semi-Gradient Expected Sarsa is a one-step algorithm for action values.
- Semi-gradient Sarsa — Calculate the n-Step TD Error before applying the semi-gradient Sarsa update.
- Semi-Gradient TD(0) — SGD variations are used to find a good weight vector for function approximation.
- Sending XML Data Over HTTP — Triple single quotes (''') and triple double quotes (""") both create multi-line strings in Python.
- Sentiment Analysis — Sequence data must be represented numerically before a deep-learning model can process it.
- Sentinel Values in Input Processing — A while loop can read and process integers repeatedly until a condition becomes false.
- Sentinel-Controlled Input — Priming a loop means preparing a valid current value for the first while-condition test.
- Sequence Data — Timeseries data consists of measurements arranged in sequence at regular time intervals.
- Sequence Modeling — A language model learns the statistical structure of language by modeling possible next tokens.
- Sequence Processing Applications — Sequence models operate on ordered numeric representations, not raw text.
- Sequence Processing with Convnets — Deep learning applications can be organized by their input and output modalities.
- Sequence Processing with Recurrent Layers — Multi-input models use separate branches for separate data sources.
- Sequences of Training Examples — Lowercase letters commonly denote scalars or abstract objects; boldface lowercase letters emphasize vectors.
- Sequential Decision-Making — Bandit problems have a history spanning statistics, engineering, and psychology.
- Sequential Models in Keras — The Functional API describes a model as a connected route of tensor transformations.
- Sequential neural-network models — The example creates a Keras Sequential model and adds layers in a fixed order.
- Sequential Processing of Arrays — Sequential access processes array elements one after another in array order, while random access lets you reach any element…
- Sequential Streams — A collection serves as the source of values for a stream, and this applies to lists, sets, and any other collection.
- Setting Component Backgrounds — BorderFactory.createEmptyBorder(top, left, bottom, right) creates an empty border that reserves space around the edges of a…
- Setting Seeds for Reproducible Randomness — random.random() generates a pseudorandom float in the range [0.0, 1.0), inclusive of 0.0 but exclusive of 1.0
- Setting Up a Deep-Learning Workstation — A recent NVIDIA GPU is recommended for faster execution, not required for running the examples.
- Setting Up Java Programming Environments — This lesson explains how to begin the Java course rather than teaching a full programming concept.
- Setting Up the Java Development Kit — jshell provides a direct command-line way to try Java code.
- Setting Up Your Python Environment — For Windows 2000, XP, 2003 , click on Control Panel → System → Advanced → Environment Variables . Click on the variable named…
- SGD and Backpropagation for Neural Networks — Backpropagation calculates the gradient of a loss with respect to network weights for an example.
- SGD and subgradients of maximum functions — Multiclass SVM handles several labels by scoring input-label pairs and selecting the largest score.
- Shallow Copy Versus Deep Copy — Aliasing occurs when two or more variables refer to the same object in memory. The assignment b = a creates an alias, not a copy.
- Shallow vs. Deep Copying — Identity (is) checks whether two variables refer to the same object in memory; equivalence (==) checks whether two objects have…
- Shapes and Outlines with drawRect and drawOval — Aliasing is the jagged appearance of shapes drawn on a pixel grid, and antialiasing is the technique that reduces that…
- Shared Resources in Multithreaded Programs — Use synchronization when multiple threads share a resource and their access must be exclusive.
- Shattering — Intervals over the real numbers form a class of binary-valued functions.
- Short-Circuit Evaluation in Logical Operators — Python allows non-boolean values as operands in logical operators, interpreting any nonzero number as 'true'
- Showing and Hiding Windows with setVisible — The default close operation, set with setDefaultCloseOperation, decides what happens when the user clicks a JFrame's close box.
- Shuffling Lists with random.shuffle() — random.randint(low, high) generates a random integer within an inclusive range, including both the low and high endpoints.
- Side Effects vs. Return Values — Void functions perform actions but return None, not a usable value.
- Sigmoid Function — Logistic regression is used for classification tasks.
- Similarity Measures — Spectral clustering begins by representing relationships between data points as a weighted similarity graph.
- Simple Generic Classes — A type parameter is a placeholder written in angle brackets after a class name, and it works much like a formal parameter in a…
- Simple if Statements — A multiway branch built from if, else if, and else executes one and only one of its statements.
- Simple Pricing Models — A product's deployment cost model describes the costs of setting up and integrating it, and some products have no deployment…
- Simple Self-Attention Without Trainable Weights — SelfAttention_v2 builds its query, key, and value projections with nn.Linear layers, configured by d_in, d_out, and qkv_bias.
- SimpleRNN networks — The Keras example uses an LSTM layer in a model trained on IMDB data.
- Simplified Self-Attention with Dot Products — Weight parameters are learned coefficients optimized during training, while attention weights are dynamic, context-specific…
- Simplified Self-Attention Without Trainable Weights — Self-attention computes attention weights by relating different positions within a single input sequence, while traditional…
- Simplifying Conditionals with Logical Operators — A nested conditional is a conditional statement placed inside another conditional statement, typically within one of the…
- Simulated Transitions and Backups — Uniform planning is easy to describe but can waste many backups.
- Single Linkage — Clustering is an unsupervised organization problem rather than a labeled prediction problem.
- Single Linkage Clustering — The supplied source pack does not define PCA or variance maximization.
- Single-Head Attention and Stacked Attention Layers — MultiHeadAttention uses one projection per role (query, key, value) to a width of d_out, then reshapes that width into num_heads…
- Single-Head Attention Modules — Multi-head attention extends causal attention across several heads, each operating independently with its own weights.
- Singular Value Decomposition — A symmetric matrix is positive definite when every eigenvalue is positive.
- Skipping Iterations with continue — A while loop is a looping statement that repeatedly executes code as long as a condition is true.
- Slack Variables — Soft-SVM combines labeled training pairs and a positive λ parameter in an optimization problem.
- Slicing Lists — pop removes an element by index and returns its value; use it when you need to capture the removed element.
- Slicing Lists to Extract Subsets — Indices start at 0 and can be positive (counting from the start) or negative (counting from the end).
- Slicing Strings — A string is a sequence of individual characters that can be accessed one at a time using the bracket operator.
- Slicing with Steps and Negative Steps — A slice with start >= end always produces an empty string, not an error.
- Sliding Window Approach for Generating Input-Target Pairs — An LLM is pretrained by predicting the next word in a text, so training data is built as input-target pairs.
- Socket Programming Basics — Binary files must be accumulated in a bytes buffer and cannot be printed as they arrive like text files.
- Socket Programming Fundamentals — When you call encode() on a string, Python looks up each character and converts it to one or more bytes according to the UTF-8…
- Sockets and Client-Server Communication — A threaded server accepts each connection in its main loop and hands that connection to a new thread rather than handling it…
- Sockets and Network Connections — A socket is one end of a network connection and has an input stream for incoming data and an output stream for outgoing data.
- Soft-max Action Selection — Numerical preferences express how strongly each action is favored.
- Soft-SVM and Regularization — Soft-SVM combines labeled training pairs and a positive λ parameter in an optimization problem.
- Softmax and Converting Logits to Probabilities — Probabilistic sampling picks the next token with a chance proportional to its probability, so a most-likely token is chosen most…
- Softmax and Probabilities for Token Selection — The modified generate function adds top-k filtering and temperature scaling to the earlier loop.
- Softmax and Probability Scores — Argmax converts a row of model output into a class label by returning the position of the largest value.
- Softmax Function and Attention Weights — A causal attention mask zeroes out attention weights for future positions so that each position attends only to itself and…
- Sorted Arrays — Binary search finds an item in a sorted array by inspecting the middle of a shrinking range, and each comparison eliminates…
- Sorting Algorithms Overview — Unsorting is the reverse goal of sorting: it aims for a random arrangement rather than an ordered one.
- Sorting and Ordering Data — Use a dictionary to count word frequencies by checking if each word exists and incrementing its count
- Sorting and Ordering Data in Python — max() and min() are built-in functions that find the largest and smallest values in any collection.
- Sorting and Ordering Data Structures — Finding unique words involves a pipeline: read file → split lines into words → check membership to avoid duplicates → sort…
- Sorting and the key Parameter — A lambda statement creates an anonymous function object with one parameter and one expression.
- Sorting and the sort() Method — Lambda functions used as sort keys provide a temporary comparison value for each element without modifying the original list.
- Sorting Dictionaries by Value — urllib.request.urlopen() opens a web URL and returns a file-like object that you can iterate over line by line.
- Sorting Dictionary Data — Use a dictionary to count word frequencies by checking if each word exists as a key and either initializing it to 1 or…
- Sorting Dictionary Keys — Looping through a dictionary directly iterates over its keys, not its values.
- Sorting Dictionary Output by Frequency — Nested loops are essential for processing multi-level data structures like lines and words in a file. The outer loop iterates…
- Sorting Dictionary Results — Dictionaries outperform lists and variables for character counting because they only allocate space for characters that actually…
- Sorting Lists and Other Sequences — The sort function compares tuples element-by-element, starting with the first position and moving to subsequent positions only…
- Sorting Lists in Python — To print dictionary keys in alphabetical order, extract keys using list(dict.keys()), sort the resulting list with sort(), and…
- Sorting Lists of Tuples — Python compares tuples element-by-element from left to right, stopping at the first index where elements differ.
- Sorting Lists with .sort() and sorted() — Dictionaries do not guarantee a predictable order, so you convert them to a list of tuples using list(d.items()) to enable…
- Sorting Lists with the sort() Method — Tuple comparison proceeds element by element from left to right, stopping as soon as a difference is found.
- Sparse Models — The ℓ1 constraint restricts the hypothesis class through ‖w‖1 ≤ B and is associated with sparse models.
- Sparse Recovery — RIP is a property of a matrix W, not a property of an individual vector.
- Sparse Representations — Dictionary learning creates a feature vocabulary for data that may not have an obvious vocabulary.
- Sparse Vectors — RIP is a property of a matrix W, not a property of an individual vector.
- Sparse Vectors in Compressed Sensing — RIP is defined through a restriction involving nonzero vectors with ‖x‖0 ≤ s.
- Spatial Hierarchies in Computer Vision — Max pooling replaces each local window with its maximum value.
- Special Cases in Reinforcement Learning: Afterstates and Games — An afterstate describes the task immediately after an action.
- Special Context Tokens — Tokenization cuts text into individual tokens, and a new text sample is cut in the same way before any numbers are assigned.
- Special Methods and Operator Overloading — The class keyword creates a new type in Python, not just a container for code.
- Spike-Timing-Dependent Plasticity — STDP makes synaptic change sensitive to the order and timing of neural spikes.
- Splitting Text into Word and Subword Tokens — Large language model training requires text to be prepared first, and the source treats this as a necessary step.
- Splitting the Dataset into Training, Validation, and Test Sets — The to_csv method, called on a pandas DataFrame, saves that DataFrame to a CSV file named by its first argument.
- SQL Fundamentals: SELECT, INSERT, UPDATE, DELETE — The Database Browser for SQLite is a visual tool that reads SQLite database files and displays their contents in a user-friendly…
- SQL INSERT, SELECT, and WHERE Clauses — Many-to-many data loading requires parsing JSON and distributing the data across two entity tables and one junction table.
- SQL INSERT, SELECT, and WHERE Statements — The INSERT OR IGNORE and SELECT pattern solves the foreign key dependency problem by inserting a record and immediately…
- SQL JOIN Clauses and Data Reconstruction — The INSERT OR IGNORE and SELECT pattern is a two-step sequence that inserts a row and immediately retrieves its primary key for…
- SQL Queries and Data Retrieval — A database is justified only when your application needs frequent random updates on large datasets, must handle data larger than…
- SQL SELECT, INSERT, and UPDATE Statements — The INSERT OR IGNORE and SELECT pattern is a two-step sequence that inserts a row and immediately retrieves its primary key for…
- Squared Loss — For linear regression with squared loss, least squares solves the empirical risk minimization problem.
- Stability Issues with Other Methods — Averagers prevent instability by avoiding extrapolation from observed targets.
- Stable Learning Rules — Tikhonov regularization augments the loss with λ ‖w‖2.
- Stack Machine Code for Expressions — A BinOpNode stores an operator and two child expression nodes, and its value is computed by applying the operator to the values…
- Stack Machines and Machine Language — An expression tree is a data structure that represents an expression, with operators as internal nodes and numbers as leaves.
- Stack Operations — A stack is a sequence of items piled one on top of the other, and only the top item is accessible at any time.
- Stack Operations and the LIFO Principle — A stack can be implemented with an array or with a linked list, and both versions expose the same push, pop, and isEmpty…
- Stacking Multiple Attention Layers — Multi-head attention extends causal attention across several heads, each operating independently with its own weights.
- Stacking Single-Head Attention Layers — The current MultiHeadAttentionWrapper processes its heads sequentially through a list comprehension in the forward method.
- Stacks and Their Operations — A postfix expression places each operator after the two operands it acts on, so the order of symbols alone determines the…
- Stacks: Push and Pop Operations — A stack-based evaluation algorithm can detect errors in a postfix expression without needing parentheses or a human reader.
- Staff-Track and Senior-Track Careers — A pattern becomes a product feature through four stages: recurring engagements, a selected pattern, a generalized version…
- Stage 3: Fine-Tuning the Pretrained LLM — Stage 3 of the course takes a pretrained LLM and fine-tunes it for specific work.
- Stakeholder Alignment in AI Projects — A proposed AI project should move past scoping only if the problem is among the customer's top five priorities.
- Stakeholder Management in Regulated Industries — In regulated industries, trust is the gating factor that controls the data customers will share, the workflows they will allow…
- Stakeholder Maps and Discovery Techniques — The source states that the single most common reason an FDE engagement fails is not technical, but picking the wrong problem to…
- Stakeholder Roles in Manufacturing Projects — Stakeholders include anyone who can affect or be affected by a project, which usually goes beyond the technical team.
- Standard Array Methods — Arrays.copyOf(list, lengthOfCopy) returns a new array of the requested length, copying items from the original and filling any…
- Standard Dialog Boxes in Java — A custom dialog box is built as a subclass of JDialog, and it is a separate window much like a frame.
- Standard Input and Output in Java — The TextIO class is a class in the textio package that contains static methods for input and output operations.
- Standard Input with TextIO — TextIO can redirect input from standard input to a file.
- Standard Reinforcement Learning Concepts — The section broadens reinforcement learning beyond its standard ideas by examining relationships with psychology and neuroscience.
- State Aggregation — The history of function approximation in reinforcement learning includes gradient-descent methods, bootstrapping, state…
- State and Action Representations — Afterstate value functions assess a state after an action has been taken.
- State and Action Representations in Reinforcement Learning — An afterstate describes the task immediately after an action.
- State Representation — Tile coding converts continuous states into coarse, tile-based features.
- State Representation in Reinforcement Learning — A state signal may combine immediate sensations with information derived from past sensations.
- State Spaces — The number of states often grows exponentially as the number of state variables increases.
- State Transitions and Environment Models — A cognitive map captures learned relationships among successive stimuli.
- State Value Functions and Action Values — Watson treated Daily-Double wagering as a decision under uncertainty rather than as a fixed betting rule.
- State Values — An action value evaluates a state together with a particular action.
- State Values and Action Values — A transition graph helps organize how an MDP moves from a state and action to possible next states and rewards.
- State Visitation in Reinforcement Learning — An episodic on-policy distribution depends on both episode starting states and transitions within episodes.
- State-Action Associations — Cognitive maps and environment models are representations of environments, described respectively in psychological and…
- State-Action Value Functions — The Bellman equation is a recursive consistency relationship for value functions.
- State-Space Planning — Incremental planning breaks planning into small steps instead of requiring one uninterrupted calculation.
- State-Space Planning and Random-Sample Q-Planning — Random-sample Q-planning begins by selecting S and A at random.
- State-Value and Action-Value Functions — An optimal value function evaluates the best achievable outcome from a state.
- State-Value Backups — Asynchronous DP does not follow systematic sweeps of the state set.
- State-Value Estimates — Bootstrapping is the practice of revising an estimate on the basis of another estimate.
- State-Value Estimation under a Policy — The methods differ only in how they select returns from episodes with repeated visits.
- State-Value Estimation with Monte Carlo Methods — The target of estimation is qπ(s, a): the expected return after taking a in s and then following policy π.
- State-Value Functions — Optimality is evaluated across all states, not from one state alone.
- State-Value Prediction — TD(0) and Monte Carlo can disagree because they use different evidence from the same episodes.
- State-Visit Distributions — The policy gradient theorem links performance changes to the policy-weight vector θ.
- Statements vs. Expressions — An expression is a combination of values, variables, and operators, or a single value or variable by itself.
- States and Actions in Reinforcement Learning — An afterstate is the state reached immediately after an action.
- States, Actions, and Rewards — Episodic interaction has natural boundaries and restarts its time numbering in each episode.
- States, Actions, and Rewards in Reinforcement Learning — MDP notation distinguishes individual objects from sets of possible objects.
- Static and Instance Members — A simple name inside a method is resolved first against local variables and parameters in scope, and only then against member…
- Static and Non-Static Members in Classes — A class is a blueprint, or factory, used to construct objects; it describes what objects will contain rather than being the…
- Static and Non-Static Subroutines — Drawing instructions belong inside a subroutine definition, and that subroutine belongs inside a class definition.
- Static Member Variables — A static nested class is a class declared inside another class with the static modifier, and it is part of the static structure…
- Static Member Variables in Classes — A subroutine can use local variables declared inside it, formal parameters that receive values from the caller, and variables…
- Static Members and Class Variables — A named constant gives a meaningful name to a value that is meant to stay fixed for the whole program.
- Static Members and Shared Class Data — A class definition is a blueprint that declares the instance variables and instance methods every object of that class will…
- Static Members of a Class — A static nested class has full access to the static members of its containing class, including private ones, and the containing…
- Static Methods and Class-Level Members — A static nested class is a class declared inside another class with the static modifier, and it is part of the static structure…
- Static Methods and the Class Name in Java — A GUI program opens a window on the screen and interacts with the user through it, and a simple one can be written in only a few…
- Static Methods and Their Definitions — A static method is called from another class by writing the class name, a dot, and the method name: ClassName.methodName();
- Static Methods in Java — The standard array-processing methods are static methods defined in the Arrays class, which is in the java.util package.
- Static Nested Classes — Compiling a class with a nested class creates two separate class files.
- Static Nested Classes in Java — A non-static nested class is called an inner class, and it is associated with an object of the containing class rather than with…
- Static Subroutines and Variables in Java — Modifiers appear at the front of a subroutine definition and set characteristics such as whether it is static or public.
- Static Subroutines in Java — A member variable is declared outside any subroutine but inside a class; a static member variable belongs to the class as a…
- Static Variables and Methods — Functions return values that calling code can use.
- Static Variables and Static Initialization — An instance variable can receive an initial value directly in its declaration, such as public int die1 = 3;, and that value is…
- Static Variables and Static Methods — A static import lets a static member of a class be referred to by its simple name, which removes the need for compound names…
- Stationary and Nonstationary Bandit Problems — High initial action-value estimates can make a greedy method explore without explicitly using ε-greedy random selection.
- Stationary Distributions and Markov Transition Matrices — Linear TD(0) relies on the matrix A to control whether weight updates shrink or grow.
- Statistical Error Bounds — The learning protocol separates hypothesis construction from performance estimation.
- Statistical Learning Framework — X names the collection of objects being studied, while Y names the collection of possible labels.
- Statistical Learning Framework Fundamentals — Getting Started introduces how to approach the course rather than requiring you to memorize its entire structure.
- Statistical Learning Theory — Bandit problems have a history spanning statistics, engineering, and psychology.
- Statistics and Optimization in Reinforcement Learning — Reinforcement learning is connected to both mathematical disciplines and the sciences of biological learning.
- Staying Current with LLM Research — arXiv is a source for recent research papers on LLMs, including the recent listing for cs.LG.
- Steady-State Distribution — Continuing problems have no episode endpoints, so policy performance is measured by average reward per time step over the long…
- Step-Size Parameters — A suitable step-size sequence must satisfy two requirements: it must be large enough initially and small enough eventually.
- Step-Size Parameters in Reinforcement Learning — Sample-average updating reduces the step size according to αn(a) = 1/n.
- Stimulus Control and Behavior Modification — Terminology must be interpreted within the field that uses it.
- Stimulus Representation — The TD model places time and changes in prediction at the center of its account of classical conditioning.
- Stimulus Traces and Secondary Reinforcement — A stimulus trace persists in the nervous system after a stimulus ends.
- Stimulus Traces in Instrumental Conditioning — A delayed primary reward does not have to be the only influence operating during the delay.
- Stochastic and Semi-gradient Methods for Value Prediction — SGD applies a sequence of parameter updates to function approximation in value prediction.
- Stochastic Approximation in Reinforcement Learning — The gradient bandit algorithm can be understood as a stochastic approximation to gradient ascent.
- Stochastic Environments — Incorrect models give planning an inaccurate description of the environment.
- Stochastic Gradient Descent — The gradient identifies the direction in which the function increases fastest around the current vector.
- Stochastic Optimal Control — The historical problem is sequential decision-making under uncertainty, not isolated one-time choice.
- Stochastic Policies — Softmax action selection over action preferences can approach deterministic behavior when the optimal action's preference is…
- Storage Devices — Binary patterns encode machine language instructions and data.
- Storage Devices and File Systems — Main memory is fast and nearly as quick as the CPU, but it is volatile and loses all data when power is cut off.
- Storing and Displaying User Data with Variables — Use input('prompt string') to display a message before pausing for user input
- Storing and Querying Spider Data with SQLite — spdump.py reads spider.sqlite and displays pages in a five-element tuple format: (incoming_links, old_rank, new_rank, page_id…
- Storing Data in Memory — A variable is a named memory location that can hold data.
- Storing Data in SQLite Databases — Responsible spidering means retrieving data at a controlled rate to respect server resources; gmane.py retrieves one message per…
- Storing Drawings as Lists of Shape Objects — An off-screen canvas is a BufferedImage, a subclass of Image, that stores a picture in memory instead of showing it directly.
- Storing Geographic Data in Databases — SQLite serves as a local cache to store geocoding results, preventing redundant API calls to the same locations.
- Storing Values in Variables — Go to the end of the line under Variable value and append ;C:\Python27 (please verify that this folder exists, it will be…
- Striatum — The basal ganglia are a connected collection of nuclei that can influence movement, decisions, learning, and reward processing.
- String Basics — An example of a literal constant is a number like 5 , 1.23 , or a string like 'This is a string' or "It's a string!" .
- String Basics and Indexing — Strings are objects belonging to the str class and possess methods for checking, searching, and transforming text.
- String Comparison and Equality in Python — An Easter Egg is a harmless, hidden feature programmers add for fun; in this exercise, it is a special message triggered by the…
- String Concatenation — The format() method constructs strings by substituting placeholders with argument values, replacing the need for error-prone…
- String Concatenation and Combining Text — str() converts any value into its string representation without modifying the original value
- String Concatenation and Conversion — input() pauses your program and waits for the user to type something on their keyboard, then returns what they typed as a string.
- String Concatenation and Repetition — The input() function returns a string, so you must use int() to convert it to an integer for arithmetic operations.
- String Concatenation with the + Operator — The * operator repeats a string by multiplying it by an integer, producing a new string with the original string concatenated…
- String Conversion and Type Casting — but that is much uglier and error-prone. Second, the conversion to string would be done automatically by the format method…
- String Data Type and Literals — The + operator performs concatenation when used with strings, joining them end to end to create a new string.
- String Escape Sequences — Newline characters mark the end of lines in text files, but different systems use different representations: \n, \r, or \r\n.
- String Escape Sequences in Python — Triple single quotes (''') and triple double quotes (""") both create multi-line strings in Python.
- String Formatting — A string is a sequence of characters, ordered by position, and is one of the most frequently used data types in Python.
- String Formatting and the format() Method — The format() method constructs strings by substituting placeholders with argument values, replacing the need for error-prone…
- String Formatting in Python — Invisible characters like spaces, tabs, and newlines can cause silent errors in file operations.
- String Immutability — String methods are built-in functions that transform, search, and analyze text. Each method behaves differently and returns a…
- String Immutability and Method Chaining — translate() with str.maketrans() is the most flexible method for removing or replacing characters; use empty fromstr and tostr…
- String Indexing and Access — A sequence is an ordered set of values identified by integer indices starting at 0; strings are sequences of characters.
- String Indexing and Accessing Characters — The find() method locates the position of a substring and returns its starting index; use find(substring, start_pos) to search…
- String Indexing and Negative Indices — A slice with start >= end always produces an empty string, not an error.
- String Indexing Fundamentals — Use find() to locate a delimiter like a colon within a string, which returns the index of that character.
- String Indexing with Integer Positions — A slice extracts a substring using [n:m], where n is the starting index (inclusive) and m is the stopping index (exclusive).
- String Iteration and Indexing — The counter pattern is a fundamental computational technique: initialize a counter to 0, loop through data, check a condition…
- String Literals and Constant Values — Text blocks provide a readable Java 17 syntax for multiline strings.
- String Literals and Delimiters — An example of a literal constant is a number like 5 , 1.23 , or a string like 'This is a string' or "It's a string!" .
- String Literals and Escape Sequences — An example of a literal constant is a number like 5 , 1.23 , or a string like 'This is a string' or "It's a string!" .
- String Manipulation and Conversion — int() converts values to integers by truncating (not rounding) the decimal portion
- String Manipulation in Python — A palindrome is a text that reads the same forwards and backwards, identified by comparing the original string to its reversed…
- String Methods and Formatting — The + operator joins strings end-to-end (concatenation), not mathematical addition.
- String Methods and Immutability — Most list methods modify the list in place and return None, unlike string methods which return a new string. This is because…
- String Methods and Indexing — Email headers follow a predictable format; the day of the week is always the third word (index 2) on lines starting with 'From'.
- String Methods and Manipulation — Strings are objects belonging to the str class and possess methods for checking, searching, and transforming text.
- String Methods and Splitting — Use the continue statement to skip lines that do not meet your criteria, jumping immediately back to the next iteration of the…
- String Methods and Text Processing — The file search pattern reads through a file line by line, applies a filter condition using string methods, and processes only…
- String Methods and Transformations — A sequence is an ordered set of values identified by integer indices starting at 0; strings are sequences of characters.
- String Methods for Searching and Replacing — A slice extracts a substring using [n:m], where n is the starting index (inclusive) and m is the stopping index (exclusive).
- String Methods Overview — Square brackets in documentation indicate optional arguments; they are not part of the actual code.
- String Methods: find() and in Operator — startswith() checks if a string begins with a specific prefix and returns True or False—it does not search for the substring…
- String Methods: lower, strip, and replace — Method invocation uses dot notation: object.method_name() instead of function syntax like function_name(object).
- String Methods: lower() and upper() — The Python split() function preserves punctuation attached to words, treating 'soft!' and 'soft' as different tokens and…
- String Methods: replace() and split() — String methods like find(), strip(), startswith(), and lower() are essential tools for text processing in Python.
- String Methods: split, find, startswith — A histogram is a frequency count stored in a dictionary, where keys are unique values (like email addresses) and values are…
- String Methods: split() and join() — Unpacking is a syntactic feature that assigns multiple variables from a sequence in one statement, equivalent to index-based…
- String Methods: split(), strip(), and lower() — Finding unique words involves a pipeline: read file → split lines into words → check membership to avoid duplicates → sort…
- String Methods: split(), strip(), and rstrip() — find() returns the starting index of a substring if found, or -1 if not found
- String Methods: strip() and rstrip() — The newline character (\n) is a single invisible character that represents the end of a line, despite appearing as two symbols…
- String Methods: upper(), lower(), and strip() — Write a program that prompts the user for a filename, opens the file, and prints each line in uppercase using the upper() string…
- String Operations and Methods — Sometimes we may want to construct strings from other information. This is where the format() method is useful.
- String Operations and Slicing — raw_input() captures text from the keyboard and returns it as a string to your program.
- String Replication with the * Operator — The + operator performs concatenation when used with strings, joining them end to end to create a new string.
- String Representation of Objects — Special methods enable custom classes to mimic built-in type behaviors through double-underscore naming conventions.
- String Slicing — List slicing uses the syntax t[start:stop] to extract a portion of a list, where start is included and stop is excluded.
- String Slicing and Indexing — String reversal uses the slice notation [::-1] to read characters backward.
- String Slicing and Manipulation in Python — read() loads an entire file into a single string, including all newline characters, and exhausts the file handle resource after…
- String Slicing and Substrings — len() is a built-in Python function that counts and returns the total number of characters in a string.
- String Slicing Syntax and Boundaries — Use find() to locate a delimiter like a colon within a string, which returns the index of that character.
- String Slicing Techniques — A sequence is an ordered set of values identified by integer indices starting at 0; strings are sequences of characters.
- String Traversal and Iteration — A slice with start >= end always produces an empty string, not an error.
- String-to-Number Conversion in Python — Extract numbers from formatted text lines using a regex pattern with a capturing group and the findall() method.
- Strings and String Methods — Strings are objects belonging to the str class and possess methods for checking, searching, and transforming text.
- Strings and Text — A string is a sequence of characters -- in practice, strings are basically just the words and text a program works with.
- Strings in Python — An example of a literal constant is a number like 5 , 1.23 , or a string like 'This is a string' or "It's a string!" .
- Strings: Immutable Character Sequences — Tuples are immutable and therefore do not provide .sort() or .reverse() methods. These methods modify sequences in place, which…
- Strong Convexity — Tikhonov regularization augments the loss with λ ‖w‖2.
- Structural Pattern Matching (Python 3.10+) — Python has no switch statement; this is a deliberate design choice, not an oversight.
- Structural Risk Minimization — Nonuniform learnability is characterized by a countable union of agnostic PAC learnable classes.
- Structured Output Learning — A multiclass predictor must combine evidence for several possible classes into one output.
- Structured Output Prediction — Ranking problems arrange instances by relevance rather than assigning an isolated label to one instance.
- Structured Statements — A block groups multiple statements into one structured statement.
- Structuring Code for Readability — As programs grow larger and more complex, they become harder to read due to the density of formal language
- Structuring Milestones in AI Vendor Contracts — A successful contract negotiation outcome combined full payment of the outcome milestone, validated metric movement, and…
- Subclasses and Inheritance — Object is a special class in package java.lang and is the one class in Java that is not a subclass of any other class.
- Subgradient — SGD requires an expectation-based analysis.
- Subqueries: Nesting SELECT Statements — SQL uses a single equal sign (=) for equality testing in WHERE clauses, not the double equal sign (==) used in Python.
- Subroutine Contracts in Program Design — A precondition is a condition that must be true when a subroutine is called if it is to work correctly, and it is an obligation…
- Subroutine Design — A main routine handles the overall flow of a program and hands specific work to subroutines.
- Subroutine Parameters — A subroutine parameter lets the same subroutine perform its task on different inputs, with the caller choosing the input on each…
- Subroutine Parameters and Arguments — A parameter may have an array type such as int[], so one argument can deliver an entire array to a subroutine.
- Subroutine Parameters and Return Values — A parameterized subroutine declares a parameter list in its definition, which specifies the number and types of values a caller…
- Subroutine Return Values — A formal parameter is a named slot in a subroutine definition, with a simple identifier as its name and a declared type.
- Subroutine Signatures and Parameters — The signature of a subroutine does not include its return type.
- Subroutines and Formal Parameters — The scope of a name is the part of the source code where that name is valid, and it is determined by where the declaration…
- Subroutines and Modularity — A subroutine is a named group of instructions for a specific task.
- Subroutines and Parameters — A functional interface is a Java file that holds a specification for exactly one subroutine, and it is defined in a .java file…
- Subsampling layers — Deep convolutional networks organize processing through convolutional, subsampling, and fully connected layers.
- Substance Versus Cargo Cult in Consulting Delivery — Exceptions to the document-producing default do exist within the Big Four, usually in specific practices within AI or applied…
- Substantial versus Imitative Engagements — The document-versus-code test asks whether an engagement's primary artifact is a document or a deployment.
- Subword Tokenization and Vocabulary Design — Byte Pair Encoding is a tokenization method used in natural language processing, including in GPT-2.
- Summing Values in a Loop — Data scanning loops follow a three-step construction: initialize variables before the loop, perform computation on each item…
- Supervised Instruction Fine-Tuning — Preparing a dataset is a step within supervised instruction fine-tuning.
- Supervised Learning — Unsupervised learning finds useful transformations of input data without target values.
- Supervised Learning and Hypothesis Classes — PAC-Bayes bounds define a hierarchy over a hypothesis class H.
- Support Vector Machines — Early neural networks were explored decades before modern deep learning, but their development was constrained by training…
- Support Vector Machines and Margin-Based Learning — Hard-SVM's output w_S is defined by Equation (26.19) and satisfies L_S(w_S) = 0 under the theorem's assumptions.
- Support Vector Machines for Large Margin Classification — Margin measures the smallest distance from a training point to a hyperplane.
- Surrogate Loss Functions — The Perceptron can be placed inside the Online Gradient Descent framework.
- Surveys and Recent Developments in Reinforcement Learning — Choose a resource category according to your reading goal.
- SVM Optimization and Regularization — Regularizing the norm of w helps both sample complexity and computation.
- SwiGLU Activation Function — GELU is a smooth activation function defined exactly as x times Phi(x), where Phi is the cumulative distribution function of the…
- Swing Component Hierarchy — Swing components are arranged in an inheritance hierarchy.
- Swing Event-Handling Thread — A Swing Timer's thread only generates events; the handler code that responds to them runs on the Swing event-handling thread, so…
- Switch Statements — A switch expression computes and returns a single value, so it is used when the purpose of a switch is to produce a value for an…
- Switch Statements with Numeric Values — A switch statement can branch on a String value, letting the program react to a unit name typed by the user.
- Symbolic AI — Artificial intelligence is the effort to automate intellectual tasks normally performed by humans.
- Symbolic AI and Rule-Based Systems — Classical programming starts with rules written by humans and uses them to process data.
- Symmetric Matrices — A symmetric matrix is positive definite when every eigenvalue is positive.
- Synaptic Plasticity and Reinforcement Signals — Miller's 1981 Law-of-Effect-like rule included synaptically local contingent eligibility traces.
- Syntax and Semantics of Programming Languages — BNF is a notation for writing the syntax rules of programming languages, developed by John Backus and Peter Naur in the late…
- Syntax of Java Programs — Syntax is the form a program must take, and the source stresses that knowing syntax is only part of being a successful programmer.
- Synthesis Review in the Paving Cycle — The source describes the paving cycle as roughly seven months, built from two three-month stages and one six-week paving stage.