Rows are rarely independent. Ten reviews by the same author, forty scans of the same patient, a hundred events from the same account: split those at random and the model recognises the author, not the sentiment. The offline number looks excellent and production does not reproduce it.
Write group_split(groups, test_size=0.2, seed=0) returning (train_idx, test_idx) as integer NumPy arrays.
groups[i] is the group that row i belongs to. Every row of a group must end up on the same side of the split. Shuffle the distinct groups using np.random.default_rng(seed) and take groups into the test set until it holds at least test_size of the rows.
Same seed, same split, every time.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen