liveBook · Manning

Training dataset

As explained in Investing for Programmers

Training data is the portion of a labeled dataset used to fit a predictive model.

A training dataset is the labeled portion of a sample used to fit a predictive model. The algorithm processes features and labels to identify useful correlations. section 8.1.2

A practical supervised-learning workflow is:

  • Collect and aggregate historical data over a time interval appropriate to the industry and prediction goal. section 8.1.2
  • Split the labeled sample into training data and test data, keeping the test portion aside. section 8.1.2
  • Fit a model on the training data, then evaluate its predictions against labels in the untouched test data. section 8.1.2

Stock-price prediction

A Python workflow loads Apple price history, retains Open, High, Low, Close, and Volume as features, creates the next Close as Target, and trains a random forest on the first 80% of observations. It evaluates the remaining observations with RMSE and compares actual and predicted prices in a plot.

How Investing for Programmers covers it

How deep it goes
Explains dataset splitting, feature-label fitting, inference, and test comparison, without developing model internals.
Examples
Uses historical stock prices, engineered next-day targets, feature columns, chronological splits, RMSE, and actual-versus-forecast plots.
What it assumes
Assumes labeled features and outcomes, while demonstrating dataset preparation and splitting through a financial example.
What you can do after
Build it from scratch by preparing labeled financial data, fitting a model, generating predictions, and measuring test-set accuracy.
How it connects
Connects labeled datasets with supervised learning, test data, linear regression, inference, and random forests.

Also explained in

Compare how 36 books explain training dataset →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.