How gabriellazovsky/prac3ia works
Purpose and execution model
This is a notebook-centric machine-learning project for predicting molecular Collision Cross Section (CCS) from precomputed molecular descriptors, structural fingerprints, and categorical features. The primary execution entry point is P3IA.ipynb, intended for interactive execution, including Google Colab.
Dataset boundary
CSV files provide the complete interface between the model workflow and molecular data:
• Training features plus CCS target: data/public_train.csv
• Prediction-only test features: data/public_test.csv
• Additional train/test variants: data/public_train2.csv, data/public_test2.csv
The notebook must align training and test feature schemas while keeping the target column isolated from model inputs.
Preprocessing and feature selection
P3IA.ipynb performs preparation of tabular molecular features before fitting. The documented approach includes handling descriptor, fingerprint, and categorical inputs, followed by feature selection with LassoCV. This stage defines the feature space consumed by all candidate regressors and must apply equivalent transformations to held-out and test data.
Model-training and selection loop
The central modeling stage in P3IA.ipynb compares regression approaches for CCS prediction:
• RandomForestRegressor
• LightGBM
Hyperparameters are explored through GridSearchCV and RandomizedSearchCV. Training is separated from validation/error estimation so model variants can be compared before final prediction generation.
Evaluation and analysis
Validation quality is measured with Median Absolute Error (MEDAE), chosen for robustness to outliers. The notebook also contains result-analysis stages: predicted-versus-actual comparisons, residual/error analysis, prediction distributions, and feature importance. These analyses guide selection of the final estimator rather than serving as a deployed monitoring system.
Prediction output contract
After selecting or fitting the final model, P3IA.ipynb runs inference over the public test feature set and exports predictions. test_preds.csv is the repository’s material output artifact and downstream submission/consumption boundary.
Runtime and dependencies
The workflow runs in a Python notebook environment, explicitly supporting Google Colab for collaborative and compute-backed experimentation. Core ML infrastructure is scikit-learn-style model selection and regression, with LightGBM as an external gradient-boosting dependency; the README recommends installation through Conda Forge. No application server, API, database, or production deployment runtime is present.
Main entry points: P3IA.ipynb Schema alignment & target split · public_train.csv Training data + CCS · public_test.csv Public test features · public_train2.csv Additional data variants
Components 16
Dataset boundary
CSV files are the interface to molecular data.
- Training data + CCS · Features and target for fitting and validation.
data/public_train.csv - Public test features · Prediction-only molecular features.
data/public_test.csv - Additional data variants
data/public_train2.csv
Notebook ML workflow
Interactive Python and Colab execution in P3IA.ipynb.
- P3IA notebook · Primary interactive execution entry point.
P3IA.ipynb - Schema alignment & target split · Aligns train/test features while isolating CCS.
P3IA.ipynb - Feature preprocessing · Processes descriptors, fingerprints, and categorical inputs.
P3IA.ipynb - LassoCV selection · Defines the shared regressor feature space.
P3IA.ipynb - Validation split · Separates error estimation from final inference.
P3IA.ipynb - Model search · GridSearchCV and RandomizedSearchCV tune candidate regressors.
P3IA.ipynb - Random forest
P3IA.ipynb - LightGBM · External gradient-boosting dependency.
P3IA.ipynb - MEDAE evaluation · Median Absolute Error compares validation quality.
P3IA.ipynb - Result analysis · Examines predictions, residuals, distributions, and feature importance.
P3IA.ipynb - Selected final model
P3IA.ipynb - Test inference
P3IA.ipynb
Prediction artifact
- Test predictions · Submission and downstream consumption boundary.
test_preds.csv
Connections 17
- Training data + CCS → Schema alignment & target split: load
- Public test features → Schema alignment & target split: load
- Additional data variants → Schema alignment & target split: alternate train set
- Schema alignment & target split → Feature preprocessing: aligned features
- Schema alignment & target split → Validation split: features + CCS
- Feature preprocessing → LassoCV selection: prepared features
- LassoCV selection → Validation split: selected features
- Validation split → Model search: train/validation folds
- Random forest → Model search: candidate
- LightGBM → Model search: candidate
- Model search → MEDAE evaluation: validation predictions
- MEDAE evaluation → Result analysis: compare variants
- Result analysis → Selected final model: select estimator
- Feature preprocessing → Test inference: transform test features
- LassoCV selection → Test inference: select test columns
- Selected final model → Test inference: predict CCS
- Test inference → Test predictions: export