Context and Data Understanding
Data science does not begin with data. It begins with a situation.
A dataset is never a complete copy of reality. It is a partial, structured, and historically produced representation of some phenomenon. Every row, column, label, sensor reading, transaction record, or survey response has already passed through a chain of choices: what to observe, who to observe, when to observe, how to measure, what to exclude, how to store, and how to interpret. For this reason, data understanding have to be a scientific and ethical act.
The previous chapter introduced data science as an interdisciplinary process for transforming data into knowledge. This chapter moves one level deeper. We want to know “What does it mean to understand data before modeling it?”. The answer is that one must understand the context in which data are produced, the limitations of what they represent, the social and technical systems that shape them, and the ethical consequences of using them for decisions.
At this point, one must move beyond the idea of data as a static resource. Data should instead be viewed as a socio-technological construct: something produced by people, institutions, instruments, software systems, economic incentives, and historical circumstances. For example, consider a dataset of hospital readmission records. Technically, it may contain variables such as age, diagnosis code, length of stay, insurance type, prior visits, and readmission status. But the data are also shaped by hospital policy, insurance coverage, physician judgement, patient behavior, coding practices, and structural inequalities in healthcare access. A model trained on such data does not simply learn “health risk”; it may also learn the structure of the healthcare system that produced the observations.
So we come to the central argument of this chapter:
Data understanding requires context understanding. Without context, data means nothing.
1. Context
In data science, context refers to the circumstances, conditions, relationships, and meanings surrounding an observation. It includes the environment in which data are generated, the purpose for which they are collected, the actors involved, the measurement process, and the decision setting in which the data will be used.
Context is the situational frame that gives data meaning.
Context is therefore part of the structure that determines what the data are, what they mean, and how they can be responsibly used.
Paul Dourish argues that conventional approaches often treat context as something that can be represented in advance as a stable set of measure variables, but this misses the way context emerges through activity and interaction. In his view, context is relational, dynamic, and produced through practice1. A variable may have one meaning in one decision environment and another meaning elsewhere. For example, “number of previous purchases” in a retail dataset may indicate customer loyalty, but in another setting it may indicate financial pressure, seasonal demand, or limited product alternatives. The variable itself does not carry a universal meaning; it depends on its context.
“Temperature” may be a relevant contextual variable in several systems, but its meaning changes by activity:
| Setting | Temperature Means |
|---|---|
| Weather forecasting | Atmospheric condition |
| Retail recommendation | Seasonal purchase signal |
| Food storage | Safety condition |
| Manufacturing | Process-control variable |
| Healthcare | Possible symptom |
The same measured value can support different interpretations depending on the task. A temperature of 38°C may indicate a hot summer day in one dataset, a dangerous fever in a clinical dataset, or an equipment warning in an industrial sensor stream.
Thus, data understanding requires asking:
- What activity produced this data?
- What entity is being represented?
- What environment surrounds the observation?
- What decision will be made from the data?
- What assumptions connect the measurement to the phenomenon of interest?
A dataset without these answers is scientifically fragile.
2. The Ontology of Data: Why “Raw Data” is Misleading
2.1. Data are Produced
A critical idea in modern data studies is that “raw data” is a misleading phrase. Data are not naturally occurring objects waiting to be collected. They are produced through instruments, categories, protocols, database schemas, institutional incentives, and human decisions. As the result, data are always already shaped by the conditions of their production2. Similarly, large-scale data should not be treated as neutral or self-explanatory; big data is embedded in social, methodological, and interpretive assumptions3.
This does not mean that data are useless or purely subjective. Rather, it means data must be interpreted as evidence produced under specific conditions. Data are powerful precisely because they can support systematic analysis, but their evidentiary value depends on understanding how they cam into being.
2.2. Theory-Ladenness of Data
All data collection depends on prior theory, even when that theory is implicit. Before collecting data, we must decide what counts as an object, event, variable, category, or outcome.
In an educational dataset, the variable “student success” might be measured by course grade, graduation status, retention, GPA, employment, or self-reported learning. Each choice encodes a different theory of what “success” means. A model trained on course grades learns patterns associated with grades, not necessarily learning, intellectual development, or long-term achievement.
Similarly, in criminal justice data, “crime rate” may reflect reported crimes, arrests, convictions, police deployment, neighborhood surveillance, or legal definitions. Treating such a variable as a direct measure of criminal behavior ignores the institutional process that produced it.
2.3. The Vantage Point Problem
Every dataset is collected from a vantage point. This vantage point determines what becomes visible and what remains invisible.
A company’s customer dataset captures people who interacted with the company, not everyone who might need the product. A hospital dataset captures people who reached the hospital, not everyone who was sick. A social media dataset captures those who use the platform, not society as a whole. A sensor network captures locations where sensors were installed, not necessarily the true spatial distribution of the phenomenon.
This is the vantage point problem: data reflect the position of the observer. In data science, the observer may be a person, organization, platform, institution, or measurement device. Understanding the observer is part of understanding the data.
3. Data Understanding as Scientific Practice
3.1. Beyond Summary Statistics
Data understanding is often associated with Exploratory Data Analysis, or EDA. EDA is a scientific practice of becoming familiar with the structure, limitations, anomalies, and possible meanings of a dataset.
Summary statistics are useful, but they are incomplete. A mean, median, standard deviation, or correlation coefficient compresses a distribution into a small number of values. That compression may hide skewness, multimodality, outliers, nonlinear relationships, missingness patterns, or subgroup differences.
Suppose a dataset of house prices has a median price of $160,000. That number may be accurate, but it does not reveal whether most houses are clustered near the median, whether a few luxury homes create a long right tail, whether there are multiple housing submarkets, or whether some values are erroneous. A histogram, box-plot, density plot, or geographic visualization may reveal structure that a table of summary statistics cannot.
We will discuss about EDA more carefully in Chapter 3
3.2. The Shape of Data
To understand data, we must inspect the “shape” of the dataset. Shape refers to the distributional, relational, temporal, and structural patterns within the data.
Important questions include:
| Aspect | Guiding Question |
|---|---|
| Distribution | Are variables symmetric, skewed, heavy-tailed, or multimodal? |
| Missingness | Which values are missing, and is the missingness random or systematic? |
| Outliers | Are extreme value errors, rare events, or meaningful cases? |
| Dependence | Are observations independent, clustered, temporal, or spatial? |
| Class balance | Are some outcomes rare? |
| Measurement | Are variables measured consistently? |
| Granularity | Are observations recorded at the correct level of detail? |
| Stability | Does the data-generating process change over time? |
Consider a housing dataset with the following variables:
- Sale price
- Square footage
- Number of bedrooms
- Number of bathrooms
- Year built
- Neighborhood
- School district
- Distance to city center
- Sale date
A novice analysis may begin by calculating average price and fitting a regression model. A deeper data understanding process would ask:
- Are prices skewed?
- Are luxury properties creating outliers?
- Are neighborhoods mixing different housing markets?
- Are sale prices inflation-adjusted?
- Are there seasonal effects?
- Are missing values concentrated in older homes?
- Are square footage values measured consistently?
- Is the model being asked to predict current prices using information only available after sale?
4. The Illusion of “n = all”
4.1. Big Data is Not Whole Data
One of the most dangerous mistakes is modern data science is the belief that large data automatically solves the problem of representation. This is sometimes called the illusion of “n = all”. The analyst assumes that because the dataset is large, it must be complete.
But large data are often incomplete in systematic ways. A dataset may contain millions of observations and still exclude the most important population. Social media data may be massive but biased toward platform users. Search query data may be enormous but shaped by interface design and media attention. Customer data may be large but limited to people already inside the company’s ecosystem.
Scale can create a false sense of objectivity and completeness. The size of a dataset does not remove the need for interpretation, sampling logic, or methodological caution.
4.2. Bounded Rationality and Partial Observation
Because data are incomplete, decision-making always occurs under bounded rationality. Bounded rationality refers to describe decision-making under limited information, limited cognitive capacity, and limited time4. In data science, bounded rationality appears because models are built from partial observations of a complex world.
A model may optimize within the boundaries of available data, but those boundaries may not align with the real decision problem. For example, a hiring model may predict which applicants resemble historically successful employees. But if historical hiring was biased, then the model’s apparent rationality is bounded by the organization’s behavior.
Thus, data scientist must ask:
- What part of reality is captured?
- What part is missing?
- Who is absent from the data?
- Which variables are proxies rather than direct measurements?
- What historical process produced the labels?
- Are we optimizing for the true goal or a convenient substitute?
A large dataset does not eliminate uncertainty; in fact, it can hide uncertainty behind volume.
5. Information Fusion and Situation Awareness
5.1. Information Fusion
Data analysts more often combine heterogeneous sources rather than a single dataset: transaction records, sensor streams, demographic data, whether data, geographic information, text, images, logs, and expert knowledge. This process is often called information fusion.
Information fusion is the process of combining information from multiple sources into a more coherent representation of a situation.
In human factors research, situation awareness is commonly defined through three levels: perceiving relevant elements in the environment, comprehending their meaning, and projecting their future status. We often use Endsley’s theory of situation awareness in dynamic decision-making systems such as aviation, emergency response, healthcare, and control systems5. Many applied systems must do the same thing within the framework:
- Perceive signals from data.
- Comprehend what those signals mean in context.
- Project likely future states.
- Act through a decision, recommendation, alert, or intervention.
5.2. Four Levels of Inference
An adaptive data system can be understood through four levels of inference.
(1) Data Inference
Data inference refers to conclusions drawn directly from observed data. For example:
- Sales increased by 12% last month.
- A sensor recorded a temperature spike.
- A customer clicked on three product pages.
- A patient’s heart rate increased.
This level is descriptive. It tells us what was observed.
(2) Context Inference
Context inference interprets the observation in relation to other conditions. For example:
- Sales increased because of a holiday promotion.
- The temperature spike occurred during a known equipment cycle.
- The customer was browsing during a seasonal sale.
- The patient’s heart rate increased after medication.
This level adds situational meaning.
(3) Decision Inference
Decision inference connects the interpreted situation to an action. For example:
- Increase inventory for similar products.
- Ignore the temperature spike if it matches normal operating behavior.
- Recommend related products.
- Alert a clinician if the heart rate pattern is abnormal.
This level asks what should be done.
(4) System Inference
System inference considers a broader system and its evolution. For example:
- Will promotions train customers to wait for discounts?
- Will ignoring repeated equipment spikes increase long-term risk?
- Will recommendations narrow user exposure and reduce diversity?
- Will clinical alerts create alarm fatigue?
This level asks how decisions affect the systems over time.
6. Context-Aware Systems
6.1. Context-Aware Recommendation
A useful example of context-aware data science is the recommender system. A context-aware recommender systems is described as systems that adapt recommendations to the user’s contextual situation, such as time, location, social setting, device, weather, or activity6.
An e-commerce platform might recommend:
- Swimwear in July but coats in December.
- Umbrellas when local weather indicates rain.
- Quick meals during weekday evenings.
- Travel accessories before a scheduled trip.
- Different products on mobile versus desktop.
The same user may have different preferences under different conditions. Context-aware modeling recognizes that preference is situated.
6.2. Context as Model Input v.s. Context as Interpretation
There are two ways context appears in data science.
The first is context as model input. Here, contextual variables are added to the model: time, location, weather, device type, user state, economic conditions, or social setting.
The second is context as interpretation. Here, context is the reasoning framework used to understand whether the model output makes sense.
A model may predict high demand for emergency services in neighborhood. Contextual variables may include time of day, weather, and prior incidents. But interpretation requires asking deeper questions: is demand higher because of actual need, lack of preventive care, reporting practices, or unequal access to services?
Both forms of context are necessary. Adding context variables can improve prediction, but context-aware interpretation prevents shallow or harmful conclusions.
7. Adaptive Learning in Dynamic Environments
7.1. The Problem of Change
Many data science systems are built under the assumption that the future will resemble the past. This assumption is often incorrect. Customer behavior changes, markets shift, weather patterns vary, disease dynamics evolve, adversaries adapt, and institutions modify their policies.
When the relationship between input variables and the target variable changes over time, the problem is known as concept drift7.
Concept drift is a situation in ==online supervised learning== where the relation between inputs and outputs changes over time. We need an adaptation strategies, algorithms, and evaluation methods for such non-stationary environments.
Relatedly, dataset shift refers to a mismatch between training and deployment distributions. This is a central problem in machine learning when training and test conditions differ8.
7.2. Types of Change
Dynamic environments can change in different ways.
| Type of Change | Description | Example |
|---|---|---|
| Covariate shift | Input distribution changes | Customers become younger over time |
| Prior probability shift | Outcome prevalence changes | Fraud becomes more common |
| Concept drift | Relationship between input and output changes | Old fraud signals stop working |
| Label drift | Meaning or coding of labels changes | Hospital diagnosis codes are updated |
| Behavioral adaptation | Users respond to the model | Sellers change behavior to game ranking systems |
The last case is especially important. Once a model is deployed, it can change the environment it measures. A recommendation system changes what users see. A credit scoring system changes who receives loans. A predictive policing system changes where police are sent, which changes what crime is recorded. The model is not outside the system; it becomes part of the system.
7.3. The Red Queen View of Adaptive Systems
The Red Queen metaphor comes from evolutionary thinking: one must keep running just to stay in the same place. In adaptive machine learning, this means that a model’s environment may evolve in response to the model itself. Fraud detection, cybersecurity, advertising, finance, and recommender systems are all examples where the system and its users co-evolve.
A fraud model may identify suspicious transaction patterns. Fraudsters then change their behavior. The model must adapt. But if it adapts too quickly, it may overreact to noise. If it adapts too slowly, it becomes obsolete.
Adaptive learning therefore requires balance:
- Stability versus flexibility.
- Historical knowledge versus new evidence.
- Sensitivity to drift versus robustness to noise.
- Automation versus human oversight.
- Short-term performance versus long-term system effects.
8. Business Context and Modeling Culture
8.1. From Business Question to Modeling Strategy
In applied data science, modeling choices should be guided by the decision problem. Some questions require explanation, some require forecasting, some require causal inference, some require optimization, and some require monitoring.
For example:
| Business Question | Modeling Translation |
|---|---|
| Which customers are likely to churn? | Predictive classification |
| Why are customers leaving? | Explanatory analysis or causal inference |
| Which intervention reduces churn? | Experimentation or causal modeling |
| How many products should be stocked? | Forecasting and optimization |
| Which process factor controls yield? | Interpretable modeling and process analysis |
A common failure occurs when the technical team solves a prediction problem while the business needed an explanation problem.
8.2. Two Modeling Cultures
There are two cultures of statistical modeling: one focused on modeling the data-generating process and another focused on algorithmic prediction9. For the purpose of this chapter, we can describe them as follows:
| Factor | Explanatory Culture | Predictive Culture |
|---|---|---|
| Informal label | “Monks” | “Cowboys” |
| Main goal | Understand mechanism, causation, long-term structure | Maximize predictive performance |
| Typical question | Why does this happen? | What will happen next? |
| Evaluation | Theoretical plausibility, validity, causal identification | Accuracy, error, ranking, calibration |
| Strength | Interpretability and scientific explanation | Practical performance at scale |
| Risk | Overly restrictive assumptions | Black-box decisions without understanding |
If the business asks, “Which customers are most likely to respond to this campaign?” a predictive model may be appropriate. If the business asks, “What caused the decline in customer retention?” prediction along is insufficient. If the business asks, “Which process variable should we adjust to increase chemical yield?” a black-box predictor may not provide actionable knowledge.
8.3. The ROI Imperative
In business settings, data science sometimes connect to return on investment (ROI). ROI may include revenue growth, cost reduction, risk reduction, time savings, improved reliability, customer satisfaction, fairness, regulatory compliance, or scientific insight.
Before a project begins, the route to value should be explicit:
- What decision will change?
- Who will use the result?
- What action will the model support?
- What cost is reduced or value is created?
- What risk does the model introduce?
- How will success be measured?
A model with high predictive accuracy can still fail if it does not support action.
Suppose a company uses a complex neural network to predict chemical yield with excellent accuracy. If the model cannot explain which process variables influence yield, engineers may be unable to improve the process. In that case, predictive performance does not translate into business value.
9. Explainability and the Black Box Problem
Explainability refers to the ability to understand, communicate, or justify how a model produces its outputs. It is important in high-stakes domains such as healthcare, banking, criminal justice, education, and employment.
A black-box model may be acceptable in low-risk settings where errors are minor and reversible, such as recommending a movie. It is more problematic when decisions affect loans, diagnoses, sentencing, hiring, insurance, or public benefits.
Explainability matters for several reasons:
- Debugging: Understanding model behavior helps detect errors.
- Trust: Users are more likely to accept systems they understand.
- Accountability: Institutions must justify decisions.
- Fairness: Explanations help identify discriminatory patterns.
- Scientific learning: Explanatory models can reveal mechanisms.
- Actionability: Decision-makers need to know what can be changed.
However, explainability is not a single property. A model may be mathematically interpretable to a statistician but not understandable to a business manager. A local explanation may describe one prediction without explaining the global model. A simplified explanation may be intuitive but inaccurate.
Thus, the right question is:
Explainable to whom, for what purpose, and at what level of detail?
Context and data understanding form the foundation of responsible data science. A dataset is a structured representation of a situation, produced through social, technical, institutional, and historical processes.
To understand data, one must understand how the data were generated, what they include, what they exclude, what assumptions shape them, and how they will be used. Exploratory analysis, visualization, documentation, and domain knowledge are central to scientific integrity.
We all have argued that context operates at several levels. It gives meaning to variables, shapes data collection, determines the appropriateness of data use, affects model performance over time, and defines ethical responsibility. Context-aware data science therefore requires more than adding contextual features to a model; it requires a disciplined way of thinking about data as situated evidence.
Next chapter: Data Preparation and Model Design
Footnotes
Dourish, Paul. “What We Talk about When We Talk about Context.” Personal and Ubiquitous Computing 8, no. 1 (2004): 19–30. https://doi.org/10.1007/s00779-003-0253-8.↩︎
Gitelman, Lisa, ed. “Raw Data” Is an Oxymoron. The MIT Press, 2013. https://doi.org/10.7551/mitpress/9302.001.0001.↩︎
Boyd, Danah, and Kate Crawford. “CRITICAL QUESTIONS FOR BIG DATA: Provocations for a Cultural, Technological, and Scholarly Phenomenon.” Information, Communication & Society 15, no. 5 (2012): 662–79. https://doi.org/10.1080/1369118X.2012.678878.↩︎
Selten, Reinhard. “Bounded Rationality.” Journal of Institutional and Theoretical Economics (JITE) / Zeitschrift Für Die Gesamte Staatswissenschaft 146, no. 4 (1990): 649–58.↩︎
Endsley, Mica R. “Toward a Theory of Situation Awareness in Dynamic Systems.” Human Factors 37, no. 1 (1995): 32–64. https://doi.org/10.1518/001872095779049543.↩︎
Adomavicius, Gediminas, Bamshad Mobasher, Francesco Ricci, and Alex Tuzhilin. “Context‐Aware Recommender Systems.” AI Magazine 32, no. 3 (2011): 67–80. https://doi.org/10.1609/aimag.v32i3.2364.↩︎
Gama, João, Indrė Žliobaitė, Albert Bifet, Mykola Pechenizkiy, and Abdelhamid Bouchachia. “A Survey on Concept Drift Adaptation.” ACM Comput. Surv. 46, no. 4 (2014): 44:1-44:37. https://doi.org/10.1145/2523813.↩︎
Quiñonero-Candela, Joaquin, ed. Dataset Shift in Machine Learning. Neural Information Processing Series. MIT Press, 2009.↩︎
Breiman, Leo. “Statistical Modeling: The Two Cultures.” Statistical Science 16, no. 3 (2001): 199–215.↩︎