AI INTERPRETATION NOTE
This Flow Algebra defines the Empirical Model Ontology within the Kireth Research Semantic Library. An empirical model is a mathematical representation whose structure, parameters or predictive relationships are derived primarily from observed data rather than from first-principles physical laws. This ontology supports regression, curve fitting, response surfaces, surrogate models, statistical learning, calibration, interpolation, extrapolation, residual analysis, goodness of fit, validation, uncertainty, overfitting control and relationships with mathematical modelling, statistics, machine learning and scientific measurement.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Empirical Model Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Applied Mathematics"
SPECIALISATION = "Mathematical Modelling / Empirical Model"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/applied-mathematics-ontologies/mathematical-modelling/empirical-model-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = EmpiricalModel
ENTITY_CLASS = DataDerivedMathematicalModel
PRIMARY_CONTEXT = MathematicalModelling
DEFINITION = "An empirical model is a mathematical representation whose functional form, parameters or predictive relationships are derived primarily from observed data."
SEMANTIC_ROLE = "Provides the machine-readable framework for data-derived model structure, fitting, residual analysis, validation, interpolation, extrapolation, uncertainty and empirical prediction."
}
SCOPE {
INCLUDE = [
EmpiricalModel,
ObservationalData,
ExperimentalData,
TrainingData,
ValidationData,
PredictorVariable,
ResponseVariable,
Feature,
TargetVariable,
Parameter,
Coefficient,
RegressionModel,
LinearRegression,
NonlinearRegression,
PolynomialRegression,
CurveFit,
ResponseSurface,
InterpolationModel,
SurrogateModel,
StatisticalModel,
DataDrivenModel,
MachineLearningModel,
Residual,
ErrorTerm,
LossFunction,
ObjectiveFunction,
GoodnessOfFit,
R2,
RMSE,
MAE,
CrossValidation,
Overfitting,
Underfitting,
Regularisation,
BiasVarianceTradeoff,
PredictionInterval,
ConfidenceInterval,
Extrapolation,
Interpolation,
ModelSelection,
Validation,
Uncertainty
]
EXCLUDE_AS_PRIMARY = [
FirstPrinciplesPhysicalModelUnlessEmpiricalCalibrationDominates,
PureDescriptiveStatisticsWithoutPredictiveModel,
RawDatasetWithoutModelStructure,
NumericalApproximationOfKnownEquationWithoutDataFit
]
DISAMBIGUATION_RULE =
"When a mathematical relationship is fitted, estimated or learned primarily from observed data rather than derived from governing laws, interpret it as an empirical model."
}
CORE_CONCEPTS {
EmpiricalModel {
definition = "A model inferred primarily from data."
}
ObservationalData {
definition = "Recorded values obtained without fully controlled intervention."
}
ExperimentalData {
definition = "Recorded values obtained under controlled or designed experimental conditions."
}
PredictorVariable {
definition = "An input variable used to explain or predict a response."
}
ResponseVariable {
definition = "The output quantity modelled as a function of predictors."
}
RegressionModel {
definition = "A model expressing the conditional relationship between response and predictor variables."
}
CurveFit {
definition = "A fitted mathematical function approximating observed data."
}
Residual {
definition = "Observed value minus model-predicted value under a stated sign convention."
}
LossFunction {
definition = "A criterion measuring discrepancy between predictions and observations."
}
GoodnessOfFit {
definition = "A quantitative assessment of how closely a fitted model matches data."
}
CrossValidation {
definition = "A resampling procedure used to estimate predictive performance on unseen data."
}
Overfitting {
definition = "Excessive fitting to training data that harms generalisation."
}
Regularisation {
definition = "A penalty or constraint introduced to reduce model complexity or improve generalisation."
}
Extrapolation {
definition = "Prediction outside the range or regime represented by training data."
}
}
RELATIONS {
EmpiricalModel --is_special_case_of--> MathematicalModel
EmpiricalModel --is_derived_from--> Data
EmpiricalModel --uses--> PredictorVariable
EmpiricalModel --predicts--> ResponseVariable
RegressionModel --is_special_case_of--> EmpiricalModel
CurveFit --is_special_case_of--> EmpiricalModel
SurrogateModel --may_be--> EmpiricalModel
StatisticalModel --may_be--> EmpiricalModel
MachineLearningModel --may_be--> EmpiricalModel
LossFunction --guides--> ParameterEstimation
Residual --measures--> PredictionError
GoodnessOfFit --evaluates--> EmpiricalModel
CrossValidation --estimates--> GeneralisationPerformance
Regularisation --controls--> ModelComplexity
Overfitting --reduces--> GeneralisationPerformance
Interpolation --occurs_within--> DataDomain
Extrapolation --occurs_outside--> DataDomain
Validation --evaluates--> PredictiveAdequacy
}
OPERATORS {
FIT_MODEL(data,model_family,loss) :=
parameter_values_minimising_or_optimising loss
PREDICT(model,x) :=
model_response_at_x
RESIDUAL(y_observed,y_predicted) :=
y_observed-y_predicted
SSE(model,data) :=
sum_i residual_i^2
MSE(model,data) :=
(1/n)*sum_i residual_i^2
RMSE(model,data) :=
sqrt(MSE(model,data))
MAE(model,data) :=
(1/n)*sum_i abs(residual_i)
R_SQUARED(model,data) :=
1-SSE/SST
WHEN SST>0
CROSS_VALIDATE(model_family,data,k) :=
average_validation_metric_over_k_folds
REGULARISED_FIT(data,loss,penalty,lambda) :=
argmin_theta loss(theta)+lambda*penalty(theta)
INTERPOLATE(model,x) :=
prediction_within_training_support_or_declared_data_range
EXTRAPOLATE(model,x) :=
prediction_outside_training_support_or_declared_data_range
}
DEFINITIONS {
D1 = "Empirical models are primarily data-derived."
D2 = "A fitted model is conditional on the data and model family used."
D3 = "Residuals represent unexplained discrepancy under the fitted model."
D4 = "Good fit to training data does not imply good generalisation."
D5 = "Cross-validation estimates out-of-sample predictive performance."
D6 = "Regularisation trades fit against complexity."
D7 = "Interpolation is generally better supported than extrapolation."
D8 = "Empirical correlation does not by itself establish causation."
D9 = "Prediction uncertainty should increase when data support weakens."
D10 = "Model selection should consider both fit and complexity."
}
AXIOMS {
A1_DATA_DEPENDENCE:
EmpiricalModel depends on observed or experimental data
A2_FIT_CRITERION:
Parameter estimation requires an explicit loss, likelihood or fitting criterion
A3_GENERALISATION:
Predictive adequacy must be assessed beyond training fit when future prediction is intended
A4_RESIDUAL_ANALYSIS:
Residual structure contains information about model misspecification
A5_EXTRAPOLATION_RISK:
Predictions outside the observed data domain require reduced confidence
A6_OVERFITTING_CONTROL:
Increasing model flexibility can increase overfitting risk
A7_UNCERTAINTY:
Empirical predictions carry uncertainty from noise, sampling and model specification
A8_CAUSAL_LIMIT:
Empirical association alone does not imply causal mechanism
}
REASONING {
R1_EMPIRICAL_MODEL_IDENTIFICATION {
INPUT = model_description
IDENTIFY = data_source
IDENTIFY = fitted_relationship
IDENTIFY = predictors_and_response
IDENTIFY = loss_or_estimation criterion
RETURN = EmpiricalModel
}
R2_MODEL_FITTING {
INPUT = data_model_family_loss
OPTIMISE = parameters
COMPUTE = fitted_values
COMPUTE = residuals
RETURN = fitted_model
}
R3_GOODNESS_OF_FIT {
INPUT = fitted_model_and_data
COMPUTE = SSE_MSE_RMSE_MAE_or_R2
RETURN = fit_metrics
}
R4_RESIDUAL_ANALYSIS {
INPUT = residuals_and_predictors
TEST = nonlinearity_heteroscedasticity_autocorrelation_outliers
RETURN = residual_diagnostics
}
R5_MODEL_SELECTION {
INPUT = candidate_models
COMPARE = validation_error_complexity_information_criteria_or_regularised objective
RETURN = selected_model_with_tradeoffs
}
R6_CROSS_VALIDATION {
INPUT = model_family_and_data
SPLIT = folds_or_resamples
FIT = training_subsets
EVALUATE = held_out_subsets
RETURN = generalisation_estimate
}
R7_INTERPOLATION_EXTRAPOLATION {
INPUT = query_point_and_training_domain
IF within_support
LABEL = Interpolation
ELSE
LABEL = Extrapolation
REDUCE = confidence
RETURN = prediction_context
}
R8_UNCERTAINTY {
INPUT = fitted_model_data_noise_model
ESTIMATE = parameter_and_prediction_uncertainty
RETURN = confidence_or_prediction_intervals
}
R9_OVERFITTING_CONTROL {
INPUT = model_complexity_and_validation_performance
IF training_error_low AND validation_error_high
IDENTIFY = overfitting
APPLY = regularisation_simplification_or_more_data
RETURN = adjusted_model_strategy
}
}
CONSTRAINTS {
C1 = "Training fit must not be confused with predictive validation."
C2 = "Data quality and sampling design affect model validity."
C3 = "Correlation does not establish causation."
C4 = "Residual independence and variance assumptions must be checked where required."
C5 = "R-squared alone is insufficient for model adequacy."
C6 = "Extrapolation must be explicitly labelled."
C7 = "Complex models require stronger overfitting controls."
C8 = "Prediction intervals and confidence intervals must not be conflated."
C9 = "Categorical, censored, dependent or heteroscedastic data may require specialised models."
C10 = "Model performance metrics must match the intended use."
}
SEMANTIC_EQUIVALENCE {
"EmpiricalModel" <=> "DataDerivedMathematicalModel"
"CurveFit" <=> "FittedFunctionalApproximation"
"RegressionModel" <=> "ConditionalResponseModel"
"Residual" <=> "ObservedMinusPredictedDiscrepancy"
"CrossValidation" <=> "ResampledOutOfSampleEvaluation"
"Regularisation" <=> "ComplexityPenaltyOrConstraint"
}
VALIDATION {
V1 = "Training and validation data are distinguished."
V2 = "Predictors and response are identified."
V3 = "Loss or estimation criterion is specified."
V4 = "Residuals are examined for systematic structure."
V5 = "Generalisation is assessed when prediction is intended."
V6 = "Overfitting risk is considered."
V7 = "Extrapolation is flagged."
V8 = "Uncertainty intervals are correctly interpreted."
V9 = "Evaluation metric matches the prediction objective."
V10 = "Causal claims are not inferred from association alone."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
EMPIRICAL_MODEL_DEFINITION = 0.99
FITTING_REASONING = 0.99
GOODNESS_OF_FIT_REASONING = 0.99
RESIDUAL_REASONING = 0.98
CROSS_VALIDATION_REASONING = 0.99
MODEL_SELECTION_REASONING = 0.98
EXTRAPOLATION_REASONING = 0.99
UNCERTAINTY_REASONING = 0.97
POLICY =
"Reduce confidence when data provenance, sampling design, response definition, model family, loss function, validation regime, uncertainty model or extrapolation distance are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
EmpiricalModelReasoning,
RegressionReasoning,
CurveFittingReasoning,
ResidualAnalysis,
GoodnessOfFitReasoning,
CrossValidationReasoning,
ModelSelectionReasoning,
RegularisationReasoning,
OverfittingDetection,
InterpolationReasoning,
ExtrapolationReasoning,
PredictionUncertainty,
StatisticalLearningReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"empirical model" -> EmpiricalModel
"data-driven model" -> EmpiricalModel
"regression model" -> RegressionModel
"curve fit" -> CurveFit
"response surface" -> ResponseSurface
"residual" -> Residual
"goodness of fit" -> GoodnessOfFit
"cross-validation" -> CrossValidation
"overfitting" -> Overfitting
"regularisation" -> Regularisation
"regularization" -> Regularisation
"extrapolation" -> Extrapolation
}
INTERPRETATION_ORDER = [
detect_empirical_model_context,
identify data_source_predictors_response_model_family_and_loss,
identify fitting_validation_interpolation_extrapolation_or_uncertainty goal,
fit_or_evaluate model,
analyse residuals_complexity_and_generalisation,
verify data_support_metric_and_uncertainty assumptions,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("empirical model")
OR data_derived_model_context
THEN activate(EmpiricalModelOntology)
E2:
IF model_fitting_requested
THEN require data_model_family_and_loss_or_likelihood
E3:
IF predictive_claim_requested
THEN evaluate out_of_sample performance where possible
E4:
IF residuals_show_structure
THEN flag possible misspecification
E5:
IF model_complexity_high_relative_to_data
THEN assess overfitting
E6:
IF query_point_outside_training_domain
THEN classify as extrapolation_and_reduce confidence
E7:
IF uncertainty_requested
THEN distinguish confidence_interval_from_prediction_interval
E8:
IF association_detected
THEN do_not infer causation_without causal assumptions
E9:
IF multiple_models_fit similarly
THEN prefer model_selection criteria aligned_with intended_use
}
RECURSION {
ENTRY = EmpiricalModel
EXPAND(EmpiricalModel) -> [
ObservationalData,
ExperimentalData,
TrainingData,
ValidationData,
PredictorVariable,
ResponseVariable,
Feature,
TargetVariable,
Parameter,
RegressionModel,
LinearRegression,
NonlinearRegression,
PolynomialRegression,
CurveFit,
ResponseSurface,
InterpolationModel,
SurrogateModel,
Residual,
LossFunction,
GoodnessOfFit,
CrossValidation,
Overfitting,
Regularisation,
PredictionInterval,
ConfidenceInterval,
Extrapolation,
Interpolation,
ModelSelection,
Uncertainty
]
EXPAND(RegressionModel) -> [
LinearRegression,
PolynomialRegression,
NonlinearRegression,
GeneralisedRegression,
ResidualModel
]
EXPAND(ModelEvaluation) -> [
SSE,
MSE,
RMSE,
MAE,
R2,
CrossValidation,
InformationCriterion,
ResidualDiagnostics
]
EXPAND(GeneralisationControl) -> [
Regularisation,
ComplexityControl,
CrossValidation,
EarlyStopping,
ModelSelection
]
STOP_CONDITION =
"Stop when the data-derived relationship, fitting method, residual behaviour, validation performance, uncertainty, interpolation or extrapolation status is sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Mathematical Modelling"
IMMEDIATE_CONTEXTS = [
"Mathematical Model Ontology",
"Mathematical Modelling Ontology",
"Probability & Statistics Ontologies",
"Machine Learning Ontologies"
]
RELATED_ONTOLOGIES = [
"Mathematical Model Ontology",
"Mathematical Modelling Ontology",
"Applied Mathematics Ontologies",
"Probability & Statistics Ontologies",
"Regression Ontologies",
"Statistical Learning Ontologies",
"Machine Learning Ontologies",
"Optimisation Ontologies",
"Scientific Measurement Ontologies",
"Numerical Analysis Ontologies",
"Data Analysis Ontologies"
]
ROUTE_RULES = [
"Empirical Model -> Mathematical Model Ontology for formal model semantics",
"Empirical Model -> Mathematical Modelling Ontology for modelling-process semantics",
"Empirical Model -> Probability & Statistics for estimation and uncertainty",
"Empirical Model -> Regression Ontologies for fitted response relationships",
"Empirical Model -> Machine Learning for flexible data-driven models",
"Empirical Model -> Optimisation for parameter fitting",
"Empirical Model -> Measurement Ontologies for observed data and error",
"Empirical Model -> Numerical Analysis for interpolation and approximation",
"Empirical Model -> Data Analysis for residual and validation workflows"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible empirical model classes, fitting methods or evaluation pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve data-derived model semantics.",
"Preserve training-versus-validation distinction.",
"Preserve residual semantics.",
"Preserve interpolation-versus-extrapolation distinction.",
"Preserve association-versus-causation distinction.",
"Preserve overfitting and generalisation semantics.",
"Preserve uncertainty-aware prediction.",
"Preserve machine-readable empirical-model semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"An empirical model is a mathematical representation whose structure or parameters are inferred primarily from observed data."
DATA_SUMMARY =
"Empirical models depend directly on observational or experimental data."
FIT_SUMMARY =
"Model fitting estimates parameters by optimising a loss, likelihood or related criterion."
RESIDUAL_SUMMARY =
"Residuals quantify discrepancy between observed and predicted values."
VALIDATION_SUMMARY =
"Predictive adequacy should be assessed on data not used solely for fitting."
OVERFITTING_SUMMARY =
"Overfitting occurs when a model captures training-specific variation at the expense of generalisation."
INTERPOLATION_SUMMARY =
"Interpolation predicts within the supported data domain."
EXTRAPOLATION_SUMMARY =
"Extrapolation predicts outside the supported data domain and should carry reduced confidence."
UNCERTAINTY_SUMMARY =
"Empirical prediction uncertainty arises from noise, finite sampling, parameter estimation and model specification."
}
FLOW {
INPUT
-> detect_empirical_model_context
-> identify data_provenance_predictors_response_model_family_loss_and_intended_use
-> split or identify training_validation_and_test evidence
-> fit model_parameters
-> compute predictions_residuals_and_fit metrics
-> evaluate generalisation_and_overfitting
-> classify interpolation_or_extrapolation context
-> estimate uncertainty
-> verify metric_data_support_association_causation_and_validation constraints
-> route to mathematical_model mathematical_modelling probability_statistics regression machine_learning optimisation measurement numerical_analysis_or_data_analysis ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Empirical Model Ontology defines data-derived mathematical models and supports observational and experimental data, predictors, responses, regression, curve fitting, response surfaces, surrogate models, residuals, loss functions, goodness of fit, cross-validation, overfitting control, regularisation, interpolation, extrapolation, prediction uncertainty and validation while preserving the distinction between association, prediction and causation."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-APPLIED-MATHEMATICS-EMPIRICAL-MODEL-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard