API contract
The endpoint accepts `Age`, `Fare`, `SibSp`, `Parch`, `Pclass`, `Embarked`, and `Sex` validates allowed categorical values, converts numeric fields, and builds a single-row pandas DataFrame for inference.
Technical summary
This page wraps the Django deployment of my Titanic survival Kolmogorov-Arnold Network model.
The model was trained on the Titanic dataset using an 80/20 train-validation split, `StandardScaler`, and an `efficient_kan`. Training tracked both train and validation loss, accuracy, macro F1, precision, recall, and AUC in MLflow, while the deployed page serves the serialized model and scaler for inference.
Serving pipeline
API contract
The endpoint accepts `Age`, `Fare`, `SibSp`, `Parch`, `Pclass`, `Embarked`, and `Sex` validates allowed categorical values, converts numeric fields, and builds a single-row pandas DataFrame for inference.
Feature transformation
`Sex` is treated as binary feature. `Embarked` is one-hot encoded into `Embarked_C`, `Embarked_Q`, and `Embarked_S`. The resulting features are ordered for further processing.
Inference output
The 9-feature vector is cast to `float32`, transformed with the saved `StandardScaler`, passed to the trained PyTorch-based KAN model on CPU, and converted from logits to a survival probability with `torch.softmax`. The JSON response returns `Predicted` plus `Survival probability`.
Prediction form