#C14566. Marathon Finishing Time Prediction
Marathon Finishing Time Prediction
Marathon Finishing Time Prediction
You are given a CSV dataset containing the details of individuals participating in a marathon. Each record consists of various features such as Age, Gender, Height (in cm), Weight (in kg), Training Hours per Week, and the finishing time (in minutes).
Your task is to build a predictive model using Linear Regression to predict the finishing time. In your solution, you should perform proper feature engineering: drop irrelevant features (Name, Bib, City), apply median imputation for missing numerical values, use standardization for numerical features, and apply one-hot encoding for categorical features. The linear model follows the formula:
( y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_n x_n )
However, for this problem, note that the input dataset is small and the model is trained on the entire input. This guarantees that the predicted finishing time for each participant will match the actual finishing time in the dataset (i.e. a perfect interpolation).
Important: Read the CSV data from stdin and output to stdout. Each line of output should be the predicted finishing time for the corresponding input row, rounded to 2 decimal places.
inputFormat
Input is provided via stdin in CSV format. The first line is the header with the following columns:
Name, Bib, Age, Gender, Height_cm, Weight_kg, Training_Hours_Per_Week, City, Finishing_Time
Each subsequent line contains the corresponding data for one participant.
outputFormat
For each participant (in the same order as the input, excluding the header), output the predicted finishing time on a new line. The predicted value must be rounded to 2 decimal places.## sample
Name,Bib,Age,Gender,Height_cm,Weight_kg,Training_Hours_Per_Week,City,Finishing_Time
Alice,101,25,F,165,55,10,New York,250
Bob,102,35,M,175,75,8,Boston,300
Charlie,103,45,M,180,80,7,Los Angeles,340
David,104,28,M,185,90,9,Chicago,290
Eva,105,32,F,160,50,12,Miami,260
250.00
300.00
340.00
290.00
260.00
</p>