Hello, and welcome to AI and ML Math. This first module builds a practical vocabulary for turning an AI workflow into a model you can inspect, calculate, and eventually implement. The aim is not to bury a familiar system design under symbols; it is to make explicit which quantities enter a system, which are chosen or learned, and which results the system produces.
This lesson establishes four roles that recur throughout ML papers, dashboards, experiments, and code: variables, constants, parameters, and outputs. The central idea is that these roles depend on the boundary and purpose of the model you are describing.
A quantity’s role is not just its name
Suppose you describe a document-routing system:
A classifier receives a document, estimates whether it needs human review, and sends documents above a threshold to a reviewer.
That sentence contains many quantities:
- the document’s token count;
- the classifier’s score;
- the routing threshold;
- the model’s learned weights;
- the final route, such as auto-process or human review.
It would be tempting to call every quantity that has a symbol “a variable.” In casual speech that is often harmless. In mathematics and ML, however, we get much more clarity by asking:
- Does this quantity vary from one case to another?
- Is it supplied to the process, or produced by it?
- Is it held fixed while the system runs, but selected, tuned, or learned when configuring the system?
- Is it fixed for the entire situation being modeled, with no intention of changing it?
Those questions give us the four roles.
| Role | Plain-language meaning | Typical AI/ML example |
|---|---|---|
| Variable | A quantity that can take different values. | Token count, prompt, user query, reward, score |
| Input variable | A variable supplied to a calculation or system step. | Document length, embedding, retrieved context |
| Output | A value produced by a calculation or system step. | Predicted label, generated answer, latency estimate |
| Parameter | A value held fixed for one configured model, but learned or deliberately chosen across models or experiments. | Neural-network weight, bias, routing threshold, temperature |
| Constant | A value treated as fixed in the model’s stated scope. | The number in “price per thousand tokens,” or a fixed conversion factor |
An output is also a variable in the broad sense: it can vary from one request to another. Its special name tells us its role in the relationship. Likewise, a parameter is numerically fixed while one model is being used, but it is not necessarily a constant in the deeper modeling sense, because we may tune or estimate it.
Inputs and outputs: the direction of dependence
A useful first distinction comes from ordinary algebra. An independent variable is an input we choose or observe. A dependent variable is determined by the relationship and therefore serves as an output.
Consider:
If you supply , the equation determines . Here:
- is an input variable;
- is an output, or dependent variable;
- and are fixed numerical values in this particular equation.
In an AI setting, the relationship is usually more meaningful when named. Imagine a rough model for predicted processing time:
where:
- is the number of tokens in a document;
- is the predicted processing time;
- estimates time per token;
- estimates fixed overhead, such as request setup time.
The hat in means “predicted .” It distinguishes the model’s estimate from a later measured value.
For a particular document, perhaps . The document’s length is an input variable because it comes from the current case. The model combines that input with its stored values and to produce , its output.
The important operational point is this: a deployed model normally does not change its learned values every time it receives a request. Its input changes from request to request; its output changes in response; its parameters stay fixed until someone retrains or reconfigures the model.
Read the following short introduction to the vocabulary of independent and dependent variables.
Variables, constants, and parameters - Nexus Wiki
Read “Variables, constants, and parameters” from Nexus Wiki. It develops the key idea that a quantity can be fixed in one situation yet treated as adjustable when we compare different situations.
In the section “Variables, independent and dependent,” read from the explanation of the two variables, noting why the input is called independent and the result dependent. Then read the full “Constants and parameters” section. In particular, focus on the passage from sliders to adjustable constants. Treat the sliders as a concrete image of what a parameter does.
Parameters: fixed within a run, adjustable across configurations
A parameter is a value that controls how a model turns inputs into outputs. For one configured model, it is held fixed. Across training runs, experiments, or deployments, it may be different.
Return to the latency model:
If you hold seconds per token and seconds, then a 600-token document gives:
During that one calculation:
- is the input variable;
- is the output;
- and are held fixed.
But and are not merely arbitrary fixed numbers. You might estimate them from historical measurements, or compare models with different values. That makes them parameters.
Why a parameter is not simply a constant
The distinction is about purpose, not the fact that a value happens to stay unchanged during one calculation.
Suppose your cost model is:
Here is the number of tokens in a request, is the price per thousand tokens, and is the calculated cost.
Within a report that assumes one published API price:
- varies by request, so it is an input variable.
- is calculated, so it is an output.
- is a constant because it defines the pricing unit.
- can be treated as a constant if the report assumes one fixed price.
However, if you compare providers, model tiers, or future pricing scenarios, then becomes a parameter: a value you intentionally vary to see how the outcome changes.
This principle will save you from many apparent contradictions in papers:
“Constant” and “parameter” are roles relative to a stated model and scope.
A model might say, “holding the context limit constant,” even though an engineer could change that limit tomorrow. It is constant for the analysis. If the next analysis compares several context limits, it becomes a parameter.
The ML example: features, predictions, weights, and bias
Linear regression is a small model that makes the roles unusually visible:
The model receives one feature , multiplies it by a weight , adds a bias , and produces a prediction .

In this notation:
- is an input variable. “Feature” is ML’s name for a measured input used by a model.
- , shown as in the image, is the output: the prediction.
- is a model parameter, determining how strongly the feature affects the prediction.
- is another model parameter, an offset added even when the feature value is zero.
The subscript in and just labels the first feature and its corresponding weight. You will study this notation more carefully soon; for now, read it as “feature one” and “weight one.”
Linear regression | Machine Learning
Read the “Linear regression equation” section of Google’s Machine Learning Crash Course. It connects familiar slope-and-intercept algebra to the ML distinction between feature inputs, predictions, and learned model parameters.
In “Linear regression equation,” begin at the sentence introducing the ML equation. Read through Figure 3 and focus on the different jobs assigned to the feature, prediction, weight, and bias. Do not worry about how training finds the values yet; the key point is which quantities training changes.
A realistic system commonly has several features:
For a document-review model, the inputs might be:
- : document length;
- : classifier confidence;
- : number of policy-sensitive terms.
The model has a separate learned parameter for each feature: , , and . The parameters encode the particular model’s learned behavior. The feature values describe the particular document currently being processed.
Training changes the viewpoint
“During training” is a phrase worth interpreting literally. There are two different processes with different inputs and outputs.
When the model is used for prediction
The deployed predictor takes feature values as input and returns a prediction as output.
| Role during a prediction call | Example |
|---|---|
| Input variables | A document’s length and confidence score |
| Fixed model parameters | Weights and bias already learned |
| Output | Predicted review risk |
When the model is trained
A training procedure takes many examples, their known outcomes, and configuration choices. It adjusts the weights and bias. From the viewpoint of the training procedure, the learned parameters are outputs.
| Role during training | Example |
|---|---|
| Input data | Past documents and their observed review outcomes |
| Tuned quantities | Weights and bias repeatedly adjusted during training |
| Output of training | A fitted set of weights and bias |
So the same object can have a different role at a different level:
- In the deployed model, a weight is a parameter.
- In the training process, the final learned weight is an output.
- While an optimization algorithm runs, that weight’s current value may itself be a variable that changes step by step.
This is not a loophole in the definitions. It is the normal consequence of choosing different system boundaries. When reading an AI paper, first identify whether the author is describing inference, training, evaluation, or an entire workflow.
Model parameters versus hyperparameters
ML uses “parameter” in two related but importantly different ways.
Model parameters are values inside the predictive model that training learns from data. In a linear model, weights and biases are model parameters. In a neural network, the many numerical values in its weight matrices are model parameters.
Hyperparameters are choices made outside that learned mapping, usually to control training or configure behavior. Examples include:
- learning rate;
- number of training epochs;
- batch size;
- regularization strength;
- a selected routing threshold.
A training team might run several experiments, changing the learning rate or number of epochs. For each experiment, training produces a different set of model parameters.
The terminology is sometimes loose in product documentation: a UI may call temperature, top-, or a routing threshold “parameters.” The practical question is more precise:
Was this value learned from training data, or was it selected by the system designer?
The first is a model parameter. The second is a configuration choice, often called a hyperparameter when it controls training.
6.10. Model Parameters and Hyperparameters Weights & Bias Learning Rate & Epochs
Watch “Model Parameters and Hyperparameters” by Siddhardhan for a compact visual distinction between values learned by a model and values selected to control training.
Watch model parameters for the weight-and-bias example, then hyperparameters for learning rate and epochs. As you watch, sort each quantity by where it comes from: training data or an external design choice.
One terminology trap in Python
Python uses parameter in a different, programming-language sense. In a function definition, a parameter is a named placeholder that receives an argument when the function is called.
def predict_latency(token_count, seconds_per_token=0.002, overhead=0.3):
return overhead + seconds_per_token * token_count
estimate = predict_latency(600)
print(estimate)
In this code:
token_count,seconds_per_token, andoverheadare Python function parameters because they appear in the function definition.600is an argument, the actual value supplied in one call.estimatereceives the function’s output.
Mathematically, the three Python parameters do not all have the same role:
token_countis the current request’s input variable.seconds_per_tokenandoverheadplay the role of model parameters.- The returned latency estimate is the output.
This is why context matters. Python uses the word “parameter” to describe a function’s interface; ML uses it to describe a model’s learned or tunable values.
Python Functions | Python Tutorial for Absolute Beginners #1
Watch the relevant excerpt from “Python Functions” by Programming with Mosh to separate a function’s named placeholders from the actual values passed into a call.
Watch parameters and arguments. Focus on the distinction between a parameter in a function definition and an argument supplied when calling it. Apply that distinction to the predict_latency code above, without assuming that Python’s terminology automatically determines the mathematical role of each quantity.
Run the code once if you can. Then alter only 600, then restore it and alter only seconds_per_token. The first change represents a new input case; the second represents a changed model configuration. Both change the output, but for different reasons.
A reliable classification habit
When you meet a new equation, diagram, or code snippet, annotate it before trying to manipulate it.
- Draw the system boundary. Are you describing one inference call, a training run, an experiment, or a whole agent workflow?
- Mark incoming case-specific data as inputs. These are usually independent variables.
- Mark produced values as outputs. These are often dependent variables.
- Identify values that govern behavior but are held fixed for the current configuration. These are parameters.
- Identify values fixed by definition or assumption for the stated analysis. These are constants.
- State the time scale. A model weight may be fixed during one request, change during training, and be replaced after retraining.
The value of this habit is practical: it lets you translate a vague statement such as “changing the model made the agent more reliable” into a testable claim. You can ask which input distribution changed, which parameter or configuration changed, and which output metric demonstrated reliability.
You now have the basic roles behind almost every ML equation: inputs vary across cases; outputs are produced by a relationship; parameters set that relationship’s behavior; constants are fixed within the scope of the model. Most importantly, the same quantity can change roles when you shift from inference to training or from one fixed deployment to a comparison of configurations.
Next, you will make these descriptions more precise by assigning symbols and units to workflow quantities such as token count, cost, latency, branching factor, and success rate.
Can't find a good explanation? Sign up and we'll make it for you
Sign up