Machine Learning entails teaching computers to learn without being explicitly programmed to do so - Arthur Samuel
Main types of ML:
- Supervised Learning (Course 1 + 2)
- Used most in real world applications; most rapid advancement and innovation
- Note: Give Learning Algorithm examples, then train it to give right outputs (answers/labels) for a given input. Basically I have a small precious complete data set, and want to be able to run a lot more data through it and predict outcomes accurately.
- Regression:
- Task is to fit a number; for example could be a curved line rather than a straight regression line (see housing example below)
- Produces infinitely many outputs
- Classification:
- Task is to predict categories, that don't have to be numbers (e.g. is tumor benign; malignant; malignant type 2.)
- Small number of outputs
- Can use two or more inputs to predict an output (e.g. age and tumor size)
- Learning algorithm can set a boundary line to help with diagnosis
- Output class and category mean the same thing.
- Unsupervised Learning
- Task you give machine is to find some structure or pattern in unlabeled data that's interesting - without any inputs ahead of time of what is good/bad/etc
- Clustering Algorithm: One type; e.g. Google News groups panda stories together. Figures out on its own which common articles share which common words. Can group genes, or customers.
- Anomaly Detection: Used to detect unusual events, e.g. in fraud detection
- Dimensionality Reduction: Compress data using fewer numbers
- Recommender Systems
- Reinforcement Learning
- In machine learning, the term "fit" or "fitting" refers to the process of training a machine learning model on a dataset.
- When you fit a model, you are essentially teaching the model to make predictions or approximate a target function based on the input data
- "Fitting" a model involves training it on a dataset so that it can learn patterns and relationships within the data and make predictions on new, unseen data
SUPERVISED LEARNING: REGRESSION
Training a Linear Regression Model with one input variable:
- fw,b(x) = wx+b
- Note: This means the function or output of x – given parameters w and b – equals w times x, +b
- Note: given a couple of data points, this function - when set up with right w and b variables, is a machine that predicts other correct outputs from a given input. This is the model.
- Mostly widely used algorithm; predicts numbers.
- Single variable (single input variable or feature) regression is called univariate linear regression
- In a training set, each row in data table corresponds to one cross in an X/Y graph (e.g. house sizes and prices)
- Variable notation:
- "x" = input variable or input feature (xi = ith training example)
- "y" = output variable or target variable
- "m" = total number of training examples
- (x,y) = single training example; use superscript for denoting where it lies in the sequence
- "ŷ" = prediction or estimate
- w = weight parameter; gives you the slope of the line
- b = bias parameter
- Training Set: Feed it features and targets from training set
- Learning algorithm(the "model") is a function or hypothesis - takes new input x and outputs a prediction or estimate "ŷ"
Squared Error Cost function (J): describes how well said machine (a model) is doing, so we can modify linear regression model to do better