Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Machine Learning and Reinforcement Learning Techniques, Study notes of Computer Science

An overview of various planning techniques in artificial intelligence, focusing on goal stack planning and its characteristics. It also delves into reinforcement learning, a type of machine learning method, discussing its advantages, elements, and applications. The document concludes by comparing machine learning and planning in ai.

Typology: Study notes

2023/2024

Available from 06/13/2024

shaheem28
shaheem28 🇮🇳

4 documents

1 / 28

Toggle sidebar

Related documents


Partial preview of the text

Download Machine Learning and Reinforcement Learning Techniques and more Study notes Computer Science in PDF only on Docsity! Unit 1:(marks 4) Discuss the ill structured and well-structured problem with neat diagram. Ill-Structured Problem: An ill-structured problem is a complex, ambiguous, and poorly defined problem that lacks clear solution paths or problem-solving strategies. These problems typically involve subjective judgments, incomplete information, and multiple perspectives. They often have no single correct answer and require creative thinking, analysis, and interpretation. Characteristics of Ill-Structured Problems: 1. Ambiguity: Ill-structured problems lack clear definitions and have multiple interpretations. 2. Complexity: They involve multiple variables, interdependencies, and dynamic factors. 3. Subjectivity: Different individuals may have different perspectives, values, and opinions regarding the problem. 4. Uncertainty: The information available may be incomplete, inconsistent, or unreliable. 5. Lack of Clear Solution Paths: There is no predefined set of steps or algorithms to solve the problem. 6. Creative Thinking: Ill-structured problems often require innovative approaches and thinking outside the box. Well-Structured Problem: In contrast, a well-structured problem is a clearly defined problem with a known set of steps and a specific solution. These problems have objective criteria, well-defined goals, and known problem-solving techniques. Well- structured problems are often encountered in technical or scientific domains where the rules and constraints are well-established. Characteristics of Well-Structured Problems: 1. Clarity: Well-structured problems have well-defined goals, criteria, and constraints. 2. Objective Criteria: The criteria for evaluating the solution are well-established and agreed upon. 3. Known Solution Paths: There are predefined problem-solving techniques or algorithms to solve the problem. 4. Limited Variables: The number of variables and their interdependencies are limited and defined. 5. Unambiguous: The problem and its requirements are clear and easily understood. 6. Convergent Thinking: Well-structured problems typically have a single correct solution. Knowledge representation using rules, semantic and frames. 1. Logical Representation Logical representation is a language with some concrete rules which deals with propositions and has no ambiguity in representation. Logical representation means drawing a conclusion based on various conditions. This representation lays down some important communication rules. It consists of precisely defined syntax and semantics which supports the sound inference. Each sentence can be translated into logics using syntax and semantics. Syntax: Example: 1 Let's take an example of a frame for a book Slots Filters Title Artificial Intelligence Genre Computer Science Author Peter Norvig Edition Third Edition Year 1996 Page 1152 Advantages of frame representation: 1. The frame knowledge representation makes the programming easier by grouping the related data. 2. The frame representation is comparably flexible and used by many applications in AI. 3. It is very easy to add slots for new attribute and relations. 4. It is easy to include default data and to search for missing values. 5. Frame representation is easy to understand and visualize. Disadvantages of frame representation: 1. In frame system inference mechanism is not be easily processed. 2. Inference mechanism cannot be smoothly proceeded by frame representation. 3. Frame representation has a much generalized approach. ML | Dempster Shafer Theory DST is an evidence theory, it combines all possible outcomes of the problem. Hence it is used to solve problems where there may be a chance that a piece of different evidence will lead to some different result Characteristics of Dempster Shafer Theory: • It will ignorance part such that the probability of all events aggregate to 1. (What is this supposed to mean?) • Ignorance is reduced in this theory by adding more and more evidence. • Combination rule is used to combine various types of possibilities. Advantages: • As we add more information, the uncertainty interval reduces. • DST has a much lower level of ignorance. • Diagnose hierarchies can be represented using this. • Person dealing with such problems is free to think about evidence. Disadvantages: • In this, computation effort is high, as we have to deal with 2n sets Fuzzy Logic | Introduction The term fuzzy refers to things that are not clear or are vague. In the real world many times we encounter a situation when we can’t determine whether the state is true or false, their fuzzy logic provides very valuable flexibility for reasoning. In this way, we can consider the inaccuracies and uncertainties of any situation. Fuzzy Logic is used in a wide range of applications, such as control systems, image processing, natural language processing, medical diagnosis, and artificial intelligence. ARCHITECTURE Its Architecture contains four parts : • RULE BASE: It contains the set of rules and the IF-THEN conditions provided by the experts to govern the decision-making system, on the basis of linguistic information. • FUZZIFICATION: It is used to convert inputs i.e. crisp numbers into fuzzy sets. Crisp inputs are basically the exact inputs measured by sensors and passed into the control system for processing, such as temperature, pressure, rpm’s, etc. • INFERENCE ENGINE: It determines the matching degree of the current fuzzy input with respect to each rule and decides which rules are to be fired according to the input field. Next, the fired rules are combined to form the control actions. • DEFUZZIFICATION: It is used to convert the fuzzy sets obtained by the inference engine into a crisp value. There are several defuzzification methods available and the best-suited one is used with a specific expert system to reduce the error. Advantages of Fuzzy Logic System • This system can work with any type of inputs. • The construction of Fuzzy Logic Systems is easy and understandable. • Fuzzy logic comes with mathematical concepts of set theory and the reasoning of that is quite simple. • It provides a very efficient solution to complex. • The algorithms can be described with little data, so little memory is required. Disadvantages of Fuzzy Logic Systems • There is no systematic approach to solve a given problem through fuzzy logic. • Proof of its characteristics is difficult or impossible in most cases • accuracy is compromised. Application • It is used in the aerospace field for altitude control of spacecraft and satellites. Difference between Forwarding Chaining and Backward Chaining: Forward Chaining Backward Chaining 1. When based on available data a decision is taken then the process is called as Forward chaining. Backward chaining starts from the goal and works backward to determine what facts must be asserted so that the goal can be achieved. 2. Forward chaining is known as data-driven technique because we reach to the goal using the available data. Backward chaining is known as goal- driven technique because we start from the goal and reaches the initial state to extract the facts. 3. It is a bottom-up approach. It is a top-down approach. 4. It applies the Breadth-First Strategy. It applies the Depth-First Strategy. 5. Its goal is to get the conclusion. Its goal is to get the possible facts or the required data. 6. Slow as it has to use all the rules. Fast as it has to use only a few rules. 7. It operates in forward direction i.e., it works from initial state to final decision. It operates in backward direction i.e it works from goal to reach initial state. What is planning? What is a Plan? For any planning system, we need the domain description, action specification, and goal description. A plan is assumed to be a sequence of actions and each action has its own set of preconditions to be satisfied before performing the action and also some effects which can be positive or negative. So, we have Forward State Space Planning (FSSP) and Backward State Space Planning (BSSP) at the basic level. 1. Forward State Space Planning (FSSP) FSSP behaves in a similar fashion like forward state space search. It says that given a start state S in any domain, we perform certain actions required and acquire a new state S’ (which includes some new conditions as well) which is called progress and this proceeds until we reach the goal state. The actions have to be applicable in this case. • Disadvantage: Large branching factor • Advantage: Algorithm is Sound 2. Backward State Space Planning (BSSP) BSSP behaves in a similar fashion like backward state space search. In this, we move from the goal state g towards sub-goal g’ that is finding the previous action to be done to achieve that respective goal. This process is called regression (moving back to the previous goal or sub-goal). These sub-goals have to be checked for consistency as well. The actions have to be relevant in this case. • Disadvantage: Not a sound algorithm (sometimes inconsistency can be found) • Advantage: Small branching factor (very small compared to FSSP) goal stack planning in ai in short: Goal stack planning is a planning technique in artificial intelligence that involves breaking down complex tasks into smaller sub-goals or sub-tasks, which are then represented as a stack of goals. The technique works by decomposing the overall goal into sub-goals, and then recursively decomposing each sub-goal into smaller sub-goals until the sub-goals can be achieved using primitive actions. The planner then executes the primitive actions in a bottom-up manner, starting from the lowest level sub-goals and gradually building up to the overall goal. This technique is useful in planning systems where the overall goal is complex and can be broken down into smaller, more manageable tasks. 1. Modularity: The technique allows for the decomposition of complex tasks into smaller, more manageable sub-tasks, making the planning process more modular and easier to manage. 2. Flexibility: The technique is flexible and can be used with a wide range of planning problems and domains. 3. Recursive Planning: The technique allows for recursive planning, where sub-goals can be further broken down into smaller sub-goals, until the planning problem can be solved using primitive actions. 4. Goal Prioritization: The technique allows for the prioritization of goals based on their importance, enabling planners to focus on achieving the most critical goals first. 5. Incremental Planning: The technique supports incremental planning, where the planner can start with a small set of goals and gradually add more goals to the stack as they are achieved. 6. Reusability: The technique allows for the reuse of planning solutions for similar problems, reducing the time and effort required to solve new planning problems. o RL solves a specific type of problem where decision making is sequential, and the goal is long-term, such as game-playing, robotics, etc. o The agent interacts with the environment and explores it by itself. The primary goal of an agent in reinforcement learning is to improve the performance by getting the maximum positive rewards. o The agent learns with the process of hit and trial, and based on the experience, it learns to perform the task in a better way. Hence, we can say that "Reinforcement learning is a type of machine learning method where an intelligent agent (computer program) interacts with the environment and learns to act within that." How a Robotic dog learns the movement of his arms is an example of Reinforcement learning. Types of Reinforcement: There are two types of Reinforcement: 1. Positive: Positive Reinforcement is defined as when an event, occurs due to a particular behavior, increases the strength and the frequency of the behavior. In other words, it has a positive effect on behavior. Advantages of reinforcement learning are: • Maximizes Performance • Sustain Change for a long period of time • Too much Reinforcement can lead to an overload of states which can diminish the results 2. Negative: Negative Reinforcement is defined as strengthening of behavior because a negative condition is stopped or avoided. Advantages of reinforcement learning: • Increases Behavior • Provide defiance to a minimum standard of performance • It Only provides enough to meet up the minimum behavior Elements of Reinforcement Learning Reinforcement learning elements are as follows: 1. Policy 2. Reward function 3. Value function 4. Model of the environment Advantages and Disadvantages of Reinforcement Learning Advantages of Reinforcement learning 1. Reinforcement learning can be used to solve very complex problems that cannot be solved by conventional techniques. 2. The model can correct the errors that occurred during the training process. 3. In RL, training data is obtained via the direct interaction of the agent with the environment 4. This is useful in real-world applications where the environment may change over time or is uncertain. 5. Reinforcement learning can be used to solve a wide range of problems, including those that involve decision making, control, and optimization. 6. Reinforcement learning is a flexible approach that can be combined with other machine learning techniques, such as deep learning, to improve performance. Disadvantages of Reinforcement learning 1. Reinforcement learning is not preferable to use for solving simple problems. 2. Reinforcement learning needs a lot of data and a lot of computation 3. Reinforcement learning is highly dependent on the quality of the reward function. If the reward function is poorly designed, the agent may not learn the desired behavior. 4. Reinforcement learning can be difficult to debug and interpret. Bn Differentiate Search & planning in ai in table Search Planning Goal To find a path or solution from the initial state to the goal state To generate a sequence of actions that will achieve a specific goal Input A problem space defined by an initial state, a set of possible actions, and a goal state A planning domain defined by a set of possible actions and their effects, an initial state, and a goal state Output A solution path or a sequence of actions that leads to the goal state A plan that consists of a sequence of actions that achieve the goal state Knowledge Usually domain-independent and relies on heuristic functions to guide the search process Domain-specific and includes knowledge about the structure of the problem and the effects of actions Examples Pathfinding, puzzle-solving, and game- playing algorithms Robotics, scheduling, and resource allocation systems What is Machine Learning? Machine learning is a subset of AI, which enables the machine to automatically learn from data, improve performance from past experiences, and make predictions. Machine learning contains a set of algorithms that work on a huge amount of data. Data 1. Complexity: Machine learning algorithms can be complex and difficult to understand, which can make it difficult for non-experts to use or interpret the results. 2. Data requirements: Machine learning algorithms require large amounts of data to train and be accurate, which can be difficult to collect and preprocess. 3. Biased data: Machine learning models are only as good as the data they are trained on, and if the data is biased, the model will also be biased. 4. Overfitting: Machine learning algorithms can be overfit to the training data, which means they will not perform well on new, unseen data. 5. Lack of transparency: Some machine learning models are considered black boxes, meaning it is difficult or impossible to understand how they arrived at a particular decision. 6. Privacy concerns: Machine learning models can process sensitive data that could be used to discriminate or make privacy-intrusive decisions if not used responsibly. What are K-Strips? K-Strips is an extension of the STRIPS (Stanford Research Institute Problem Solver) system for automated planning. The K-Strips system is designed to handle uncertainty and incomplete information in planning problems. The "K" in K-Strips stands for knowledge, as the system is based on the use of knowledge representation and reasoning techniques. In K-Strips, the knowledge base is represented using a logic-based formalism that allows for the representation of incomplete and uncertain information. The system uses a reasoning engine to manipulate the knowledge base and generate a plan of action. The reasoning engine uses a variety of techniques, including rule-based reasoning, fuzzy logic, and probabilistic reasoning, to handle uncertainty and incomplete information. One of the key features of K-Strips is its ability to represent and reason about alternative plans. The system can generate multiple plans that achieve the same goal and evaluate them based on various criteria, such as efficiency, safety, and cost. Expert Systems Artificial Intelligence is a piece of software that simulates the behaviour and judgement of a human or an organization that has experts in a particular domain is known as an expert system. It does this by acquiring relevant knowledge from its knowledge base and interpreting it according to the user’s problem. The data in the knowledge base is added by humans that are expert in a particular domain and this software is used by a non-expert user to acquire some information. It is widely used in many areas such as medical diagnosis, accounting, coding, games etc. Characteristics of an Expert System : • Human experts are perishable, but an expert system is permanent. • It helps to distribute the expertise of a human. • One expert system may contain knowledge from more than one human experts thus making the solutions more efficient. • It decreases the cost of consulting an expert for various domains such as medical diagnosis. • They use a knowledge base and inference engine. • Expert systems can solve complex problems by deducing new facts through existing facts of knowledge, represented mostly as if-then rules rather than through conventional procedural code. • Expert systems were among the first truly successful forms of artificial intelligence (AI) software. Limitations : • Do not have human-like decision-making power. • Cannot possess human capabilities. • Cannot produce correct result from less amount of knowledge. • Requires excessive training. Advantages : • Low accessibility cost. • Fast response. • Not affected by emotions, unlike humans. • Low error rate. • Capable of explaining how they reached a solution. Disadvantages : • The expert system has no emotions. • Common sense is the main issue of the expert system. • It is developed for a specific domain. • It needs to be updated manually. It does not learn itself. • Not capable to explain the logic behind the decision. Applications : The application of an expert system can be found in almost all areas of business or government. They include areas such as – • Different types of medical diagnosis like internal medicine, blood diseases and show on. • Diagnosis of the complex electronic and electromechanical system. • Diagnosis of a software development project. • Planning experiment in biology, chemistry and molecular genetics. • Forecasting crop damage. • Diagnosis of the diesel-electric locomotive system. • Identification of chemical compound structure. • Scheduling of customer order, computer resources and various manufacturing task. • Assessment of geologic structure from dip meter logs. • Assessment of space structure through satellite and robot. • The design of VLSI system. • Teaching students specialize task. • Assessment of log including civil case evaluation, product liability etc. What is frame based expert systems? A frame-based expert system is a type of rule-based expert system that represents knowledge using frames, which are hierarchical data structures that organize information Write in detail about the process of information extraction and Machine translation? Information Extraction (IE) and Machine Translation (MT) are two related fields in Natural Language Processing (NLP) that involve automatically processing and transforming natural language text into structured or translated information. Information Extraction: Information Extraction is the process of automatically extracting structured information from unstructured or semi-structured natural language text. The goal of IE is to identify and extract relevant information from text, such as entities, relationships, events, and attributes. The main steps in the IE process include: 1. Pre-processing: The text is first pre-processed by tokenizing, segmenting, and tagging the words to identify their parts of speech and syntactic structure. 2. Named Entity Recognition (NER): NER is used to identify and extract named entities, such as people, organizations, locations, and dates, from the text. 3. Relation Extraction: Once the named entities have been identified, relation extraction techniques are used to identify the relationships between them, such as the fact that a person works for an organization. 4. Event Extraction: Event extraction involves identifying events or actions that occur in the text, such as a company announcing a new product launch. 5. Output: The final output of the IE process is a structured representation of the relevant information extracted from the text, such as a database or knowledge graph. Machine Translation: Machine Translation is the process of automatically translating text from one language to another. The goal of MT is to produce translations that are accurate, fluent, and natural-sounding. The main steps in the MT process include: 1. Pre-processing: The source text is pre-processed by tokenizing, segmenting, and tagging the words to identify their parts of speech and syntactic structure. 2. Translation Model: The translation model is used to generate a set of possible translations for each input sentence. This model can be based on statistical methods or neural network models, such as the sequence-to-sequence model. 3. Decoding: Decoding is the process of selecting the best translation from the set of possible translations generated by the translation model. This is typically done using a scoring function that takes into account factors such as the fluency, accuracy, and relevance of the translation. 4. Output: The final output of the MT process is the translated text in the target language. Both IE and MT have their own challenges and limitations. IE can be challenging due to the complexity of natural language and the need to deal with ambiguous and context- dependent expressions. MT can be challenging due to the differences in syntax, grammar, and cultural nuances between languages, as well as the need to deal with idiomatic expressions and rare words. what is pattern analysis in ai explain with example. Pattern analysis in AI refers to the process of discovering and extracting meaningful patterns from large amounts of data. It involves using algorithms and statistical techniques to identify recurring structures, trends, or relationships within the data. By analyzing patterns, AI systems can gain insights, make predictions, or classify new data based on the learned patterns. Example: Let's consider an example of pattern analysis in AI applied to a dataset of customer transactions in an e-commerce company. The dataset contains information about customers' purchase history, including their demographics, products purchased, purchase dates, and amounts. The goal is to identify patterns or trends within the data that can help improve business operations, marketing strategies, or customer satisfaction. Here are a few examples of pattern analysis techniques that can be applied: 1. Market Basket Analysis: By analyzing the transactions, the AI system can identify frequently co-occurring items in customers' purchases. For instance, it may discover that customers who purchase diapers also tend to buy baby wipes. This information can be used to optimize product placement or to offer personalized recommendations to customers. 2. Customer Segmentation: By examining the demographic information and purchase behavior, the AI system can identify distinct customer segments. For example, it may discover that younger customers tend to purchase electronics, while older customers prefer home appliances. This segmentation can help tailor marketing campaigns or develop targeted product offerings. What is the need of pop algorithm. The term "POP algorithm" is not a widely recognized term in the field of AI or computer science. It could refer to a specific algorithm that is not well-known or commonly used. Therefore, I cannot provide specific information on the need or purpose of the "POP algorithm." However, in general, algorithms are developed to solve specific problems or perform specific tasks efficiently and effectively. The need for an algorithm arises when there is a requirement to automate a process, make predictions, analyze data, optimize resource allocation, or solve a particular computational problem. Algorithms play a crucial role in AI and various other fields. They enable machines to process data, learn from it, make decisions, and perform tasks that would be challenging or time-consuming for humans to do manually. Algorithms form the backbone of AI systems and help in tasks such as image recognition, natural language processing, recommendation systems, optimization problems, and more. discuss in details about ensemble learning and distributed learning Ensemble Learning: Ensemble learning is a machine learning technique that combines the predictions of multiple individual models, called base learners or weak learners, to make a final prediction. The idea behind ensemble learning is that by aggregating the predictions of multiple models, the overall prediction can be more accurate and robust than that of any individual model. Ensemble learning can be categorized into two main types: 1. Bagging (Bootstrap Aggregating): Bagging involves training multiple base learners independently on different subsets of the training data. Each base learner is trained using a random subset of the original training set, created through sampling with replacement (bootstrap sampling). Bagging helps to reduce the variance of the individual models and improve the overall performance. Examples of bagging techniques include Random Forests, where decision trees are the base learners, and Extra Trees, which further randomizes the construction of decision trees. 2. Boosting: Boosting algorithms, such as AdaBoost, Gradient Boosting sequentially train multiple weak learners. Each weak learner is trained to correct the mistakes made by the previous weak learners. Boosting focuses on improving the overall model by giving more weight to misclassified instances, thereby reducing bias. The final prediction is a weighted combination of all the weak learners.