Machine Learning

Types of learning

  • Whether or not they are trained with human supervision (supervised, unsupervised, semisupervised, and Reinforcement Learning)
  • Whether or not they can learn incrementally on the fly (online versus batch learning)
  • Whether they work by simply comparing new data points to known data points, or instead detect patterns in the training data and build a predictive model, much like scientists do (instance-based versus model-based learning)

Types Of Machine Learning Systems

Supervised VS Unsupervised learning

Supervised Learning

  • In supervised learning, the training data you feed to the algorithm includes the desired solutions, called labels

    • k-Nearest Neighbors
    • Linear Regression
    • Logistic Regression
    • Support Vector Machines (SVMs)
    • Decision Trees and Random Forests

    • Neural networks

Unsupervised Learning

  • In unsupervised learning, as you might guess, the training data is unlabeled. The system tries to learn without a teacher
    • Clustering
      • k-Means
      • Hierarchical Cluster Analysis (HCA)
      • Expectation Maximization
      • DBSCAN
    • Visualization and dimensionality reduction
      • Principal Component Analysis (PCA)
      • Kernel PCA
      • Locally-Linear Embedding (LLE)
      • t-distributed Stochastic Neighbor Embedding (t-SNE)
    • Association rule learning
      • Apriori
      • Eclat
    • Anamoly detection and novelty detection
      • One-Class SVM
      • Isolation Forest

Semisupervised Learning

  • Some algorithms can deal with partially labeled training data, usually a lot of unla beled data and a little bit of labeled data. This is called semisupervised learning
  • Most semisupervised learning algorithms are combinations of unsupervised and supervised algorithms. For example, deep belief networks (DBNs) are based on unsu‐ pervised components called restricted Boltzmann machines (RBMs) stacked on top of one another. RBMs are trained sequentially in an unsupervised manner, and then the whole system is fine-tuned using supervised learning techniques.

Reinforcement Learning

  • Reinforcement Learning is a very different beast. The learning system, called an agent in this context, can observe the environment, select and perform actions, and get rewards in return (or penalties in the form of negative rewards. It must then learn by itself what is the best strategy, called a policy, to get the most reward over time. A policy defines what action the agent should choose when it is in a given situation.

Batch And Online Learning

Batch Learning

  • In batch learning, the system is incapable of learning incrementally: it must be trained using all the available data. This will generally take a lot of time and computing resources, so it is typically done offline. First the system is trained, and then it is launched into production and runs without learning anymore; it just applies what it has learned. This is called offline learning.
  • If you want a batch learning system to know about new data (such as a new type of spam), you need to train a new version of the system from scratch on the full dataset (not just the new data, but also the old data), then stop the old system and replace it with the new one.

Online Learning

  • In online learning, you train the system incrementally by feeding it data instances sequentially, either individually or by small groups called mini-batches. Each learning step is fast and cheap, so the system can learn about new data on the fly, as it arrives
  • Online learning is great for systems that receive data as a continuous flow (e.g., stock prices) and need to adapt to change rapidly or autonomously. It is also a good option if you have limited computing resources: once an online learning system has learned about new data instances, it does not need them anymore, so you can discard them (unless you want to be able to roll back to a previous state and “replay” the data). This can save a huge amount of space.
  • Online learning algorithms can also be used to train systems on huge datasets that cannot fit in one machine’s main memory (this is called out-of-core learning). The algorithm loads part of the data, runs a training step on that data, and repeats the process until it has run on all of the data
    • This whole process is usually done offline (i.e., not on the live system), so online learning can be a confusing name. Think of it as incremental learning
  • Importance of Learning Rate in Online Learning

Instance-Based Vs Model-Based Learning

Instance-Based Learning

  • the system learns the examples by heart, then generalizes to new cases using a similarity measure

Model-Based Learning

  • Another way to generalize from a set of examples is to build a model of these examples, then use that model to make predictions. This is called model-based learning

Challenges of Machine Learning

  • Insuffcient Quantity of Training Data
  • Nonrepresentative Training Data
  • Poor-Quality Data
  • Irrelevant Features
  • Overfitting the Training Data
  • Underfitting the Training Data

Most Common Supervised Learning Tasks are Classification(predicting classes) And Regression(predicting Values)