--Your friends at LectureNotes

Note for Machine Learning - ML By New Swaroop

  • Machine Learning - ML
  • Note
  • 5 Topics
  • 45 Offline Downloads
  • Uploaded 11 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

Lecture Notes | 15CS73 – Machine Learning | Module 1: Introduction Module-1 Introduction to Machine Learning 1.1 Introduction Ever since computers were invented, we have wondered whether they might be made to learn. If we could understand how to program them to learn-to improve automatically with experience, the impact would be dramatic. Imagine computers learning from medical records which treatments are most effective for new diseases or personal software assistants learning the evolving interests of their users in order to highlight especially relevant stories from the online morning newspaper. This course presents the field of machine learning, describing a variety of learning paradigms, algorithms, theoretical results, and applications. Some successful applications of machine learning are, • • • • Learning to recognize spoken words. Learning to drive an autonomous vehicle. Learning to classify new astronomical structures. Learning to play world-class games. Examples of supervised machine learning tasks include: • • • • • • Identifying the zip code from handwritten digits on an envelope Determining whether a tumor is benign based on a medical image Detecting fraudulent activity in credit card transactions Identifying topics in a set of blog posts Segmenting customers into groups with similar preferences Detecting abnormal access patterns to a website 1.2 Well posed learning problems Learning is broadly defined as any computer program that improves its performance at some task through experience. Definition: A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E. For example, a computer program that learns to play checkers might improve its performance as measured by its ability to win at the class of tasks involving playing checkers games, through experience obtained by playing games against itself. In general, to have a well-defined learning problem, we must identity these three features: the class of tasks, the measure of performance to be improved, and the source of experience. A checkers learning problem • Task T: playing checkers • Performance measure P: percent of games won against opponents • Training experience E: playing practice games against itself Mr. Harivinod N www.techjourney.in Page| 1.2

Text from page-3

Lecture Notes | 15CS73 – Machine Learning | Module 1: Introduction We can specify many learning problems in this fashion, such as learning to recognize handwritten words, or learning to drive a robotic automobile autonomously. A handwriting recognition learning problem • • • Task T: recognizing and classifying handwritten words within images Performance measure P: percent of words correctly classified Training experience E: a database of handwritten words with given classifications A robot driving learning problem • • • T: driving on public four-lane highways using vision sensors P: average distance traveled before an error (as judged by human overseer) E: a sequence of images and steering commands recorded by observing a human driver 1.3 Designing a Learning system In order to illustrate some of the basic design issues and approaches to machine learning, let us consider designing a program to learn to play checkers, with the goal of entering it in the world checkers tournament. We adopt the obvious performance measure: the percent of games it wins in this world tournament. 1.3.1 Choosing the Training Experience The type of training experience available can have a significant impact on success or failure of the learner. • One key attribute is whether the training experience provides direct or indirect feedback regarding the choices made by the performance system. For example, in learning to play checkers, the system might learn from direct training examples consisting of individual checkers board states and the correct move for each. Alternatively, it might have available only indirect information consisting of the move sequences and final outcomes of various games played. Here the learner faces an additional problem of credit assignment or determining the degree to which each move in the sequence deserves credit or blame for the final outcome. Hence, learning from direct training feedback is typically easier than learning from indirect feedback. • A second important attribute of the training experience is the degree to which the learner controls the sequence of training examples. For example, the learner might rely on the teacher to select informative board states and to provide the correct move for each. Alternatively, the learner might itself propose board states that it finds particularly confusing and ask the teacher for the correct move. Or the learner may have complete control over both the board states and (indirect) training classifications, as it does when it learns by playing against itself with no teacher present. Mr. Harivinod N www.techjourney.in Page| 1.3

Text from page-4

Lecture Notes | 15CS73 – Machine Learning | Module 1: Introduction • A third important attribute of the training experience is how well it represents the distribution of examples over which the final system performance P must be measured. In general, learning is most reliable when the training examples follow a distribution similar to that of future test examples. In practice, it is often necessary to learn from a distribution of examples that is somewhat different from those on which the final system will be evaluated To proceed with our design, let us decide that our system will train by playing games against itself. This has the advantage that no external trainer need be present, and it therefore allows the system to generate as much training data as time permits. We now have a fully specified learning task. A checkers learning problem: • • • Task T: playing checkers Performance measure P: percent of games won in the world tournament Training experience E: games played against itself In order to complete the design of the learning system, we must now choose 1. the exact type of knowledge to be learned 2. a representation for this target knowledge 3. a learning mechanism 1.3.2. Choosing the Target Function The next design choice is to determine exactly what type of knowledge will be learned and how this will be used by the performance program. Consider checkers-playing program. The program needs only to learn how to choose the best move from among some large search space are known a priori. Here we discuss two such methods. • Method-1: Let us use the function ChooseMove: B → M to indicate that accepts any board from the set of legal board states B as input and produces as output some move from the set of legal moves M. The choice of the target function ChooseMove is a key design choice. Although ChooseMove is an obvious choice for the target function in our example, this function will turn out to be very difficult to learn given the kind of indirect training experience available to our system. • Method-2: An alternative target function and one that will turn out to be easier to learn in this setting is an evaluation function that assigns a numerical score to any given board state. Let us call this target function V and again use the notation V: B → to denote that V maps any legal board state from the set B to some real value in . We intend for this target function V to assign higher scores to better board states. If the system can successfully learn such a target function V, then it can easily use it to select the best move from any current board position. This can be accomplished by generating the Mr. Harivinod N www.techjourney.in Page| 1.4

Text from page-5

Lecture Notes | 15CS73 – Machine Learning | Module 1: Introduction successor board state produced by every legal move, then using V to choose the best successor state and therefore the best legal move. For example, define the target value V(b) for an arbitrary board state b in B, as follows: 1. 2. 3. 4. if b is a final board state that is won, then V(b) = 100 if b is a final board state that is lost, then V(b) = -100 if b is a final board state that is drawn, then V(b) = 0 if b is a not a final state in the game, then V(b) = V(b'), where b' is the best final board state that can be achieved starting from b and playing optimally until the end of the game (assuming the opponent plays optimally, as well). While this recursive definition specifies a value of V(b) for every board state b, this definition is not usable by our checkers player because it is not efficiently computable. The goal of learning in this case is to discover an operational description of V; i.e. select moves within realistic time bounds. Thus, we have reduced the learning task in this case to the problem of discovering an operational description of the ideal target function V. In practice, implementation of learning the target function is often called function approximation. We will use the symbol 𝑉̂ to refer to the function that is actually learned by our program, to distinguish it from the ideal target function V. 1.3.3 Choosing a Representation for the Target Function We have several ways to represent 𝑉̂ like; using a large table with a distinct entry specifying the value for each distinct board state or using a collection of rules that match against features of the board state, or a quadratic polynomial function of predefined board features, or an artificial neural network. On the other hand, the more expressive the representation, the more training data the program will require in order to choose among the alternative hypotheses it can represent. To keep the discussion brief, let us choose a simple representation: for any given board state, the function c will be calculated as a linear combination of the following board features: • • • • • • xl: the number of black pieces on the board x2: the number of red pieces on the board x3: the number of black kings on the board x4: the number of red kings on the board x5: the number of black pieces threatened by red (i.e., which can be captured on red's next turn) x6: the number of red pieces threatened by black Thus, our learning program will represent 𝑉̂ (b) as a linear function of the form Mr. Harivinod N www.techjourney.in Page| 1.5

Lecture Notes