
Explore machine learning for chemistry by building models on real datasets, predicting properties like solubility and boiling point, and transforming raw data into research insights through supervised and unsupervised learning.
Define machine learning and its terminology, and explain how algorithms learn from data to make predictions. Compare supervised and unsupervised learning, and introduce training, testing, classification, and regression.
Explore core features of machine learning, including learning from data, pattern detection, supervised and unsupervised learning, and predictive modeling, and learn how targets and features guide training and evaluation.
Explore supervised and unsupervised learning with regression, classification, dimensionality reduction, and clustering, plus reinforcement learning concepts and chemistry examples.
Explore linear, polynomial, support vector, and random forest regression in supervised learning, and see how they model relationships between features and targets, handle non-linearities, and predict molecular properties.
Explore linear regression using scikit-learn to predict boiling points of alcohols from features like molecular weight, aliphatic or cyclic structure, and substituent positions.
Learn to build a linear regression model where the target is a combination of features x0, x1, and x2 with weights w0 and w1, trained and evaluated with sklearn's linear_model.
Train a model to predict boiling points of alcohols using supervised learning. Split data into train and test sets and use features like molecular weight, carbons, unsaturation, and aliphatic status.
Learn how to place a dataset file in Google Drive, locate it in My Drive, and call it in Python using an alcohol bp csv file.
Set up Google Colab to access resources without using your computer. Open Colab from Google, click plus code, and start coding.
Mount Google Drive in Colab by importing the drive library and calling drive.mount(), then navigate to content/drive to access your files, with permission prompts and a mounted path at /content/drive.
Import pandas as pd, read alcohol_bp.csv with read_csv, and use head to inspect the first five rows showing boiling point, molecular weight, carbons, and cyclic.
Explore data preprocessing for chemists' machine learning, including scaling with a standard scaler to 0–1, encoding categorical features (one-hot, label), and missing data imputation strategies.
Load the dataset and plot boiling point against molecular weight to explore correlations, then drop rows with missing values in place or fill them with an arbitrary number.
Explore feature engineering to boost model predictive power by crafting features like molecular weight, carbon count, aromaticity, and interactions, plus dimensionality reduction with PCA.
Explore feature selection in supervised learning by applying embedded methods, notably lasso and ridge penalties, to shrink coefficients and reduce overfitting while improving model performance.
Plot boiling point against molecular weight and other features using matplotlib, with scatter plots and labeled axes; compare carbons and degree of unsaturation to assess relationships for machine learning.
Import libraries for supervised learning with scikit-learn; apply train-test split. Build linear regression model to predict boiling point using molecular weight and carbon count; evaluate with mean squared error.
Define x with molecular weight, number of carbons, degree, aliphatic, and cyclic features, and y as boiling point; apply machine learning with a train-test split and verify code readiness.
Split data into training and testing sets with train test split, use a linear regression model, and evaluate predictions with mean squared error and r2 score, using 20% test data.
Compare essential model evaluation metrics like accuracy, precision, recall, and F1 score. Understand R-squared, mean absolute error, and mean squared error to gauge predictive performance in chemistry-focused machine learning.
Evaluate the linear regression model's performance by printing mean squared error and r squared, then plot actual versus predicted boiling points to compare with molecular weight.
Analyze how test size affects model performance by comparing train-test splits and noting how R-squared and mean squared error respond, with a 90/10 split performing best.
This lecture demonstrates predicting boiling points with a linear regression model, evaluates performance using r-squared and mean squared error, and explains plotting predicted versus actual values with a slope line.
Plot a residual plot by showing the difference between y test and y prediction, i.e., the residual, with a zero line to visualize prediction errors for the actual boiling point.
Predict the boiling point of an unknown alcohol by inputting features such as molecular weight and degree of unsaturation into a pandas data frame, then predict with a model.
Apply ridge regression with standard scalar to boiling point data, tune alpha using cross-validated RMSE, compare results to linear regression, and discuss coefficient shrinkage and alternatives.
Use a robust scalar in ridge modeling and plot RMSE versus alpha. r squared stays around 0.97, MSE about 57.82, and the best alpha is 1e-3 for boiling point predictions.
Learn how outliers distort model training and how trimming and feature transformation mitigate their impact, with removal often being the most effective way to improve predictions.
Compare lasso versus ridge and simple linear regression for boiling points of alcohols; no improvement in mean squared error or r-squared, indicating linear regression suffices here.
Explore model evaluation in supervised learning through cross-validation, particularly k-fold, shuffling data before splitting, to prevent overfitting and train on k-1 folds while testing on the remaining fold.
Explore how k-fold cross validation rotates training and testing folds to improve evaluation, using shuffle split and comparing r-squared and mean squared error in a lasso model with alpha tuning.
Explain how scaling affects feature coefficients in linear models, showing how robust, minmax, and standard scalers alter coef values and highlight molecular weight and carbon as key predictors.
Install the RDKit library in Google Colab to enable solubility prediction from SMILES using a random forest, and follow the pip installation steps.
Import and configure essential libraries for chemoinformatics and machine learning, including rdkit, descriptors, pandas, numpy, matplotlib, seaborn, and grid search with RandomForestRegressor and evaluation metrics.
Define a compute_descriptors function that converts smiles to an RdKit molecule and returns key descriptors such as molecular weight, log p value, hydrogen bond donors, and hydrogen bond acceptors.
Load dataset from Google Drive in Colab, drop missing values and duplicates, compute descriptors from smiles, and set x and y with log solubility in moles per liter as target.
Apply grid search to tune random forest hyperparameters, exploring estimators, max depth, and minimum sample split with 5-fold cross-validation to identify the best model parameters for a chemist-focused regression task.
The lecture demonstrates selecting the best estimator via grid search, predicting on Xtest, and evaluating with mean absolute error, mean squared error, RMSE, and R².
Plot feature importances and residuals to evaluate solubility prediction; highlight that log P dominates, with molecular weight and hydrogen bond features contributing, and report best hyperparameters from grid search.
Explore supervised learning classification methods, including logistic regression for binary active or inactive outcomes, SVM with kernels and hyperplanes, and decision trees using molecular descriptors to predict drug activity.
Explore supervised learning classifiers with random forest and Naive Bayes, detailing ensemble prediction, independence assumptions, and applications from drug activity prediction to sentiment analysis and text classification.
Demonstrate classification with random forest and decision trees to separate alcohols, aldehydes/ketones, and amines by features such as O-H, carbonyl, NH2, and properties like molecular weight and boiling point.
Predict the classification of organic compounds using supervised learning with a random forest classifier. Load data with Pandas, create feature matrices, and evaluate with a train/test split and confusion matrix.
Train a random forest classifier on the chemical data using a train test split, achieve 84% accuracy, and visualize the confusion matrix with a Seaborn heatmap plus a classification report.
Explore dimensionality reduction with principal component analysis (PCA) to reduce features, mitigate the curse of dimensionality, and transform correlated features into uncorrelated principal components for visualization and reducing computational complexity.
Explore unsupervised learning techniques, including dimensionality reduction with PCA, and clustering methods like DBscan, K-means, and agglomerative clustering, using scikit learn to transform data without labels.
Load the wine dataset from scikit-learn, inspect its data and target arrays, and review the feature names to understand wine classification.
Explore unsupervised learning with wine data, focusing on clustering and dimensionality reduction using PCA and k-means. Learn to evaluate cluster quality with silhouette and Davies-Bouldin scores.
Apply scalar fit transform to a data frame, then perform PCA with two components, and visualize PCA1 versus PCA2 with a scatter plot to show their variation and coherence.
Apply principal component analysis and k-means clustering to chemist data, evaluate silhouette scores to determine the optimal three clusters, and visualize the results.
Explore a DBSCAN clustering approach on blob-generated data, using PCA for visualization, standard scaling, and silhouette scoring to compare with K-means and achieve clear cluster separation.
Explore blind signal separation of chemical spectra using independent component analysis (ICA, fast ICA) in scikit-learn, separating four mixed IR spectra into component signals and comparing with pure spectra.
Apply blind signal separation with fast ICA to decompose mixed spectroscopy signals in Python, including importing libraries, reading IR spectra data, and performing independent component analysis.
Learn how to prepare data for fast ICA by stacking and transposing, run ICA with four components using a fixed random state, and visualize the independent components with side-by-side plots.
Plot the extracted spectrum of component one and component two in parallel, invert the x-axis for IR wave number, and display their spectra.
Plot all four extracted spectra from the mixture spectrum by adding subplots in figure one and figure two, displaying components one through four in separate spectra.
Identify cyclohexane by comparing segregated spectra of a four-component mixture with reference spectra, confirming pure cyclohexane matches and labeling its component index.
Apply fast ICA to extract spectra of mixture components and identify cyclohexane, acetone, and methanol by comparing them with reference spectra.
Plot all four spectra in a single 2x2 figure, labeling axes and inverting the x-axis for ill spectrum, showing wave function and s fit for the mixture data.
Plot all four spectra in one figure using a for loop, aligning s fit and s pure spectra, with figures, axes, and inversion; highlight alignment issues when indices mismatch.
Machine Learning is transforming the way chemists analyze data, predict properties, and accelerate discoveries in various sub-disciplines of Chemistry. This course is designed to give you the practical skills and confidence to apply machine learning directly to chemical problems.
Starting from the basics, you will learn how to preprocess chemical datasets, explore molecular descriptors, and choose the right algorithms for prediction and classification. Step by step, you will apply regression, classification, and clustering methods to real-world chemical examples. You will gain hands-on experience with Python libraries such as NumPy, pandas, matplotlib, and scikit-learn—without being overwhelmed by unnecessary theory.
Throughout the course, we’ll connect machine learning concepts to chemistry applications: predicting molecular properties (solubility) , analyzing spectra, classifying compounds, resolving complex spectra of mixture to individual spectra and grouping similar molecules. By the end, you will not only understand how these algorithms work but also know how to implement them for your own research and projects.
This is not just a programming course—it’s a transformation in how you approach chemistry. You will leave with a solid foundation in applying ML to chemical data and the ability to contribute to modern, data-driven research.
Note: Basic knowledge of Python is recommended for this course