Machine learning: Difference between revisions

From Computer Science Wiki
No edit summary
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>
<blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;">
  [[File:Exclamation.png]] This is student work which has not yet been approved as correct by the instructor
</blockquote>
</center>
[[file:Studying.png|right|frame|Case study notes<ref>http://www.flaticon.com/</ref>]]
[[file:Studying.png|right|frame|Case study notes<ref>http://www.flaticon.com/</ref>]]


== Introduction ==
== Introduction ==


Using algorithms that iteratively learn from data, machine learning allows computers to find hidden insights without being explicitly programmed where to look. <ref> https://www.sas.com/en_us/insights/analytics/machine-learning.html </ref> This is important to our case study as it allows self-driving cars to learn from it’s environment and mistakes.
Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks.[1] It is seen as a part of artificial intelligence. Machine learning algorithms build a model based on sample data, known as training data, in order to make predictions or decisions without being explicitly programmed to do so. Machine learning algorithms are used in a wide variety of applications, such as in medicine, email filtering, speech recognition, and computer vision, where it is difficult or unfeasible to develop conventional algorithms to perform the needed tasks.<ref>https://en.wikipedia.org/wiki/Machine_learning</ref>
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/5q87K1WaoFI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</html>
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/aircAruvnKk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</html>
 
 
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/ukzFI9rgwfU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</html>
 
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/nKW8Ndu7Mjw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</html>
 
== The recommender problem ==
 
Estimate a utility function that automatically predicts how a user will like an item<ref>Xavier Amatriain, https://www.youtube.com/watch?v=bLhq63ygoU8&t=1s&ab_channel=AlexSmola</ref>
 
Based on:
* Past behavior
* Relation to other users
* Item similarity
* Context
 
== A way to approach this problem ==
 
One way to estimate a utility function that predicts how a user will like an item is to use a machine learning model that takes as input the past behavior of the user, the relation of the user to other users, the similarity of the item to other items, and the context in which the item is being presented. The output of the model would be a prediction of how much the user will like the item.
 
To build such a model, you would need to gather data on users' past behavior, including ratings or preferences for different items. You would also need data on the relationships between users, such as whether they are friends or share similar interests. The item similarity data could be based on the features of the items or on their co-occurrence with other items in past user behavior. The context in which the item is presented could include information such as the time of day, the user's location, and the user's current activity or task.
 
Using this data, you could train a machine learning model, such as a decision tree, random forest, or neural network, to predict the user's preference for an item based on these factors. The model could then be used to estimate the utility of an item for a particular user by making a prediction of how much the user will like the item based on the input features.
 
== Approaches to recommendation ==
 
* Collaborative filtering: recommend on past behavior
** User based: recommend what other users like who are like me
** Item based: find similar items to those I have previously liked
 
* Content-based: Recommended based on item features
* Personalized learning to rank: treat recommendations as a tranking problem
* Demographic: recommend based on user features
* Social-recommendations: trust-based
* Hybrid: any combination of the above
 
== Terminology ==
 
# [[Behavioural data]]
# Cloud delivery models:
## [[Infrastructure as a service (IaaS)]]
## [[Platform as a service (PaaS)]]
## [[Software as a service (SaaS)]]
# [[Cloud deployment models]]
# [[Collaborative filtering]]
# [[Content-based filtering]]
# [[Cost function]]
# [[F-measure]]
# [[Precision]]
# [[Recall]]
# [[Right to anonymity]]
# [[Right to privacy]]
# [[Matrix factorization]]
 
 
# [[Hyperparameter]]
# [[K-nearest neighbour (k-NN) algorithm]]
# [[Backpropagation]]
# [[Mean absolute error (MAE)]]
# [[Overfitting]]
# [[Popularity bias]]
# [[Reinforcement learning]]
# [[Root-mean-square error (RMSE)]]
# [[Stochastic gradient descent]]
# [[Training data]]


== How does it work or a deeper look ==
not listed in case study but perhaps useful:


Basically the program has some sort of end goal. In our case that is driving to a given destination without crashing, or breaking the law. The program now does multiple runs, and in each run, it changes something. The car might break when it sees a red light for example, this is a good run, as the program has not broken the law. On the other hand if the program breaks the law, and speeds up when it sees a red light, it breaks it’s original goal of not breaking the law. Good runs evolve and ‘reproduce’ (mix the good parts) making better versions of the program, until ideally we have a program that knows fulfills its original purpose. <ref> https://en.wikipedia.org/wiki/Evolutionary_algorithm </ref> <ref>https://en.wikipedia.org/wiki/Neuroevolution </ref>
# [[Binary classification model]]


== Examples ==  
== Examples ==  


An excellent, and I truly mean excellent example is MarI/O, a machine learning program that learns how to play mario, and mario kart. <br />  
An excellent, and I truly mean excellent example is MarI/O, a machine learning program that learns how to play mario, and mario kart. <br />  
Super Mario World: https://www.youtube.com/watch?v=qv6UVOQ0F44
# Super Mario World: https://www.youtube.com/watch?v=qv6UVOQ0F44
Mario Kart: https://www.youtube.com/watch?v=S9Y_I9vY8Qw <br />
# Mario Kart: https://www.youtube.com/watch?v=S9Y_I9vY8Qw <br />
<ref> https://www.youtube.com/channel/UC8aG3LDTDwNR1UQhSn9uVrw  </ref>
<ref> https://www.youtube.com/channel/UC8aG3LDTDwNR1UQhSn9uVrw  </ref>




== Pictures, diagrams ==
Pictures and diagrams go a LONG way to helping someone understand a topic. Especially if your topic is a little abstract or complex. Using a picture or diagram is a two part process:
# [https://www.mediawiki.org/wiki/Help:Managing_files upload a file]
# [https://www.mediawiki.org/wiki/Help:Images use the file on a wiki page]


== References ==
== References ==
Line 35: Line 102:


[[Category:2018 case study]]
[[Category:2018 case study]]
[[Category:Student created article]]
[[Category:2023 case study]]

Latest revision as of 08:29, 19 May 2023

Case study notes[1]

Introduction[edit]

Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks.[1] It is seen as a part of artificial intelligence. Machine learning algorithms build a model based on sample data, known as training data, in order to make predictions or decisions without being explicitly programmed to do so. Machine learning algorithms are used in a wide variety of applications, such as in medicine, email filtering, speech recognition, and computer vision, where it is difficult or unfeasible to develop conventional algorithms to perform the needed tasks.[2]



The recommender problem[edit]

Estimate a utility function that automatically predicts how a user will like an item[3]

Based on:

  • Past behavior
  • Relation to other users
  • Item similarity
  • Context

A way to approach this problem[edit]

One way to estimate a utility function that predicts how a user will like an item is to use a machine learning model that takes as input the past behavior of the user, the relation of the user to other users, the similarity of the item to other items, and the context in which the item is being presented. The output of the model would be a prediction of how much the user will like the item.

To build such a model, you would need to gather data on users' past behavior, including ratings or preferences for different items. You would also need data on the relationships between users, such as whether they are friends or share similar interests. The item similarity data could be based on the features of the items or on their co-occurrence with other items in past user behavior. The context in which the item is presented could include information such as the time of day, the user's location, and the user's current activity or task.

Using this data, you could train a machine learning model, such as a decision tree, random forest, or neural network, to predict the user's preference for an item based on these factors. The model could then be used to estimate the utility of an item for a particular user by making a prediction of how much the user will like the item based on the input features.

Approaches to recommendation[edit]

  • Collaborative filtering: recommend on past behavior
    • User based: recommend what other users like who are like me
    • Item based: find similar items to those I have previously liked
  • Content-based: Recommended based on item features
  • Personalized learning to rank: treat recommendations as a tranking problem
  • Demographic: recommend based on user features
  • Social-recommendations: trust-based
  • Hybrid: any combination of the above

Terminology[edit]

  1. Behavioural data
  2. Cloud delivery models:
    1. Infrastructure as a service (IaaS)
    2. Platform as a service (PaaS)
    3. Software as a service (SaaS)
  3. Cloud deployment models
  4. Collaborative filtering
  5. Content-based filtering
  6. Cost function
  7. F-measure
  8. Precision
  9. Recall
  10. Right to anonymity
  11. Right to privacy
  12. Matrix factorization


  1. Hyperparameter
  2. K-nearest neighbour (k-NN) algorithm
  3. Backpropagation
  4. Mean absolute error (MAE)
  5. Overfitting
  6. Popularity bias
  7. Reinforcement learning
  8. Root-mean-square error (RMSE)
  9. Stochastic gradient descent
  10. Training data

not listed in case study but perhaps useful:

  1. Binary classification model

Examples[edit]

An excellent, and I truly mean excellent example is MarI/O, a machine learning program that learns how to play mario, and mario kart.

  1. Super Mario World: https://www.youtube.com/watch?v=qv6UVOQ0F44
  2. Mario Kart: https://www.youtube.com/watch?v=S9Y_I9vY8Qw

[4]


References[edit]