notes

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit e4912234bd3d0777fd0a2732e542be13c75fb150
parent c8cdc0b5737da02dfdba87e1b19fbb891b580963
Author: Andrew <andrewlaack1@gmail.com>
Date:   Thu,  9 May 2024 22:18:07 -0500

Completed notes... for now for ml

Diffstat:
AInstanceBasedLearning.md | 14++++++++++++++
MLearningRate.md | 2++
MLinearRegression.md | 2--
MMachineLearning.md | 8++++++++
AModelBasedLearning.md | 10++++++++++
AModelNotes.md | 8++++++++
AOfflineLearning.md | 11+++++++++++
AOnlineLearning.md | 15+++++++++++++++
MRegressionProblem.md | 4++++
MReinforcementLearning.md | 4++++
ARuleLearning.md | 11+++++++++++
ASelfSupervisedLearning.md | 12++++++++++++
ASemiSupervisedLearning.md | 10++++++++++
ATransferLearning.md | 10++++++++++
Mindex.md | 1+
15 files changed, 120 insertions(+), 2 deletions(-)

diff --git a/InstanceBasedLearning.md b/InstanceBasedLearning.md @@ -0,0 +1,14 @@ +:ml: +# Instance Based Learning + +ML CH1 + +## Notes + +**Definition:** Instance based learning is a system by which we identify information and when it occurs again, we are able to detect it. + +Think of a spam filter. Something is marked as spam, if the exact same message is seen again, it will be marked as spam because last time it was. + +This can be thought of like a hash map. When hashing an input, if it exists as some bad data or whatever, then we do the same thing. + +This can also be implemented differently by searhing for similarities instead of exact matches to catch possible single pixel/character differences. diff --git a/LearningRate.md b/LearningRate.md @@ -9,3 +9,5 @@ ML L2 See [[GradientDescentCode.md]] and [[GradientDescent.md]] for an example of when a learning rate would be used and an implementation of it. + +Additionally, learning rate in a higher level sense, with regard to online learning, is how quickly a model will adapt to new data. diff --git a/LinearRegression.md b/LinearRegression.md @@ -8,5 +8,3 @@ ML L2 - Also referred to as ordinary least squares **Definition:** Fitting a straight line to data which allows for arbitrary inputs in the valid domain but not necessarily in the training set, to get accurate outputs. The goal is to find a $\theta$ (parameters) that minimizes $J(\theta)=\frac{1}{2}\sum_{i=1}^{m}(h(x_i) - y_i)^2$. This is called the cost function. - - diff --git a/MachineLearning.md b/MachineLearning.md @@ -32,16 +32,22 @@ h(x) = this is the function with an input of x this should be about the correct ML Categories: [[SupervisedLearning.md]] +[[SemiSupervisedLearning.md]] +[[SelfSupervisedLearning.md]] [[UnsupervisedLearning.md]] [[ReinforcementLearning.md]] +[[InstanceBasedLearning.md]] +[[ModelBasedLearning.md]] Concepts: [[RegressionProblem.md]] +[[TransferLearning.md]] [[VisualizationAlgorithm.md]] [[DimensionalityReduction.md]] [[AnomalyDetection.md]] [[NoveltyDetection.md]] +[[RuleLearning.md]] [[LinearRegression.md]] [[GradientDescent.md]] [[ClassificationProblem.md]] @@ -51,6 +57,8 @@ Concepts: [[NLP.md]] [[NLU.md]] [[Feature.md]] +[[OfflineLearning.md]] +[[OnlineLearning.md]] To do: diff --git a/ModelBasedLearning.md b/ModelBasedLearning.md @@ -0,0 +1,10 @@ +:ml: +# Model Based Learning + +ML CH1 + +## Notes + +**Definition:** Model based learning takes in inputs, does predictions, and gives an output. + +This is different than [[InstanceBasedLearning.md]] because it tries to learn patterns instead of match them. diff --git a/ModelNotes.md b/ModelNotes.md @@ -0,0 +1,8 @@ +:: :: :: :: :: +# + + + +## Notes + +**Definition:** diff --git a/OfflineLearning.md b/OfflineLearning.md @@ -0,0 +1,11 @@ +# Offline Learning / Batch Learning + +ML CH1 + +## Notes + +**Definition:** Offline learning is the process of learning and then implementing the learned behavior where the model can not learn incrementally. This is also referred to as batch learning. + +Think of alphago. It was trained to play go, then the agent was sent out to enact the policy not to learn more when playing real people. + +When models become obselete due to inability to learn new information this is called model rot or data drift. This happens because data always changes but the model can't. The solution to this is either using an [[OnlineLearning.md]] model or retraining. diff --git a/OnlineLearning.md b/OnlineLearning.md @@ -0,0 +1,15 @@ +# Online Learning / Incremental Learning + +ML CH1 + +## Notes + +**Definition:** Online learning is the process of learning as a model is fed new data. + +This paradigm is in contrast with [[OfflineLearning.md]] also known as batch learning where all data is trained on at the start and then the learned behavior is acted upon in a static way in perpetuity. + +When using online learning, you can use either individual samples to train on or mini-batches which are groupings of samples. + +This method can be used to train models on data where not all of the training data can fit in the machine's memory. This is referred to as out-of-core learning. When doing this, the algorithm loads in a mini-batch, runs a training step, and then repeats for all of the dataset. This may be confusing as the learning is done offline, but considering online learning more as incremental learning can help resolve this thought issue. + +The rate at which these models adapt to new information is called the [[LearningRate.md]]. When this is high they respond quickly to new data at the cost of losing old data faster. It is a balancing game. Counter to this, with a low learning rate we have more 'inertia' from old data in the set. diff --git a/RegressionProblem.md b/RegressionProblem.md @@ -12,3 +12,7 @@ Yes/no problem is a [[ClassificationProblem.md]]. Also see for a more specific example [[LinearRegression.md]]. There are other types of regression as well such as polynomial regression (no note at this time). When discussing regression, we often use the term "target" instead of "label" to describe the desired output. This contrasts with classification problems where we use the term label. + +See also [[LogisticRegression.md]] where we assign a probability of group membership. + +With regression, we describe the performance measure as the utility function or fitness function. This measures how good the model is. The inverse of this is the cost function which measures how bad it is. diff --git a/ReinforcementLearning.md b/ReinforcementLearning.md @@ -10,3 +10,7 @@ ML L1 If there is not an 'optimal' way to do something, you train the system to do stuff that works. Think like a dog, you let the dog do what it wants and then reinforce good behavior and punish bad behavior. This would probably be what you would want to create a chess model. + +In reinforcement learning the learning system is called an agent. This agent can observe the environment and perform actions to be rewarded. + +The strategy followed by the agent is called the 'policy'. diff --git a/RuleLearning.md b/RuleLearning.md @@ -0,0 +1,11 @@ +:ml: +# Rule Learning + +ML CH1 + + +## Notes + +**Definition:** Rule learning is the process of taking in lots of data and finding associations between data. + +This information can be useful when trying to implement [[DimensionalityReduction.md]]. diff --git a/SelfSupervisedLearning.md b/SelfSupervisedLearning.md @@ -0,0 +1,12 @@ +:ml: +# Self-supervised learning (SSL) + +ML CH1 + +## Notes + +**Definition:** Self-supervised learning is the process of chaning input data and the model predicting the output where the output is known to it. + +This is similar to [[SemiSupervisedLearning.md]] where models are trained to detect certain information (clustering) without knowing what the information means. + +Basically, the model learns to train itself. By messing with inputs to get expected outputs. diff --git a/SemiSupervisedLearning.md b/SemiSupervisedLearning.md @@ -0,0 +1,10 @@ +:ml: +# Semi-Supervised Learning + +ML CH1 + +## Notes + +**Definition:** This is training a model with some labeled and some unlabeled data. + +A good example of this is google's image classification. It will tell you person 2 is in photos 8, 10, and 15 you then given one label and it is able to cluster all of this data by the label you have given. diff --git a/TransferLearning.md b/TransferLearning.md @@ -0,0 +1,10 @@ +:ml: +# Transfer Learning + +ML CH1 + +## Notes + +**Definition:** Transfer learning is the process of transferring knowledge from one task to another. + +An example of this is training a model to reconstruct images of pets using self-supervised learning. Using this, we can then make the model into a classification modelf based on labelled data for different types of pets. diff --git a/index.md b/index.md @@ -15,6 +15,7 @@ This is the index for my main note classifications. I will maintain this as a ho [[ComputerArchitecture.md]] [[MachineLearning.md]] [[LinuxStuff.md]] +[[ModelNotes.md]] ## Technology Books to Read