topskill.dev
CoursesTracks
All courses/Machine Learning FundamentalsRepresenting data
Foundations and the ML process
7 / 8
← Machine Learning Fundamentals
○What machine learning learns○Features and labels○Training and inference○Regression or classification○The machine learning process○Data quality and coverage●Representing data✦Module Quiz
○Linear regression○Try a tiny linear model○Logistic regression○Nearest neighbors○Decision trees○Random forests○Boosting○Naive Bayes○Support vector machines✦Module Quiz
○Clustering○K-means○Choosing and interpreting clusters○Principal component analysis○Neural networks and deep learning○Self-supervised learning○Transfer learning○Reinforcement learning✦Module Quiz
○Generalization and overfitting○Holding out evaluation data○Data leakage○Baselines○Bias and variance intuition○Reading learning curves✦Module Quiz
○Prediction errors and residuals○Measuring regression error○Squared error and large misses○The confusion matrix○Precision and recall○Try a held-out classifier✦Module Quiz
○Bias and limits○Monitoring and drift○Comparing models for a decision✦Module Quiz
Foundations and the ML process

Representing data

A model needs a consistent representation of its inputs. If one record expresses duration in minutes and another in hours, equal numbers no longer mean equal quantities. Check definitions and units before treating columns as comparable measurements.

Numerical features measure amounts. Categorical features name groups. Separate yes/no indicator columns can represent package types without pretending that one type is twice another. The appropriate encoding depends on the model and the meaning of the categories.

Missing is not the same as zero. A missing distance records an unknown value; zero is a specific measured distance. One possible policy fills missing values with a typical value learned from training data and adds an indicator for whether the original value was absent.

Scaling changes numerical ranges. A common approach subtracts a training-set average and divides by a training-set measure of spread. This does not make a feature more informative; it prevents units alone from dominating some algorithms.

Distance-based methods are particularly sensitive to scale. Changing kilometers to meters multiplies numerical differences by 1,000 without changing the actual deliveries. A tree asking threshold questions one feature at a time is usually less sensitive to this issue.

Fixed unit conversions can be defined in advance. Preparation that learns values from records must be fitted on training data only, then applied unchanged to evaluation data. Do not estimate replacement values or scaling statistics from the entire dataset before splitting it.

Check your understanding

Why should an unknown distance not automatically become zero?

Answer: Unknown and measured zero convey different information.

Fact 1
1 / 1
FACT 1

Unknown and measured zero convey different information.