Sports wellness data is used carefully as an educational example.
Full sample college project
College Project: Sports Injury Risk Predictor with Python
View this complete sample to understand how project mentoring works from idea to data, Python code, model logic, evaluation, interpretation, and final presentation.
Clean data, create features, train a model, and explain results.
The project is shaped for code, report, and presentation quality.
The full sample project
A complete educational healthcare analytics sample showing how a learner can build a Python-based sports injury risk predictor using training load, sleep, pain, prior injuries, hydration, stress, and recovery indicators.
Project Scenario
A college learner wants to build a healthcare-sector project that predicts whether an athlete may need closer training-load review. The project uses synthetic sports wellness data and is designed for academic learning only, not medical diagnosis.
Project Objective
Build a Python workflow that cleans athlete wellness data, creates risk features, trains a simple model, evaluates results, and explains practical recommendations responsibly.
Sample Dataset
The public sample uses a small synthetic dataset. In mentoring, learners may adapt the structure to a course-approved dataset, survey dataset, or larger open dataset.
| Athlete ID | Sport | Age | Weekly Hours | Intensity | Sleep Hours | Previous Injuries | Pain Level | Rest Days | Warm Up | Hydration | Stress | Training Increase % | Risk Label |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A001 | Soccer | 19 | 14 | 8 | 6.5 | 1 | 5 | 1 | Yes | 6 | 7 | 22 | High |
| A002 | Tennis | 21 | 8 | 5 | 7.8 | 0 | 2 | 3 | Yes | 8 | 4 | 8 | Low |
| A003 | Basketball | 20 | 16 | 9 | 5.9 | 2 | 6 | 0 | No | 5 | 8 | 28 | High |
| A004 | Running | 22 | 10 | 6 | 7.2 | 0 | 3 | 2 | Yes | 7 | 5 | 12 | Medium |
End-to-End Mentoring Walkthrough
Define the academic problem clearly
- Write the project question: can training and recovery indicators be used to flag athletes who may need closer review?
- Limit the claim to educational risk prediction and avoid medical diagnosis.
- Decide the final deliverables: Python notebook, short report, model evaluation, and presentation.
Guided mentoring helps the learner make the topic realistic, ethical, and appropriate for a college project.
Prepare the dataset
- Check numeric fields such as training hours, intensity, sleep, pain, hydration, stress, and training increase.
- Convert yes/no fields such as warm-up routine into model-ready values.
- Create a data-quality note for missing values, impossible values, and assumptions.
The mentoring focus is on explaining why each cleaning choice matters and how it affects the model.
Engineer simple risk features
- Calculate training load from weekly hours and intensity.
- Calculate sleep deficit from an eight-hour reference.
- Combine recovery indicators such as rest days, pain, hydration, and stress.
Guided review connects each feature to the project logic so the learner can defend the model in presentation.
Train and evaluate the model
- Split data into training and testing sets.
- Train an interpretable classifier such as logistic regression or random forest.
- Evaluate accuracy, confusion matrix, and feature importance without overstating conclusions.
The learner is guided to discuss model limits, class imbalance, sample size, and responsible interpretation.
Prepare the final project story
- Summarize the objective, dataset, method, results, limitations, and next steps.
- Explain which factors contributed most to the prediction.
- Prepare a clear slide or report section that says what the model can and cannot be used for.
The final review helps polish the project so it sounds like careful academic work, not just a code demo.
Feature Engineering
Training Load
weekly_training_hours x training_intensity Captures the combined effect of training volume and intensity.
Sleep Deficit
max(0, 8 - sleep_hours) Flags whether reduced sleep may be part of the recovery picture.
Recovery Pressure
pain_level + stress_level - rest_days Creates a simple indicator for whether recovery signals need attention.
Python Code
This is a compact end-to-end version for public viewing. In mentoring, the same project can be expanded with a larger dataset, stronger validation, plots, a notebook, and a formal report.
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
# ------------------------------------------------------------
# College Project: Sports Injury Risk Predictor
# Educational sample only. This is not a medical diagnosis tool.
# ------------------------------------------------------------
data = [
{
"athlete_id": "A001",
"sport": "Soccer",
"age": 19,
"weekly_training_hours": 14,
"training_intensity": 8,
"sleep_hours": 6.5,
"previous_injuries": 1,
"pain_level": 5,
"rest_days": 1,
"warm_up": "Yes",
"hydration_level": 6,
"stress_level": 7,
"training_increase_percent": 22,
"risk_label": "High",
},
{
"athlete_id": "A002",
"sport": "Tennis",
"age": 21,
"weekly_training_hours": 8,
"training_intensity": 5,
"sleep_hours": 7.8,
"previous_injuries": 0,
"pain_level": 2,
"rest_days": 3,
"warm_up": "Yes",
"hydration_level": 8,
"stress_level": 4,
"training_increase_percent": 8,
"risk_label": "Low",
},
{
"athlete_id": "A003",
"sport": "Basketball",
"age": 20,
"weekly_training_hours": 16,
"training_intensity": 9,
"sleep_hours": 5.9,
"previous_injuries": 2,
"pain_level": 6,
"rest_days": 0,
"warm_up": "No",
"hydration_level": 5,
"stress_level": 8,
"training_increase_percent": 28,
"risk_label": "High",
},
{
"athlete_id": "A004",
"sport": "Running",
"age": 22,
"weekly_training_hours": 10,
"training_intensity": 6,
"sleep_hours": 7.2,
"previous_injuries": 0,
"pain_level": 3,
"rest_days": 2,
"warm_up": "Yes",
"hydration_level": 7,
"stress_level": 5,
"training_increase_percent": 12,
"risk_label": "Medium",
},
{
"athlete_id": "A005",
"sport": "Football",
"age": 23,
"weekly_training_hours": 18,
"training_intensity": 9,
"sleep_hours": 6.1,
"previous_injuries": 2,
"pain_level": 7,
"rest_days": 1,
"warm_up": "No",
"hydration_level": 4,
"stress_level": 8,
"training_increase_percent": 31,
"risk_label": "High",
},
{
"athlete_id": "A006",
"sport": "Swimming",
"age": 18,
"weekly_training_hours": 7,
"training_intensity": 4,
"sleep_hours": 8.0,
"previous_injuries": 0,
"pain_level": 1,
"rest_days": 3,
"warm_up": "Yes",
"hydration_level": 9,
"stress_level": 3,
"training_increase_percent": 5,
"risk_label": "Low",
},
]
df = pd.DataFrame(data)
# Feature engineering: connect raw inputs to project reasoning.
df["training_load"] = df["weekly_training_hours"] * df["training_intensity"]
df["sleep_deficit"] = (8 - df["sleep_hours"]).clip(lower=0)
df["recovery_pressure"] = df["pain_level"] + df["stress_level"] - df["rest_days"]
df["warm_up_encoded"] = df["warm_up"].map({"Yes": 1, "No": 0})
features = [
"age",
"weekly_training_hours",
"training_intensity",
"sleep_hours",
"previous_injuries",
"pain_level",
"rest_days",
"hydration_level",
"stress_level",
"training_increase_percent",
"training_load",
"sleep_deficit",
"recovery_pressure",
"warm_up_encoded",
]
X = df[features]
y = df["risk_label"]
label_encoder = LabelEncoder()
y_encoded = label_encoder.fit_transform(y)
# With a real dataset, keep a larger test set and validate carefully.
X_train, X_test, y_train, y_test = train_test_split(
X,
y_encoded,
test_size=0.33,
random_state=42,
stratify=y_encoded,
)
model = RandomForestClassifier(
n_estimators=100,
random_state=42,
max_depth=3,
)
model.fit(X_train, y_train)
predictions = model.predict(X_test)
print("Accuracy:", round(accuracy_score(y_test, predictions), 2))
print("Confusion Matrix:")
print(confusion_matrix(y_test, predictions))
print("Classification Report:")
print(classification_report(y_test, predictions, target_names=label_encoder.classes_))
importance = pd.DataFrame(
{
"feature": features,
"importance": model.feature_importances_,
}
).sort_values("importance", ascending=False)
print("Top Risk Indicators:")
print(importance.head(6))
new_athlete = pd.DataFrame(
[
{
"age": 20,
"weekly_training_hours": 15,
"training_intensity": 8,
"sleep_hours": 6.3,
"previous_injuries": 1,
"pain_level": 5,
"rest_days": 1,
"hydration_level": 6,
"stress_level": 7,
"training_increase_percent": 24,
"training_load": 15 * 8,
"sleep_deficit": max(0, 8 - 6.3),
"recovery_pressure": 5 + 7 - 1,
"warm_up_encoded": 1,
}
]
)
predicted_class = model.predict(new_athlete)[0]
predicted_label = label_encoder.inverse_transform([predicted_class])[0]
print("Predicted review category for new athlete:", predicted_label) Expected Interpretation
- High training load, high pain level, prior injuries, rapid training increase, and low recovery indicators may contribute to higher predicted review categories.
- The model output should be described as an academic risk flag, not a diagnosis or professional medical recommendation.
- The report should explain why synthetic or limited data cannot prove causation.
Final Report Structure
- Introduction: why athlete wellness and recovery indicators are worth studying.
- Problem statement: classify synthetic athlete records into low, medium, or high review categories.
- Dataset: explain each column, assumptions, and why the data is educational rather than diagnostic.
- Methodology: cleaning, feature engineering, model choice, train-test split, and evaluation metrics.
- Results: accuracy, confusion matrix, important features, and example prediction.
- Limitations: small sample, synthetic labels, no clinical validation, and no use as medical advice.
- Future work: larger dataset, expert review, wearable-device data, and stronger validation.
Mentoring Focus
- Turn a broad healthcare idea into a focused, ethical project question.
- Design the dataset structure and prepare Python cleaning steps.
- Choose interpretable models and evaluation metrics suitable for a college project.
- Explain results responsibly with clear limitations.
- Build a final report and presentation that connect code, reasoning, and conclusions.
What Learners Build
- Python notebook or script
- Synthetic or approved dataset structure
- Data cleaning and feature engineering notes
- Model evaluation output and interpretation
- Final report or presentation outline
What They Learn
- Learners see how a healthcare project is scoped without making unsafe claims.
- They practice Python, pandas, scikit-learn, model evaluation, and communication.
- They understand how mentoring improves the reasoning behind the code.
Next step
Need help shaping an AI, ML or data science project?
Bring the project brief, dataset, research idea, or workplace use case. The mentoring can help structure the work from idea to implementation, interpretation, and presentation.