What Is Machine Learning?

Created

22 January 2025

What Is Machine Learning?

AI umbrellas logic and machine learning

  • AI: Bob is a man, men need to eat, therefore Bob needs to eat

Machine learning is the intersection of AI, statistics, and electrical engineering

As chemistry is used to drive chemical engineering, statistics + CS drives ML ("intelligence engineering")

ML as Software 2.0

ML is software 2.0.

  • task: write a program to find the maximum element of a list
  • software 1.0: use your brain to program something
  • ML: you have data which is learned from to create a trained model. Now this trained model can output the desired answer

Another comparison:

  • Programming: data --> algorithm --> output
  • Machine learning: data+model --> learning algorithm --> trained model (which can be used in traditional algorithm) / model parameters

Sometimes the burden of thinking about the logic is harder than collecting data. Replaces human knowledge with information extracted from data.

Supervised Learning

Supervised machine learning analogy for robot sorter apple vs bread.

  • training: tell robot what to do with apple and bread model.train(training_truck)
  • testing: watching to make sure it does it right test_error = model.test( test_truck )
  • deployment: let it do its work by itself Then while the error is within a threshold, then let the model predict where it goes model.predict(item)

Both approaches can fail

"Garbage in --> Garbage out" bad data means it will be badly trained.

  • data is the new gold
  • most labeled data is for training data. small portion for test data.

Types of Machine Learning

  • supervised
    • input are features (independent vars) and the output is a label (dependent var) like "dog" or "tiger" or maybe the output could be a number.
  • unsupervised
  • reinforcement learning

Linear Models

Straight lines as models:

y^=w1⋅x+w0\hat{y} = w_1 \cdot x + w_0

  • y^\hat{y} is the label e.g., predicted price of the house
  • xx are the features e.g., the size of the house
  • w1w_1 and w0w_0 define the model. We want to learn what these values are from the data
  • There could be a "real" fit but this linear line best predicts it.

How do you find the values of w0w_0 and w1w_1?

  • squared error function. find the values that minimize the error function.

Deep Learning

What's the difference between linear models and "deep learning"?

  • function composition, you layer models. What this means is that you take the output of a linear model and put it into another linear model and this repeats.
  • At one point, "if you had more than 4 layers you were deep." but now it can be thousand +
  • shallow model: y^=f(x)=w1⋅x+w0\hat{y} = f(x) = w_1 \cdot x + w_0
  • deep model: y^=fL∘⋯∘f1∘f0(x)\hat{y} = f_L \circ \dots \circ f_1 \circ f_0(x)
  • contemporary predictive models, known as "neural networks"
  • every machine learning model in domains where there's a lot of data, you can assume its deep. Only really limited data sets won't.

NN: what is going on in each layer. Example of facial recognition

  • 1: bunch of edges
  • 2: if you have these edges it's an "eye" or a "nose"
  • 3: these "eyes" or "noses" compose this type of face

The number of parameters in models has gone from millions in 2018 to more than one trillion in 2020.

  • the rise is due to the discovery that you can train on gpus, which were highly efficient. you can train on more data than ever before. more innovations in training methods = more data = more parameters.

Unsupervised Learning: Hidden Structure

Clusters form from the data. E.g., you may find clusters from number of rooms vs house prices:

  • low number of rooms with high price: special boat houses
  • mid number of rooms with low price: typical
  • high rooms with high price: mansion

The goal is to automatically partition unlabeled data into groups with similar data points.

  • useful for: auto organizes data, understanding hidden structure in data, preprocessing for downstream analysis
  • e.g., cluster articles or documents based on topic, cluster protein sequences by gene expressions

Reinforcement Learning

  • Goal: learning a model ("policy") that predicts the action to take, given the current state.
  • State: game -> model -> {jump} action
  • useful for: sequential decision making, very general and widely applicable, reward function not always available and can be hard to design, not data efficient

History

  • mid 1990s: search and recommendation engines
  • 2010s: object recognition. Surpass human level by 2015
  • 2016: AlphaGo
  • 2018: AlphaFold for protein structure
  • 2019: poker bot
  • 2020: generative ai (diffusion model), large language model (encoder-decoder architectural model)

Open Problems and Issues

Detecting when data has changed: when introduced with data wildly different from training data, it cannot handle

Uncertainty Estimation: the output should be a prediction but also how confident the model is about the prediction

Human-AI Collaboration:

  • Input features -> meta model -> give to robot or human to handle
  • e.g., if road is straight, give to robot, but if it looks windy, give to human

Explainability

Continual learning: if model is trained on apple and bread, how can it also learn new things like pineapples (on the fly)

Correlation vs causation: what is the relation between the independent and dependent variable.

  • e.g., temp is independent, and altitude is dependent. so you can find the city by the temperature. but the truth is that you can find the city from the altitude.
  • when u build models based off of correlation, you may build a model that doesn't have substance

privacy: does absorbing more and more data, what are the privacy concerns

  • e.g., the New York Times claims models can't train on its articles

Security and safety: as we rely on them more, we need to make sure they are reliable

Ethics and fairness: social implications