designwithfocus

AI & ML development

What Is Machine Learning? Models, Labels and Limits

By Design With Focus Team 6 min read
Simple chart of labeled points with a line standing in for a trained model

Short answer

Machine learning trains a piece of software, called a model, to make predictions or generate content from data. Supervised learning studies examples that already have the correct answers. Unsupervised learning looks for patterns without those answers. Training adjusts the model. A fitted model can still fail on new data. A browser color tool is not this kind of model.

Last verified against the sources listed below.

Key takeaways

  • Google describes a model as software trained on data to predict or generate content.
  • Supervised learning gets data with the correct answers. Unsupervised learning does not.
  • Regression predicts a number. Classification predicts a category.
  • In scikit-learn, fitting an estimator takes samples and, for supervised tasks, target values.
  • A fit on training data does not prove the model will predict well on data it has not seen.
  • A color palette tool in the browser is a color utility, not a trained model.

A plain answer to what is machine learning starts with data and a model. Google’s introduction says machine learning is the process of training a piece of software, called a model, to make useful predictions or generate content such as text, images, audio, or video from data.

That is a different job from writing every rule by hand. Google’s rain example contrasts a physics simulation of the atmosphere with a model that is shown large amounts of weather data until it learns a relationship, then shown current weather and asked for rain. The rest of this article stays at that altitude: what a model is, how supervised and unsupervised learning differ, how training works, and where the idea stops.

What is a model in this setting?

A model is software that learned a relationship from data and uses it to predict or generate. Google’s check-your-understanding item says a model is a mathematical relationship derived from data that an ML system uses to make predictions. The NIST glossary, citing NIST SP 800-55, describes systems that adapt and learn from data with the goal of improving accuracy.

Google’s Machine Learning Crash Course has been online since 2018, and the page says millions of people have used it. Early modules cover linear regression, logistic regression, and classification. Later ones cover data, neural networks, and production systems.

A model is only as specific as its task. Regression predicts a number, such as rainfall in inches or millimeters. Classification predicts a category, such as spam or not spam. Both are models, and they do not return the same kind of result.

How is supervised learning different?

Supervised learning is trained on examples that already include the correct answers. Google says a human provides data with the known correct results, and the model looks for connections that produce those answers. Regression outputs a number, and classification outputs a category.

Predicting energy use in kilowatt-hours is regression. Predicting rain versus no rain is classification. scikit-learn 1.9.1, as of December 2026, says a supervised fit takes samples X and targets y, with rows as samples and columns as features. The supervised guide groups linear models, trees, ensembles, and neural networks there.

Question Supervised learning Unsupervised learning
What do you provide? Data that already has the correct answers Data without those answers
What should it find? Connections that produce those answers Patterns, often clusters
How scikit-learn fits it fit receives X and targets y y does not need to be passed
Typical result A number or a category Groups you may name later

How does training work at a high level?

Training adjusts the model’s parameters so its predictions sit closer to the examples. Google’s linear regression lesson writes a one-feature model as a predicted label equal to a bias plus a weight times a feature. Training calculates the weight and bias that shrink the gap between predicted and actual values, and extra features get extra weights.

In scikit-learn the same idea is an estimator. You call fit on the samples and, for supervised work, the targets, then predict on new rows without fitting again. A pipeline can chain a preprocessor, such as scaling, with the final predictor.

The getting started guide warns that preprocessing the whole data set before you split train and test can leak test information into training. Put the preprocessing inside the pipeline that cross-validation trains. The loop is choose examples, fit parameters, then ask about rows the model is allowed to see.

What does unsupervised learning look for?

Unsupervised learning looks for structure in data that has no correct-answer column. Google says the model identifies meaningful patterns. Clustering organizes similar items into groups whose categories you did not define up front, which is how it differs from classification.

A weather set might cluster on temperature into groups you later call seasons. You name them after you see them. scikit-learn’s unsupervised learning guide files Gaussian mixtures, manifold learning, clustering such as k-means and DBSCAN, principal component analysis, density estimation, and outlier detection under that heading.

For those tasks the getting started page says you do not have to pass y. The library still uses fit, and what it fits is structure in X. Google also lists reinforcement learning and generative AI, so the table is a comparison, not a claim that every system is one or the other.

Where do these methods stop being useful?

A fitted model is not a guarantee about the next example, and a cluster is not a label you already knew. scikit-learn says fitting does not mean the model will predict well on unseen data, so you have to evaluate it. The guide names a train-test split and cross-validation, including a default of five folds.

Hyperparameters, such as how many trees a forest has, change that result, and the library can search combinations. Those checks describe one estimator on one split, not a universal success rate. The limits sit in the definitions:

  • Supervised learning can only repeat answers of the kind it was shown.
  • Clusters still need a person if you want names for them.
  • A fitted model is not a promise about the next row.

The Web Neural Network API is a W3C Candidate Recommendation Draft dated 20 November 2026. It describes inference of neural networks on hardware, and the document says it is still a draft. Running a pre-trained model is a different task from training one.

Why is a palette tool not a model?

A palette tool reads colors from an image. It does not learn a relationship from labeled examples. The Color Palette from Image tool pulls a palette from a picture in the browser. Call it a color tool, not a model, because it was not trained on a label column and it does not predict a class.

A color gamut is the range of color a device can represent, which is also not a trained estimator. Nothing in the palette tool adjusts a weight or a bias, and nothing in it is fit to a target column.

A model is trained software. A label is a known answer. A feature is an input. A palette is colors taken from a picture.

Frequently asked questions

What are reinforcement learning and generative AI?

Google's introduction lists four ways systems learn, not two. Reinforcement learning makes predictions by receiving rewards or penalties for actions in an environment, and it produces a policy for getting more rewards. The page names robot walking and AlphaGo as examples. Generative AI creates content such as text, images, audio, or video from a prompt. The same page says generative models often start with an unsupervised pass that learns to mimic the training data, and may later get supervised or reinforcement training for a task such as summarizing.

What is a label in a supervised example?

In Google's linear regression lesson, the label is the value you want to predict, and a feature is an input used to predict it. Their car sketch treats weight as a feature and miles per gallon as the label. During training the model adjusts a bias and a weight to shrink the gap between predicted and actual labels. The lesson writes a one-feature model as a bias plus a weight times the feature, and more features add more weights.

What does scikit-learn call the pieces of a data set?

The getting started guide says a fit usually takes a samples matrix X and target values y. Rows of X are samples and columns are features. y holds real numbers for regression or integers for classification, and each entry lines up with a row of X. Unsupervised tasks can omit y. After fit, predict can score new rows without fitting again. The guide also says X and y are usually numpy arrays or similar array-like data, though some estimators accept other formats such as sparse matrices.

Does a browser inference API train the model?

The W3C Web Neural Network API, a Candidate Recommendation Draft dated 20 November 2026, describes a low-level API for neural network inference on device hardware. Its introduction says the API is a hardware-agnostic layer for machine learning capabilities already on the operating system. The use-case section says those applications are built on pre-trained models. Inference here means running a model that was already trained, not clicking a color tool. The document is still a draft, so treat the API as work in progress.

Why can a fitted model still be wrong on new rows?

scikit-learn's getting started guide says fitting a model does not mean it will predict well on unseen data, and that you have to evaluate that directly. One helper it names splits rows into train and test sets. Another runs cross-validation, and the example in the guide defaults to five folds. Parameters you choose before fitting, often called hyperparameters, can change how well an estimator generalizes. The guide shows a randomized search over those parameters. None of that is a promise about a particular score.

Sources