liveBook · Manning

Random split

As explained in Build AI Drug Discovery Pipelines

A random split partitions dataset examples into subsets by randomly assigning examples to each subset.

A random split divides dataset examples into training and test subsets by random assignment. For the hERG blockers dataset, use the existing Set II column to identify these subsets while predicting whether compounds block the hERG channel. section 3.2.1

In the hERG screening workflow, the split supports these practices:

  • Select the Random Split field rather than using pIC50 as a model feature, because pIC50 helped define the target class and requires experimental measurement. section 3.2.1
  • Inspect the dataset before modeling, since curation and exploratory analysis help reveal missing values, inconsistent entries, and other data problems. section 3.2.1
Listing 3.1 Loading hERG Blockers Dataset
from pathlib import Path
import pandas as pd
import urllib.request
 
def load_herg_blockers_data():
  herg_blockers_path = Path("data/ch03/hERG_blockers.xlsx")
 
  return pd.read_excel(
      herg_blockers_path,
      usecols="A:F",
      header=None,
      skiprows=[0,1],
      names=[
          "SMILES", "Name", "pIC50",
          "Class", "Scaffold Split", "Random Split"
      ],
    ).head(-68)    #A

Load the hERG dataset with pandas and retain its Random Split column for defining the modeling subsets. section 3.2.1

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines the partition and identifies its dataset column, but does not explain the randomization algorithm or evaluation metrics.
Examples
Uses the hERG blockers dataset and its Random Split column as the concrete example.
What you can do after
Apply it via pandas by selecting training and test examples from the Random Split column.
How it connects
Connects hERG blockers, scaffold split, pIC50, class labels, and training-test evaluation.

Also explained in

Compare how 2 books explain random split →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.