what it does
SolPredict estimates aqueous solubility from a molecule's chemical structure. Solubility is one of the properties drug discovery screens early: a promising molecule still has to dissolve well enough to be useful. The interface accepts a SMILES string and exposes predictions alongside model comparisons.
This was a way to connect my computer science and chemistry coursework in a complete ML project. I wanted to understand the path from molecular representation to a reproducible experiment, then make the trained models usable through an API and web interface.
my contribution
I developed the feature pipeline, trained and tuned a random forest and a neural network, and connected model artifacts to experiment tracking and serving. The dataset is ESOL, with 1,128 molecules. RDKit converts each structure into a 2,048-bit Morgan fingerprint with radius two, which is the input to both models.
The application uses FastAPI for prediction and a Next.js interface for inference, comparisons, and prediction history. Model versions and hyperparameters are recorded in a SQL registry, while MLflow tracks the training runs and artifacts.
two decisions that mattered
Tune against validation data, then report the holdout. I used a seeded 80/20 random split, keeping 226 molecules for the test set. Hyperparameter search ran 50 Optuna trials per model, using five-fold cross-validation within the training partition and validation RMSE as the objective. The neural network search can prune between folds. It does not tune against the final test results.
Make feature reuse depend on the data and configuration. Fingerprints are cached using a content hash of the dataset and fingerprint settings. That avoids treating a stale feature matrix as a valid input after changing the data or representation. Invalid-molecule filtering keeps the targets aligned with the remaining features. Saved model artifacts, parameters, and version IDs make a prediction easier to trace back to a run.
results and limits
The saved tuned models achieved test R² of 0.78 for the neural network and 0.72 for the random forest, rounded from the recorded results. This is a comparison on a small, seeded random holdout. It is not a scaffold split and does not prove generalization to unfamiliar chemical families.
The live demo and screenshot use an earlier deployed model pair. The tuned-model scores above describe the saved training results, not that deployment.
The serving layer loads its active models at startup. Prediction-history writes are best effort, so the application does not guarantee a persisted record for every prediction. Molecular descriptors shown in the interface are explanatory information, not additional inputs to these fingerprint-based models.
The useful outcome was the whole reproducible path: structure, features, tuning, registered model, and inference, with the evaluation assumptions visible.
