Did you know? If a customer has not yet cancelled a subscription, a machine-learning dataset does not necessarily know how long that customer will stay. If a machine is still working when a study ends, its eventual failure time is unknown. Treating either record as a permanent non-event or throwing it away distorts the learning problem. Survival models are built to estimate the timing of events when some durations are only partly observed.
The practical answer is to define one event and a clear starting clock, record each observation’s follow-up time and event indicator, build the appropriate risk sets, handle right censoring honestly, and evaluate predictions at meaningful time horizons. A survival curve estimates the chance that the event has not yet happened by time t under stated assumptions. A hazard is a conditional event rate, not a one-period probability, and a model’s risk ranking is not automatically a calibrated prediction.
This article explains Kaplan–Meier estimation, proportional hazards, censored evaluation and competing events through checked original cases. It is an explanatory guide for current machine-learning systems, not individual medical or financial advice and not a claim about artificial superintelligence. The numerical cohorts below are invented teaching examples, not measurements of patients, students, machines or customers.
Contents
- Why time-to-event prediction is different from ordinary classification
- What right censoring actually tells the learner
- Choose a consistent time origin and end point
- Kaplan–Meier estimation works through changing risk sets
- Worked case: ten machines, five failures and three censored observations
- What happens when censoring and events share a timestamp
- Hazard is a conditional instantaneous rate, not a probability
- Worked Cox-model interpretation with a real baseline calculation
- Which AI models can work with survival outcomes?
- Competing risks: when an event of another type prevents your event
- C-index, time-dependent AUC and censored Brier scores
- Prevent leakage across patients, machines and calendar time
- Fairness, decision thresholds and intervention effects
- Nine errors that produce convincing but incorrect survival results
- Transfer problem: customer churn under different follow-up lengths
- Limitations, uncertainty and when to decline a precise estimate
- Frequently asked questions
- Reader pathways and primary documentation
Why time-to-event prediction is different from ordinary classification
Imagine training a binary classifier to predict whether a component fails. If the dataset labels every component that has not failed by the snapshot date as a permanent negative, it confuses ‘not yet observed’ with ‘will not happen’. A component installed yesterday has had much less time to fail than one operating for ten years. The outcome must include exposure time and the fact that future events may remain unobserved.
Survival analysis models when a defined event occurs. Its terminology comes from studies of time until death, but the mathematics also applies to machine reliability, subscription cancellation, job transitions and many other event processes. The event must be specified precisely: a repair is not the same as an initial failure, and ending a subscription is not the same as briefly pausing a payment.
Each record needs an origin time, a follow-up duration and an indicator of whether the target event was actually observed. Features may be measured at the origin or updated later under a carefully defined protocol. If a feature includes information that becomes available only after the prediction date, the model can appear excellent through future-information leakage.
The official scikit-survival introduction frames this as regression-like prediction with partially observed outcomes. The statsmodels duration documentation explains the right-censoring case: an event is known to occur after the observed time, but the exact event time is not known. These definitions are a better starting point than choosing a fashionable model architecture.
This topic has a distinct reader job from ordinary missing-data imputation. A censored duration carries structured information: the subject was observed event-free up to a known time. Replacing it with a guessed complete event time is not an ordinary harmless fill-in operation.
What right censoring actually tells the learner
Suppose an invented machine is installed on day zero and has not failed by day ten, when its monitoring period ends. The observation is not ‘failure time equals ten’. It is ‘the failure time, if failure eventually occurs, exceeds ten under this event definition’. That is right censoring. The machine contributes evidence about survival through day ten, even though its exact eventual failure time is unknown.
Another machine fails on day six. For it, the event time is observed and the event indicator equals one. The first machine has duration ten and event indicator zero; the second has duration six and event indicator one. A common programming representation stores `time` alongside a Boolean event flag. Reversing that Boolean is a catastrophic and surprisingly easy coding mistake.
Right censoring can arise when follow-up ends administratively or an individual is lost to observation. Its validity depends on assumptions about how censoring relates to underlying event risk. If high-risk subjects disproportionately disappear from follow-up in ways the model does not account for, naive survival estimates can be biased. Simply labelling such records censored does not remove the problem.
Left truncation, also called delayed entry, is different. A subject becomes observable only after some elapsed time and joins the risk set later. Interval censoring is different again: the event is known to lie between two observation times. These require methods suited to the sampling design. The statsmodels methods page notes the scope of its right-censoring implementations.
Before training, write down what is known and what is not. A dataset containing an end date, a status and a collection of historical transactions may look comprehensive while hiding a poorly defined observation boundary. The model should never invent post-snapshot events in order to create complete labels.
Choose a consistent time origin and end point
Time zero could be account activation, installation, diagnosis or entry into a defined programme. It cannot quietly switch between customers. If one record measures from initial sign-up while another measures from the first paid invoice, their durations have different meanings even if both are stored as days. The event definition and origin determine the estimand, the target quantity the model attempts to estimate.
Elapsed time must be calculated consistently. Calendar days, working days and hours are not interchangeable. A repair queue can have a duration of two active working hours and five calendar days. Neither measurement is automatically wrong; they answer different questions. Choose the clock that matches the decision and record any pauses or observation gaps.
A subject may enter monitoring after the origin. Such delayed entry changes who is at risk at early time points. Treating a subject as present before it could have been observed creates immortal-time bias or other selection errors. Survival software often supports risk-set entry times, but the exact feature and assumptions must be checked in the chosen implementation.
Event time can be a sequence of repeated episodes. A patient can be rehospitalised more than once, and a machine can fail after multiple repairs. A simple time-to-first-event analysis cannot answer a recurrent-events question without changing the model. Do not stretch the meaning of a one-event model to accommodate repeated outcomes merely because the software accepts the table.
A useful data dictionary therefore states the origin, unit, event, censoring reason, entry rule, observation cutoff, allowed covariates and intended decision horizon. Without that dictionary a high C-index can coexist with the wrong business interpretation of time.
Kaplan–Meier estimation works through changing risk sets
The Kaplan–Meier estimator constructs a survival curve from observed event times and the number of subjects still at risk immediately before each event. At event time t_j, let n_j be the number at risk just before that time and d_j the number of observed target events then. The estimated survival through that event time multiplies the previous survival by (1 − d_j/n_j).
A censored subject contributes to the risk set while it is observed, then leaves after its censoring time. Its exit does not create the immediate downward survival step that an event does. This is how censored records can supply partial follow-up information without being treated as either permanent successes or observed failures.
The method rests on assumptions about censoring and representative risk sets. A Kaplan–Meier curve is an estimate for a specified population and follow-up regime, not a universal individual forecast. It is also step-shaped because events occur at observed times rather than at every imaginable instant.
Official APIs such as scikit-survival’s kaplan_meier_estimator and statsmodels SurvfuncRight implement this general nonparametric logic. Their arguments include the event indicator and observed time, so a developer should confirm field order and data type before fitting a curve.
The arithmetic becomes especially instructive when censoring happens between events. A simplistic calculation of ‘survivors divided by initial records’ will not reproduce the changing risk-set estimator. That difference is the entire point of respecting partial observations.
Worked case: ten machines, five failures and three censored observations
Consider ten fictional machines observed from installation. At day two, two machines fail. Immediately before day two all ten are at risk, so n=10 and d=2. Survival steps to 1 × (1−2/10) = 0.80. Eight machines remain at risk after these observed failures.
At day three, one of those eight is censored because monitoring ends. No target failure occurs at that moment, so the survival estimate remains 0.80. But the risk set for subsequent event times decreases from eight to seven. At day five, one of seven at-risk machines fails, so survival becomes 0.80 × (1−1/7) = 0.80 × 6/7 ≈ 0.685714.
At day seven, two more machines are censored. After the day-five failure six were at risk, and after those two censors four remain. At day eight, two of the four remaining machines fail. The survival curve steps to (0.80 × 6/7) × (1−2/4) = (0.80 × 6/7) × 0.50 ≈ 0.342857.
The estimated event probability by day eight under this Kaplan–Meier setup is 1−0.342857 ≈ 0.657143, or 65.71%. This estimate is not equal to the fraction of observed failures among all original machines. Exactly five failures were observed: two at day two, one at day five and two at day eight, giving 5/10 = 50% of the initial cohort. Three machines were censored and two remained under observation beyond day eight.
These numbers are not contradictory. Fifty percent is the raw proportion with an observed event in the constructed record, while 65.71% is the estimated cumulative event probability by day eight after accounting for how the risk set changed under censoring assumptions. Treating all censored machines as permanent non-events would use information the study does not have.
Check the accounting: two day-two failures plus one day-five failure plus two day-eight failures equals five events; one day-three censor plus two day-seven censors equals three censors; two still followed beyond day eight complete the ten original records. This explicit denominator check helps catch accidental double counting.
The tiny invented sample is deliberately simple. Its curve would have considerable statistical uncertainty and might change substantially with one additional event. No engineering or medical decision should use the displayed percentage without a representative dataset, suitable confidence intervals and review of the censoring mechanism.
What happens when censoring and events share a timestamp
Real records often contain tied event and censoring times because measurements are rounded to whole days or weeks. The risk-set convention at a tied timestamp must be well defined. In a standard right-censored Kaplan–Meier calculation, subjects censored at time t are included in the risk set immediately before events at that time, with the event count applied before removing censors for later times.
Different software settings, data resolutions and event definitions can complicate ties. A log saying a component failed on the same day that monitoring ended may conceal the true order of events. If the order matters, improve the time stamps or define an explicit adjudication rule. Do not silently pick whichever ordering generates a more attractive curve.
Grouped events must use the number of subjects at risk at that event time, not reuse the initial denominator. If two events occur among four machines still at risk, the factor is 1−2/4 = 0.5. Two events among the original ten would have factor 0.8, which is the wrong denominator at day eight in the worked case.
Censoring itself need not create a downward step. If a plotting library shows a fall every time monitoring ends without an event, inspect whether the event flag was reversed or the wrong curve was plotted. This is a specific diagnostic that students can verify from a tiny hand-calculated record before trusting a large model output.
When there are no subjects left at risk, the data no longer identify later survival probabilities without additional assumptions. A plot extended far beyond observed support is especially easy to misuse. Report the time horizon and the number at risk rather than presenting an infinitely reliable line.
Hazard is a conditional instantaneous rate, not a probability
The survival function S(t) describes the chance the target event has not occurred by time t. A hazard describes the event rate around time t conditional on having remained event-free up to that time, under a continuous-time model. The units of hazard are inverse time. A hazard of 0.2 per year is not simply the statement that an individual has a 20% chance of failure in every year.
A cumulative hazard collects hazard over time. In common continuous-event models, S(t)=exp(−H(t)), where H(t) is cumulative hazard. This relationship helps transform between model outputs, but only under appropriate definitions and assumptions. Probabilities over a finite interval require integration or a model of how the hazard behaves during that interval.
Consider a fictional constant hazard of 0.2 per year. Over one year the survival probability is exp(−0.2) ≈ 0.818731 and event probability is 1−exp(−0.2) ≈ 0.181269, or 18.13%. It is not 20%. The numerical difference becomes more significant for larger rates or longer intervals.
Hazard ratios compare conditional rates under model assumptions. If group B has hazard 1.5 times that of group A at a particular time, that does not imply group B’s absolute event probability is 1.5 times group A’s probability at a given horizon. To calculate an absolute risk, the model needs an appropriate baseline and time horizon.
This distinction matters when an agent summarises a model for a human decision. Turning a hazard ratio into a literal percentage risk without a baseline would fabricate precision. The statsmodels PHReg documentation describes a proportional hazards regression interface, not a license to read coefficients as unconditional event probabilities.
Worked Cox-model interpretation with a real baseline calculation
In a proportional hazards model, the hazard for covariates x is often expressed as h(t|x)=h0(t) exp(βᵀx). The baseline h0(t) varies with time while exp(βᵀx) acts as a multiplicative factor under the proportional-hazards assumption. The fitted coefficient is on a log-hazard-ratio scale, so taking its exponential gives the associated hazard ratio for a specified covariate change.
Suppose an invented baseline group has survival probability 0.80 at one chosen horizon and another group has a hazard ratio of exactly 1.5 relative to baseline. Under proportional hazards, the second group’s survival at that horizon is S0(t)^1.5 = 0.80^1.5 ≈ 0.715542. Its estimated event probability is therefore 1−0.715542 ≈ 0.284458, or 28.45%.
The baseline group’s event probability was 1−0.80=0.20, or 20%. Multiplying 20% by 1.5 would give 30%, not 28.45%. That simple multiplication is incorrect because proportional hazards scales the hazard, not the final cumulative event probability linearly. The difference is exactly why the model’s link function matters.
The scenario uses a hypothetical proportional hazards relationship. Real data may violate proportionality: two survival curves can cross, a treatment effect may weaken over time, or a machine’s component risk may increase after a certain age. Diagnostic checks should examine whether hazard ratios are roughly stable over the decision horizon before treating one number as durable.
A Cox risk score by itself may rank subjects without supplying an absolute survival curve at the requested time. The baseline survival estimate, model fitting details and follow-up support are needed for a full probability statement. Never turn a ranking into an unsupported probability because the receiving application expects a percentage.
Which AI models can work with survival outcomes?
Kaplan–Meier is a useful baseline when the immediate question is estimating a population survival function, perhaps by clearly defined groups. It is not a flexible feature-rich machine-learning predictor by itself. Cox proportional hazards models add covariates under a multiplicative hazard assumption and offer interpretable relative effects when the assumptions hold.
Random survival forests and survival-oriented gradient boosting can model nonlinear relationships and interactions, depending on their objective and implementation. Neural survival models can parameterise hazards, discrete time bins or survival functions. There are also accelerated failure-time models that describe how covariates stretch or shrink event-time distributions. These approaches answer different modelling and interpretation needs.
The official scikit-survival user guide discusses Kaplan–Meier, Cox models and evaluation, with linked tutorials for trees and other learners. The statsmodels documentation provides statistical implementations including proportional hazards regression. Neither package makes the observational design assumptions disappear.
A data-rich neural architecture is not inherently the right choice for a small censored dataset. Flexible models can overfit, especially with relatively few observed events. Compare against simple baselines, check the number of effective events, and evaluate performance on independent subjects and time horizons. For many operational tasks, clarity about censoring and event definition matters more than a model’s parameter count.
Time-varying covariates need special care. Updating a feature using future events or treating post-event observations as if they were available at baseline leaks target information. Models that support dynamic histories still require explicit time alignment and a legitimate prediction timestamp.
Competing risks: when an event of another type prevents your event
A machine might be permanently retired before it fails. A customer might move to an unrelated product before a cancellation outcome can occur. A patient may experience a different event that prevents the target event. In these settings, treating the other event as ordinary independent right censoring can produce a misleading absolute cumulative incidence for the target.
Competing-risks analysis distinguishes the event types. The probability of experiencing cause A by a time horizon depends on the hazards of cause A and competing causes. A cause-specific hazard is not itself the marginal probability of cause A. A cumulative incidence function is often the better target when the decision concerns the observed proportion of a particular event in the presence of alternatives.
The official scikit-survival competing-risks tutorial discusses this distinction, while statsmodels documents cumulative incidence estimates. Inspect whether the chosen model and software actually implement the estimand the user needs.
Imagine a component monitored for either mechanical failure or planned retirement. If half the components retire before they would otherwise fail, a naive calculation that treats retirements as unrelated losses could extrapolate a hypothetical world without retirement. That may be useful for some causal question, but it is not the observed probability that a component will fail before being retired under current policy.
Name the decision before choosing the estimator. Do you need the underlying failure mechanism under removal of competing interventions, or the probability of experiencing the failure in the world where those interventions occur? Those are different questions and can imply different maintenance decisions.
C-index, time-dependent AUC and censored Brier scores
A survival model can rank risks without producing well-calibrated absolute survival probabilities. Harrell’s concordance index, or C-index, examines ordering among comparable pairs. A comparable pair typically requires that the earlier observed time correspond to an event, so not every pair of censored records supplies a valid comparison.
In an invented evaluation set, suppose twenty pairs qualify for comparison and the model orders fourteen correctly, with no ties under the chosen convention. The estimated concordance on those comparable pairs is 14/20 = 0.70. Calling it seventy percent classification accuracy would be misleading. It measures pairwise risk ordering among the defined comparable pairs, not how often the model guessed an individual event/no-event label correctly.
The scikit-survival evaluation guide notes that Harrell’s C-index can be optimistic with heavier censoring and describes inverse-probability-of-censoring weighted alternatives. It also describes cumulative or dynamic time-dependent AUC and the Brier score adapted for censored observations.
The Brier score addresses squared prediction error for survival probabilities at particular times, with censoring adjustments. An integrated Brier score summarises performance across a specified time interval. Its value depends on the evaluation horizon and weighting; two models evaluated over different time windows cannot be compared as if their integrated scores had identical meaning.
Calibration should be checked by time horizon and relevant population. If a model assigns 80% one-year survival, outcomes among comparable subjects with appropriate censoring adjustment should align with that forecast within sampling uncertainty. Good ranking does not guarantee this alignment; a model can sort patients accurately while assigning probabilities that are all too pessimistic.
Never silently treat censored records as known survival through the whole evaluation horizon. Apply an estimator appropriate to the censoring design and report limits of support. If very few subjects remain under observation at late times, extreme late-horizon scores may be unstable or undefined.
Prevent leakage across patients, machines and calendar time
Time-to-event datasets often contain repeated records for one subject. If a machine appears in both training and test data under different operating days, the model may recognise its identity or future history rather than learn transferable failure risk. Split at the entity level where independence requires it, and take special care when evaluating future deployments on later time periods.
Features should be frozen as of the prediction timestamp. A customer’s ‘total lifetime spend’ calculated after churn is not a valid day-zero predictor. A patient measurement taken after the event cannot be a legitimate baseline input. For dynamic models, each prediction at time t may use only history observed up to t under the declared data availability rules.
Right censoring complicates label creation around calendar cutoff dates. A model trained on customers enrolled near the end of the study has shorter possible follow-up than older customers. That difference can correlate with marketing campaigns or product versions. Design the train-test split and evaluation horizon so the resulting comparison answers the prospective deployment question.
The specialist data leakage and grouped splitting guide explains leakage more broadly. For survival prediction, event-time origins, censoring dates and delayed labels make it especially important to record when each feature was actually available.
A good test set should represent the subjects, time horizons and censoring process for the proposed use, not merely have a large row count. Count independently sampled entities and observed events. Repeated follow-up measurements cannot be treated as completely independent evidence of generalisation.
Fairness, decision thresholds and intervention effects
A survival score can drive decisions about maintenance, retention outreach or clinical review. These interventions may change the event process, so a model trained under the old policy may become miscalibrated once the policy changes. An observed association between a feature and time-to-event is not automatically a causal effect of changing that feature.
Subgroup evaluation matters. Two groups may have different follow-up opportunities, censoring patterns or access to preventative action. If one group is more often lost to monitoring, unadjusted event rates can look deceptively low. Check event counts, follow-up support and the plausible censoring mechanism separately by relevant group, without claiming that a single aggregate score proves fairness.
Decisions also need horizon-specific costs. A forecast that a component will fail sometime within five years may not justify immediate replacement if the replacement cost is high and short-term risk is low. Conversely, a low overall hazard ratio can obscure a dangerous short time interval. Match the prediction horizon to the operational consequence.
Human review and abstention may be appropriate when follow-up support is sparse or a case lies outside the model’s training distribution. A model cannot make an unobserved event known by expressing a precise decimal probability. Document the limitations of evidence and provide an escalation route.
For medical contexts, this article is methodological only. Diagnosis, treatment and patient management require qualified clinicians, validated clinical evidence and appropriate regulatory and ethical controls. A worked probability example here is not a clinical prediction or treatment recommendation.
Nine errors that produce convincing but incorrect survival results
Failure one is reversing the event indicator, so censored records are counted as failures. Repair it with tiny hand-labelled examples and check the software’s Boolean convention. Failure two is replacing a censored duration with its observed follow-up time as if the event occurred then. Repair it with a two-column time/status representation and a censoring-aware estimator.
Failure three is treating censored subjects as permanent negatives. That silently gives newer subjects an unfair advantage in a classifier. Failure four is using a fixed starting denominator after censoring. Kaplan–Meier requires the current risk set immediately before each event.
Failure five is interpreting hazard as a finite-time probability. The correct event probability needs the relevant cumulative hazard or survival function. Failure six is treating a relative hazard ratio as an absolute risk multiplier. Our 0.80 baseline example showed why the difference matters.
Failure seven is ignoring competing events. Another event may prevent the target event and make a simple censoring assumption unrealistic. Failure eight is using a very late prediction horizon with almost nobody still followed, then reporting confident percentages unsupported by the data.
Failure nine is leakage through future features, entity duplicates or decisions already influenced by the outcome. A model can appear to rank accurately while answering a prediction question no real user could ask at the recorded moment.
These errors are distinguishable with a data dictionary, hand calculation, explicit horizon, held-out temporal or entity split, and audit of information availability. A reliable repair starts with the first violated assumption, not merely with increasing model complexity.
Transfer problem: customer churn under different follow-up lengths
Now transfer the method from machines to an invented subscription service. Ten customers start the same product on day zero. Three cancel by day twenty, two are still active at day thirty when they are lost to follow-up, and five remain active under observation to day sixty. If there are no additional events, a naive ‘three churned, seven did not’ binary label might sound like a thirty percent churn probability over all future time.
The observation supports a narrower statement: three observed cancellations in ten customers by day sixty, with two customers censored earlier and five still active through day sixty. To estimate a proper time-to-churn curve we need the exact event times and censoring times, not just these aggregates. A nonparametric survival calculation cannot reconstruct risk sets from vague bucket counts without further assumptions.
Suppose instead that all three observed cancellations occurred exactly at day twenty while all ten were at risk. Kaplan–Meier survival then falls to (1−3/10)=0.70. The two censors at day thirty reduce the subsequent risk set from seven to five without a survival step. With no further observed cancellations before day sixty, the curve remains at 0.70 through that horizon, subject to the limitations of a small sample and the censoring assumption.
Now change one condition: a second type of event permanently moves a customer to a sister service and makes cancellation of the original product impossible under the chosen definition. Treating that migration as ordinary censoring could distort the observed cumulative incidence of cancellation. The reader should identify the new event type and decide whether competing-risk estimation or a broader outcome definition better matches the business question.
The transferable principle is to write the event, origin, censoring and competing outcomes before fitting a model. Only then choose survival estimation, risk ranking and a decision horizon. Changing the business question changes the statistical estimand, even when the table still contains a time and a status column.
Limitations, uncertainty and when to decline a precise estimate
Survival models rely on data collection and modelling assumptions. Non-informative censoring or a suitable conditional censoring assumption can be implausible when participants leave follow-up for reasons connected to their risk. Small samples have high uncertainty. Covariate relationships, hazards and baseline survival may change over time.
Kaplan–Meier curves cannot reliably answer a question far beyond the supported follow-up range. Cox proportional hazards requires care when hazards are non-proportional. Flexible machine-learning methods can reduce some functional assumptions but introduce overfitting and interpretability risks. None eliminates the need for the correct event definition.
An estimated survival function is a statement about a modelled population conditional on its features and assumptions. It is not a deterministic timetable for an individual. A confidence interval about a curve describes sampling uncertainty under a model, not every source of uncertainty or model misspecification.
Observed associations may reflect interventions, selection or confounding. Predicting time to a medical event or customer cancellation is not the same as knowing what will happen after a proposed treatment, maintenance action or retention offer. Causal questions need explicit intervention-aware designs.
All numbers in this guide are pedagogical and recomputable. They are not empirical validation of a product. Responsible communication should keep the illustrative arithmetic, documented estimator properties and actual external evidence visibly separate.
Frequently asked questions
What is survival analysis in machine learning? It models time until a specified event while accounting for observations whose exact event time is unknown. Such observations can be right censored rather than labelled permanently event-free.
Is a censored record a failed data row? No. It contributes information that the subject remained event-free up to a known follow-up time, under the defined observation and censoring rules.
What is the Kaplan–Meier estimator? It multiplies conditional survival factors at observed event times using the number still at risk immediately before each event.
Why not just predict a yes/no event? Because subjects can have different follow-up lengths and future events may not yet be observed. A binary snapshot may mistake shorter observation for lower risk.
What does a hazard ratio of 1.5 mean? Under the chosen hazard model it compares conditional event rates. It is not the same as multiplying a finite-horizon event probability by 1.5.
Is a C-index of 0.70 the same as seventy percent accuracy? No. It describes the ordering of predicted risk among comparable pairs under a specific estimator and censoring convention.
Can survival models handle competing events? Yes, with suitable cause-specific or cumulative-incidence methods. Treating an event that prevents the target as ordinary censoring can give the wrong absolute risk question.
Should we fill in censored times with an average? Not as a generic shortcut. That invents exact event times. Use an estimator and design appropriate to the censoring structure, with explicit assumptions.
How can a parent use this concept? It offers a general lesson about partial observations: not seeing an outcome yet is different from knowing it will never happen. For any real educational prediction, however, use evidence appropriate to students rather than borrowing an engineering risk estimate.
Reader pathways and primary documentation
If you are a student, reproduce the ten-machine Kaplan–Meier example step by step. Keep a row showing how many are at risk, how many fail, how many are censored and the resulting survival factor. Then change the order of one censoring event and recompute. Explaining why the denominator changes matters more than memorising a formula.
If you are an engineer, define the event, origin, censoring rule and prediction timestamp before choosing an algorithm. Train-test split by subject and time as appropriate, compare Kaplan–Meier and Cox baselines with flexible methods, and evaluate at supported horizons. Use the conformal prediction guide for a different uncertainty framework, without assuming its usual exchangeability conditions automatically hold for censored time-to-event data.
If you audit a product, ask how the dataset handles subjects whose event has not been observed, whether the model’s score is a hazard ratio, ranking or absolute survival curve, and how later outcomes change when the system intervenes. An exact decimal without these answers can be less useful than a careful uncertainty statement.
Primary official sources: scikit-survival introduction and censored-data explanation; Kaplan–Meier API; evaluating survival models; statsmodels survival and duration analysis; and proportional hazards regression reference.
Continue through How AI Works for the broader data-to-model framework and the education-to-life transfer standard for applying careful reasoning to new contexts.