Molecular rendering (Unsplash @dkoi)

Data Portfolio

This portfolio is intended to demonstrate skills across a variety of data science and machine learning techniques using Python. Each project is based around a toy problem that uses major techniques from modern data science and machine learning. Often, these have also been chosen to be relevant to chemical research. As I only have access to a limited amount of computing power, the projects are intended to demonstrate proficiency with a given tool, rather than publication quality results.

1 | Statistical Inference

Good decisions depend on knowing how much to trust your data. This section covers projects that use statistical methods to test ideas, compare outcomes and draw robust conclusions from the available evidence.

1a | Multivariate Analysis of Variance (MANOVA)

Aim: This project applies multivariate analysis of variance (MANOVA) to a set of data for binder jetting, assessing the influences of the independent variables on a pair of dependant variables.

Workflow: MANOVA is run iteratively to exclude any features or interactions that don't have a significant impact on the outcome. The regression is then assessed using statistical tests (such as Q-Q plots) and notable interactions visualised.

Outcome: Significant features and interactions are identified for each of the dependent variables, allowing for better informed decisions to be made in future experiments.

2 | Deep Learning

Neural networks are powerful tools for learning patterns from complex data, but they require careful thought during construction, training, and evaluation. The projects here explore a range of modern architectures and approaches, from building models from scratch to adapting existing ones for new tasks.

Imaage showing the difference between true and predicted values for the test dataset

2a | Predictive Neural Networks for Chemistry

Aim: This project uses a dataset of calculated log(P) values for a variety of organic molecules to predict solubility from molecular structure using a long short-term memory recurrent neural network (LSTM RNN).

Workflow: SMILES strings are tokenised, trimmed, and padded, before being used to train the model. Bayesian optimisation is used to optimise the hyperparameters in order to achieve the best balance between the mean square error of the training and test datasets.

Outcome: The model achieves reasonable accuracy, but tends toward larger errors when less common structural features are present (e.g. for hypervalent iodine compounds or some atypical phosphorous-containing species, such as deprotonated alkylphosphanes).

Four AI-generated images of birds

2b | Generative AI for Image Creation

Aim: This project uses a Generative Adversarial Network (GAN) to generate images of birds.

Workflow: A dataset of over 9,000 bird images is first created by standardising the size and resolution and converting to greyscale. This is then used to train two networks - an image generator and a real/fake image discriminator - in tandem. The generator takes noise as an input and attempts to trick the discriminator as the latter tries to determine whether images are from the original dataset (real) or generated (fake).

Outcome: While the generator is unable to create images that are truly lifelike, it is able to produce images that are clearly attempting to mimic birds with around 300-400 training epochs. This could potentially be further optimised with additional computing power, but is a solid proof of concept for my purposes.

2c | Fine-Tuning a Large Language Model

Aim: This project fine-tuned a local version of the TinyLlama LLM on a database of speech from Elmo, the Sesame Street character.

Workflow: LLMs are commonly criticised for their stylised and slightly unnatural voice, fine-tuning can be used to alter this. Parameter-efficient fine tuning was used (where a small number of model parameters are tuned, rather than all parameters), to reduce the computational cost.

Outcome: The tuned model (TinyElmo) was able to give responses mimicking Elmo’s idiosyncratic speech when prompted directly to speak in his voice, while an untuned model gave responses that were indecipherable from its usual voice with the same direct prompt.

Links will be updated soon!

3 | Chemical Simulations

Computational chemistry offers a way to explore materials and molecules at a level of detail experiments can't always reach. The work here applies simulation to predict structure and properties using Quantum Espresso.

3a | Geometry Optimisation for Periodic Crystals

This project aims to optimise the structures of periodic inorganic crystals in Quantum ESPRESSO, covering a variety of major structure types. The process is shown in detail for rutile (tetragonal TiO2), with further examples following the same workflow included. The structure and choice of parameters for the self-consistent field calculation input file is discussed. Where necessary, these parameters are then optimised and a variable cell relaxation calculation performed to provide the optimised cell coordinates.

3b | Density of States

This project aims to calculate the band structure and density of states for periodic inorganic crystals in Quantum ESPRESSO, covering a variety of major structure types. The process is shown in detail for rutile (tetragonal TiO2), with further examples following the same workflow included. The workflow described involves running non-self-consistent field calculations along defined paths through the crystal or over a uniform k-grid to afford the band structure or density of states.