Open In App

Inductive Learning Algorithm

Last Updated : 05 May, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will learn about Inductive Learning Algorithm which generally comes under the domain of Machine Learning.

What is Inductive Learning Algorithm?

Inductive Learning Algorithm (ILA) is an iterative and inductive machine learning algorithm that is used for generating a set of classification rules, which produces rules of the form “IF-THEN”, for a set of examples, producing rules at each iteration and appending to the set of rules.

There are basically two methods for knowledge extraction firstly from domain experts and then with machine learning. For a very large amount of data, the domain experts are not very useful and reliable. So we move towards the machine learning approach for this work. To use machine learning One method is to replicate the expert’s logic in the form of algorithms but this work is very tedious, time taking, and expensive. So we move towards the inductive algorithms which generate the strategy for performing a task and need not instruct separately at each step.

Why you should use Inductive Learning?

The ILA is a new algorithm that was needed even when other reinforcement learnings like ID3 and AQ were available.

  • The need was due to the pitfalls which were present in the previous algorithms, one of the major pitfalls was the lack of generalization of rules.
  • The ID3 and AQ used the decision tree production method which was too specific which were difficult to analyze and very slow to perform for basic short classification problems.
  • The decision tree-based algorithm was unable to work for a new problem if some attributes are missing.
  • The ILA uses the method of production of a general set of rules instead of decision trees, which overcomes the above problems

Basic Requirements to Apply Inductive Learning Algorithm

  1. List the examples in the form of a table ‘T’ where each row corresponds to an example and each column contains an attribute value.
  2. Create a set of m training examples, each example composed of k attributes and a class attribute with n possible decisions.
  3. Create a rule set, R, having the initial value false.
  4. Initially, all rows in the table are unmarked.

Necessary Steps for Implementation

  • Step 1: divide the table ‘T’ containing m examples into n sub-tables (t1, t2,…..tn). One table for each possible value of the class attribute. (repeat steps 2-8 for each sub-table)
  • Step 2: Initialize the attribute combination count ‘ j ‘ = 1.
  • Step 3: For the sub-table on which work is going on, divide the attribute list into distinct combinations, each combination with ‘j ‘ distinct attributes.
  • Step 4: For each combination of attributes, count the number of occurrences of attribute values that appear under the same combination of attributes in unmarked rows of the sub-table under consideration, and at the same time, not appears under the same combination of attributes of other sub-tables. Call the first combination with the maximum number of occurrences the max-combination ‘ MAX’.
  • Step 5: If ‘MAX’ == null, increase ‘ j ‘ by 1 and go to Step 3.
  • Step 6: Mark all rows of the sub-table where working, in which the values of ‘MAX’ appear, as classified.
  • Step 7: Add a rule (IF attribute = “XYZ” –> THEN decision is YES/ NO) to R whose left-hand side will have attribute names of the ‘MAX’ with their values separated by AND, and its right-hand side contains the decision attribute value associated with the sub-table.
  • Step 8: If all rows are marked as classified, then move on to process another sub-table and go to Step 2. Else, go to Step 4. If no sub-tables are available, exit with the set of rules obtained till then. 

An example showing the use of ILA suppose an example set having attributes Place type, weather, location, decision, and seven examples, our task is to generate a set of rules that under what condition is the decision.

Example no.

Place type

weather

location

decision

1.

hilly

winter

kullu

Yes

2.

mountain

windy

Mumbai

No

3.

mountain

windy

Shimla

Yes

4.

beach

windy

Mumbai

No

5.

beach

warm

goa

Yes

6.

beach

windy

goa

No

7.

beach

warm

Shimla

Yes

Subset – 1

s.no

place type

weather

location

decision

1.

hilly

winter

kullu

Yes

2.

mountain

windy

Shimla

Yes

3.

beach

warm

goa

Yes

4.

beach

warm

Shimla

Yes

Subset – 2

s.no

place type

weather

location

decision

5.

mountain

windy

Mumbai

No

6.

beach

windy

Mumbai

No

7.

beach

windy

goa

No

  • At iteration 1 rows 3 & 4 column weather is selected and rows 3 & 4 are marked. the rule is added to R IF the weather is warm then a decision is yes. 
  • At iteration 2 row 1 column place type is selected and row 1 is marked. the rule is added to R IF the place type is hilly then the decision is yes. 
  • At iteration 3 row 2 column location is selected and row 2 is marked. the rule is added to R IF the location is Shimla then the decision is yes. 
  • At iteration 4 row 5&6 column location is selected and row 5&6 are marked. the rule is added to R IF the location is Mumbai then a decision is no. 
  • At iteration 5 row 7 column place type & the weather is selected and row 7 is marked. the rule is added to R IF the place type is beach AND the weather is windy then the decision is no. 

Finally, we get the rule set:- Rule Set

  • Rule 1: IF the weather is warm THEN the decision is yes.
  • Rule 2: IF the place type is hilly THEN the decision is yes.
  • Rule 3: IF the location is Shimla THEN the decision is yes.
  • Rule 4: IF the location is Mumbai THEN the decision is no.
  • Rule 5: IF the place type is beach AND the weather is windy THEN the decision is no.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads