Institute Vision and Mission Vision: PEO1: PEO2: PEO3
Institute Vision and Mission Vision: PEO1: PEO2: PEO3
Institute Vision and Mission Vision: PEO1: PEO2: PEO3
Mission
To impart Quality Technical Education and to undertake Research and Development with a focus on
application and innovation which offers an appropriate solution to the emerging societal needs by
making the students globally competitive, morally valuable and socially responsible citizens.
Vision
To emerge as a center of excellence with global reputation with adaption of rapid advancements in the
field of computer specialization.
Mission
1. To provide a strong theoretical and practical background in area of computer science with an
emphasize on software development.
3. To educate students to become effective problem solvers, apply knowledge with social sensitivity
for the betterment of the society and humanity as a whole.
Programme educational objectives are broad statements that describe the career and professional
accomplishments that the programme is preparing graduates to achieve within 3 to 5 years after
graduation.
PEO1: To apply the knowledge of mathematics, basic science and engineering solving the real
world computing problems to succeed higher education and professional careers.
PEO2: To develop the skills required to comprehend, analyze, design and create innovative
computing products and solutions for real life problems.
PEO3: To inculcate professional and ethical attitude, communication and teamwork skills, multi-
disciplinary approach and an ability to relate computer engineering issues with social awareness.
LABORATORY OUTCOMES:
CO[3] : To develop the algorithms used for various types of Data Mining Problem.
CO[4] : Students will be able to construct algorithms to solve data mining problems using weka tool.
CO[5] : Students will be able to demonstrate the classification and clusters Techniques in large
datasets.
CO[6] : Students will be able to build an ability to add mining algorithms as a component to the
existing tools.
Do’s
1. Come with completed observation and record
3. Know the location of the fire extinguisher and the first aid box and how to use them in case of an emergency.
4. Read and understand how to carry out an activity thoroughly before coming to the laboratory.
5. Report any broken plugs or exposed electrical wires to your lecturer/laboratory technician immediately.
6. Write in time, out time and system details in the login register.
Don’ts
1. Do not eat or drink in the laboratory.
2. Do not operate mobile phones in the lab. Keep mobile phones either in silent or switched off mode.
4. Do not disturb your neighbouring students. They may be busy in completing tasks.
7. Do not misbehave.
INDEX
Page
Sno S.No. LIST OF EXPERIMENTS
No.
List all the categorical (or nominal) attributes and the real-valued attributes 7
1
separately.
What attributes do you think might be crucial in making the credit assessment? 9
2
Come up with some simple rules in plain English using your selected attributes.
One type of model that you can create is a Decision Tree -train a Decision Tree 14
3 using the complete dataset as the training data. Report the model obtained after
training.
Suppose you use your above model trained on the complete dataset, and classify 16
credit good/bad for each of the examples in the dataset. What % of examples can
4
you classify correctly? (This is also called testing on the training set) Why do you
5 Is testing on the training set as you did above a good idea? Why or Why not? 20
One approach for solving the problem encountered in the previous question is using 21
increase/decrease? Why?
7 Check to see if the data shows a bias against "foreign workers" (attribute 20), or 226
"personal
-status" (attribute 9). One way to do this (perhaps rather simple minded) is to
remove these attributes from the dataset and see if the decision tree created in those
cases is significantly different from the full dataset case which you have already
done. To remove an attribute you can use the preprocess tab in Weka's GUI
Explorer. Did removing these attributes have any significant effect? Discuss.
8 Another question might be, do you really need to input so many attributes to get 327
good results? Maybe only a few would do. For example, you could try just having
attributes 2, 3, 5, 7, 10, 17 (and 21, the class attribute (naturally)). Try out some
the arff data file to get all the attributes initially before you start selecting the ones.
9 Sometimes, the cost of rejecting an applicant who actually has a good credit (case 29
1) might be higher than accepting an applicant who has bad credit (case 2). Instead
of counting the misclassifications equally in both cases, give a higher cost to the
first case (say cost 5) and lower cost to the second case. You can do this by using a
cost matrix in Weka. Train your Decision Tree again and report the Decision Tree
and cross -validation results. Are they significantly different from results obtained
10 Do you think it is a good idea to prefer simple decision trees instead of having long 34
complex decision trees? How does the complexity of a Decision Tree relate to the
11 You can make your Decision Trees simpler by pruning the nodes. one approach is 336
to use Reduced Error Pruning -Explain this idea briefly. Try reduced error pruning
for training your Decision Trees using cross -validation (you can do this in Weka)
and report the Decision Tree you obtain? Also, report your accuracy using the
12 (Extra Credit): How can you convert a Decision Trees into "if –then -else rules". 38
Make up your own small Decision Tree consisting of 2 - 3 levels and convert it into
a set of rules. There also exist different classifiers that output the model in the form
of rules -one such classifier in Weka is rules. PART, train this model and report the
set of rules obtained. Sometimes just one attribute can be good enough in making
the decision, yes, just one! Can you predict what attribute that might be in this
dataset? OneR classifier uses a single attribute to make decisions (it chooses the
attribute based on minimum error). Report the rule obtained by training a one R
2. Books. Find some training manuals for loan officers or perhaps a suitable textbook on finance.
Translate this knowledge from text form to production rule form.
3. Common sense. Imagine yourself as a loan officer and make up reasonable rules which can be
used to judge the credit worthiness of a loan applicant.
4. Case histories. Find records of actual cases where competent loan officers correctly judged
when not to, approve a loan application.
WEEK 1:
List all the categorical (or nominal) attributes and the real-valued attributes separately.
AIM: To separate the nominal attributes and also the real valued attributes by using the weka tool.
THEORY:
There are 20 attributes used in judging a loan applicant. The goal is the classify the applicant into
one of two categories, good or bad.
Subtasks: (Turn in your answers to the following tasks.
PROCEDURE:
1) Open the Weka GUI Chooser.
4) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
5) Clicking on any attribute in the left panel will show the basic statistics on that selected
attribute.
A data warehouse is a electronic storage of an Organization's historical data for the purpose of
reporting, analysis and data mining or knowledge discovery.
A data warehouse helps to integrate data and store them historically so that we can analyze different
aspects of business including, performance analysis, trend, prediction etc. over a given time frame and
use the result of our analysis to improve the efficiency of business processes.
3. What is Fact?
A fact is something that is quantifiable (Or measurable). Facts are typically (but not always)
numerical values that can be aggregated.
WEEK 2:
Which attributes do you think might be crucial in making the credit assessment? Come up
with some simple rules in plain English using your selected attributes.
AIM: To select interesting rules from the set of all possible rules, constraints on various
measures of significance and interest can be used. The best known constraints are minimum
thresholds on support and confidence. The support supp(X) of an itemset X is defined as the
proportion of transactions in the data set which contain the itemset. In the example database, the
itemset {milk, bread} has a support of 2 / 5 = 0.4 since it occurs in 40% of all transactions (2 out
of 5 transactions).
THEORY:
Association rule mining is defined as: Let be a set of n binary attributes called items. Let
be a set of transactions called the database. Each transaction in D has a unique transaction ID and
contains a subset of the items in I. A rule is defined as an implication of the form X=>Y where
X,Y C I and X Π Y=Φ . The sets of items (for short itemsets) X and Y are called antecedent (left
hand side or LHS) and consequent (right hand side or RHS) of the rule respectively.
To illustrate the concepts, we use a small example from the supermarket domain.
The set of items is I = {milk,bread,butter,beer} and a small database containing the items (1
codes presence and 0 absence of an item in a transaction) is shown in the table to the right. An
example rule for the supermarket could be meaning that if milk and bread is bought, customers
also buy butter.
Note: this example is extremely small. In practical applications, a rule needs a support of several
hundred transactions before it can be considered statistically significant, and datasets often
contain thousands or millions of transactions.
To select interesting rules from the set of all possible rules, constraints on various measures of
significance and interest can be used. The best known constraints are minimum thresholds on
support and confidence. The support supp(X) of an itemset X is defined as the proportion of
transactions in the data set which contain the itemset. In the example database, the itemset {milk,
bread} has a support of 2 / 5 = 0.4 since it occurs in 40% of all transactions (2 out of 5
transactions).
The confidence of a rule is defined. For example, the rule has a confidence of 0.2 / 0.4 = 0.5 in
the database, which means that for 50% of the transactions containing milk and bread the rule is
correct. Confidence can be interpreted as an estimate of the probability P(Y | X), the probability
of finding the RHS of the rule in transactions under the condition that these transactions also
contain the LHS.
ALGORITHM:
Association rule mining is to find out association rules that satisfy the predefined minimum
support and confidence from a given database. The problem is usually decomposed into two sub
problems. One is to find those itemsets whose occurrences exceed a predefined threshold in the
database; those itemsets are called frequent or large itemsets. The second problem is to generate
association rules from those large itemsets with the constraints of minimal confidence.
Suppose one of the large itemsets is Lk, Lk = {I1, I2, … , Ik}, association rules with this itemsets
are generated in the following way: the first rule is {I1, I2, … , Ik1} and {Ik}, by checking the
confidence this rule can be determined as interesting or not.
Then other rule are generated by deleting the last items in the antecedent and inserting it to the
consequent, further the confidences of the new rules are checked to determine the interestingness
of them. Those processes iterated until the antecedent becomes empty.
Since the second subproblem is quite straight forward, most of the researches focus on the first
subproblem.
C(t)Subset(Ck,t)
for candidates c € C(t)
count[c]<count[ c]+1
L(k)<{ c € C(k)| count[c] ≥ £
K<K+ 1
return Ụ L(k) k.
PROCEDURE:
1) Given the Bank database for mining.
5) Go to Associate Tab.
1. What is the difference between dependent data warehouse and independent data
warehouse?
There is a third type of Datamart called Hybrid. The Hybrid datamart having source data
from Operational systems or external files and central Datawarehouse as well. I will definitely
check for Dependent and Independent Datawarehouses and update.
Association algorithm is used for recommendation engine that is based on a market based
analysis. This engine suggests products to customers based on what they bought earlier. The
model is built on a dataset containing identifiers. These identifiers are both for individual cases
and for the items that cases contain. These groups of items in a data set are called as an item set.
The algorithm traverses a data set to find items that appear in a case. MINIMUM_SUPPORT
parameter is used any associated items that appear into an item set.
WEEK 3:
One type of model that you can create is a decision tree. Train a decision tree using the complete
dataset as the training data. Report the model obtained after training.
AIM: Implementing the decision tree analysis and the training data in the data set.
THEORY:
Classification is a data mining function that assigns items in a collection to target categories or
classes. The goal of classification is to accurately predict the target class for each case in the
data. For example, a classification model could be used to identify loan applicants as low,
medium, or high credit risks. A classification task begins with a data set in which the class
assignments are known. For example, a classification model that predicts credit risk could be
developed based on observed data for many loan applicants over a period of time.
In addition to the historical credit rating, the data might track employment history, home
ownership or rental, years of residence, number and type of investments, and so on. Credit rating
would be the target, the other attributes would be the predictors, and the data for each customer
would constitute a case.
Classifications are discrete and do not imply order. Continuous, floating point values would
indicate a numerical, rather than a categorical, target. A predictive model with a numerical target
uses a regression algorithm, not a classification algorithm. The simplest type of classification
problem is binary classification. In binary classification, the target attribute has only two possible
values: for example, high credit rating or low credit rating. Multiclass targets have more than two
values: for example, low, medium, high, or unknown credit rating. In the model build (training)
process, a classification algorithm finds relationships between the values of the predictors and
the values of the target. Different classification algorithms use different techniques for finding
relationships. These relationships are summarized in a model, which can then be applied to a
different data set in which the class assignments are unknown
Different Classification Algorithms: Oracle Data Mining provides the following algorithms for
classification:
Decision Tree - Decision trees automatically generate rules, which are conditional
statements that reveal the logic used to build the tree.
Naive Bayes - Naive Bayes uses Bayes' Theorem, a formula that calculates a probability
by counting the frequency of values and combinations of values in the historical data.
PROCEDURE:
1) Open Weka GUI Chooser.
4) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
5) Go to Classify tab.
6) Here the c4.5 algorithm has been chosen which is entitled as j48 in Java and can be
selected by clicking the button choose and select tree j48 .
9) Click Start.
10) Now we can see the output details in the Classifier output.
11) Right click on the result list and select “visualize tree”option .
A decision tree is a tree in which every node is either a leaf node or a decision node.
This tree takes an input an object and outputs some decision. All Paths from root node to the leaf
node are reached by either using AND or OR or BOTH. The tree is constructed using the
regularities of the data. The decision tree is not affected by Automatic Data Preparation.
Agriculture, biological data analysis, call record analysis, DSS, Business intelligence
system etc.
WEEK- 4:
Suppose you use your above model trained on the complete dataset, and classify credit
good/bad for each of the examples in the dataset. What % of examples can you classify
correctly? (This is also called testing on the training set) Why do you think you cannot get 100 %
training accuracy?
AIM: Determining and classifying the credit good or bad in the dataset with an Accuracy.
THEORY:
Naive Bayes classifier assumes that the presence (or absence) of a particular feature of a class is
unrelated to the presence (or absence) of any other feature. For example, a fruit may be
considered to be an apple if it is red, round, and about 4" in diameter. Even though these features
depend on the existence of the other features, a naive Bayes classifier considers all of these
properties to independently contribute to the probability that this fruit is an apple.
An advantage of the naive Bayes classifier is that it requires a small amount of training data to
estimate the parameters (means and variances of the variables) necessary for classification.
Because independent variables are assumed, only the variances of the variables for each class
need to be determined and not the entire covariance matrix The naive Bayes probabilistic model :
Now the "naive" conditional independence assumptions come into play: assume that each
feature Fi is conditionally independent of every other feature Fj .
This means that under the above independence assumptions, the conditional distribution over
the class variable C can be expressed like this:
PROCEDURE:
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
6) Go to Classify tab.
12) Now we can see the output details in the Classifier output.
Naïve Bayes Algorithm is used to generate mining models. These models help to identify
relationships between input columns and the predictable columns. This algorithm can be used in
the initial stage of exploration. The algorithm calculates the probability of every state of each
input column given predictable columns possible states. After the model is made, the results can
be used for exploration and making predictions.
Distributed data warehouse shares data across multiple data repositories for the purpose of
OLAP operation.
Data marts
WEEK 5:
Is testing on the training set as you did above a good idea? Why or Why not?
AIM: Testing the training set is it necessary to analyze the data.
THEORY: Comparing the "Correctly Classified Instances" from this test set with the "Correctly
Classified Instances" from the training set, we see the accuracy of the model, which indicates
that the model will not break down with unknown data, or when future data is applied to it.
PROCEDURE:
1) In Test options, select the Supplied test set radio button
2) Click Set
3) Choose the file which contains records that were not in the training set we used to create
the model.
4) Click Start(WEKA will run this test data set through the model we already created. )
Agriculture, biological data analysis, call record analysis, DSS, Business intelligence system etc
A virtual data warehouse provides a compact view of the data inventory. It contains meta
data and uses middle-ware to establish connection between different data sources.
WEEK 6:
One approach for solving the problem encountered in the previous question is using
cross-validation? Describe what is cross -validation briefly. Train a Decision Tree again using
cross - validation and report your results. Does your accuracy increase/decrease? Why?
AIM: To test the cross validation while analyzing the data.
THEORY:
Decision tree learning, used in data mining and machine learning, uses a decision tree as a
predictive model which maps observations about an item to conclusions about the item's target
value In these tree structures, leaves represent classifications and branches represent
conjunctions of features that lead to those classifications. In decision analysis, a decision tree can
be used to visually and explicitly represent decisions and decision making. In data mining, a
decision tree describes data but not decisions; rather the resulting classification tree can be an
input for decision making. This page deals with decision trees in data mining.
Decision tree learning is a common method used in data mining. The goal is to create a model
that predicts the value of a target variable based on several input variables. Each interior node
corresponds to one of the input variables; there are edges to children for each of the possible
values of that input variable.
Each leaf represents a value of the target variable given the values of the input variables
represented by the path from the root to the leaf.
A tree can be "learned" by splitting the source set into subsets based on an attribute value test.
This process is repeated on each derived subset in a recursive manner called recursive
partitioning. The recursion is completed when the subset at a node all has the same value of the
target variable, or when splitting no longer adds value to the predictions.
In data mining, trees can be described also as the combination of mathematical and
computational techniques to aid the description, categorization and generalization of a given set
of data.
PROCEDURE:
1) Given the Bank database for mining.
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
Go to Classify tab.
7) Select J48
Middle cuboids
WEEK 7:
Check to see if the data shows a bias against "foreign workers" (attribute 20), or
"personal -status" (attribute 9). One way to do this (perhaps rather simple minded) is to remove
these attributes from the dataset and see if the decision tree created in those cases is significantly
different from the full dataset case which you have already done. To remove an attribute you can
use the preprocess tab in Weka's GUI Explorer. Did removing these attributes have any
significant effect? Discuss.
AIM: Analyzing the removing attributes from the dataset.
THEORY: Decision tree learning is a common method used in data mining. The goal is to
create a model that predicts the value of a target variable based on several input variables. Each
interior node corresponds to one of the input variables; there are edges to children for each of the
possible values of that input variable.
PROCEDURE:
1) Given the Bank database for mining.
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
6) In the "Filter" panel, click on the "Choose" button. This will show a popup window
with list available filters.
7) Select “weka.filters.unsupervised.attribute.Remove”
8) Next, click on text box immediately to the right of the "Choose" button
9) In the resulting dialog box enter the index of the attribute to be filtered out (Make sure
that the "invert Selection" option is set to false )
10) Then click "OK" . Now, in the filter box you will see "Remove -R 1"
11) Click the "Apply" button to apply this filter to the data. This will remove the "id"
attribute and create a new working relation
12) To save the new working relation as an ARFF file, click on save button in the top panel.
13) Go to OPEN file and browse the file that is newly saved (attribute deleted file)
20) Now we can see the output details in the Classifier output.
21) Right click on the result list and select ” visualize tree “option .
22) Compare the output results with that of the 4th experiment
24) Check whether removing these attributes have any significant effect.
A decision tree is an hierarchically based classifier which compares data with a range of
properly selected features.
Multimedia Data Mining is a subfield of data mining that deals with an extraction of
implicit knowledge, multimedia data relationships, or other patterns not explicitly stored in
multimedia databases
Text mining is the procedure of synthesizing information, by analyzing relations, patterns, and
rules among textual data. These procedures contains text summarization, text categorization, and
text clustering.
WEEK 8
Another question might be, do you really need to input so many attributes to get good results?
Maybe only a few would do. For example, you could try just having attributes 2, 3, 5, 7, 10, 17
(and 21, the class attribute (naturally)). Try out some combinations. (You had removed two
attributes in problem 7. Remember to reload the arff data file to get all the attributes initially
before you start selecting the ones you want).
AIM: To removing the selected attributes and also to reload the arff data file to get all the
attributes in the data set.
PROCEDURE:
1) Given the Bank database for mining.
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
6) Select some of the attributes from attributes list which are to be removed. With this
step only the attributes necessary for classification are left in the attributes panel.
9) Select j48
13) Now we can see the output details in the Classifier output.
14) Right click on the result list and select “visualize tree” option.
15) Compare the output results with that of the 4th experiment.
17) Check whether removing these attributes have any significant effect.
WEEK 9:
Sometimes, the cost of rejecting an applicant who actually has a good credit (case 1)
might be higher than accepting an applicant who has bad credit (case 2). Instead of counting the
misclassifications equally in both cases, give a higher cost to the first case (say cost 5) and lower
cost to the second case. You can do this by using a cost matrix in Weka. Train your Decision
Tree again and report the Decision Tree and cross -validation results. Are they significantly
different from results obtained in problem 6 (using equal cost)?
AIM: Determining the good credit and the bad credit in the decision tree dataset.
PROCEDURE:
1) Given the Bank database for mining.
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
6) Go to Classify tab.
8) Select j48
12) Set the matrix values and click on resize. Then close the window.
19) Now we can see the output details in the Classifier output.
1. Define KDD.
2. Define metadata.
A database that describes various aspects of data in the warehouse is called metadata.
WEEK 10:
Do you think it is a good idea to prefer simple decision trees instead of having long complex
decision trees? How does the complexity of a Decision Tree relate to the bias of the model?
AIM: Analyzing the decision tree into the shortest form by using the dataset.
PROCEDURE:
This will be based on the attribute set, and the requirement of relationship among attribute
we want to study. This can be viewed based on the database and user requirement.
WEEK 11:
You can make your Decision Trees simpler by pruning the nodes. one approach is to use
Reduced Error Pruning -Explain this idea briefly. Try reduced error pruning for training your
Decision Trees using cross -validation (you can do this in Weka) and report the Decision Tree
you obtain? Also, report your accuracy using the pruned model. Does your accuracy increase?
AIM: Analyzing the decision trees is simpler by pruning the nodes in the dataset.
THEORY:
Reduced-error pruning
• Assigning the pruned node the most common classification of the training instances
attached to that node
Pruning nodes iteratively
• Always select a node whose removal most increases the DT accuracy over the validation set
• Stop when further pruning decreases the DT accuracy over the validation set
IF (Children=yes) Λ (income=>30000)
THEN (car=Yes)
PROCEDURE:
1) Given the Bank database for mining.
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
7) Go to Classify tab.
11) Right click on the text box besides choose button, select show properties
16) Now we can see the output details in the Classifier output.
17) Right click on the result list and select ” visualize tree “option.
K-mediods is more robust than k-mean in presence of noise and outliers. K-Mediods can
be computationally costly.
Relational database
Data warehouse
Transactional database.
Clustering algorithm is used to group sets of data with similar characteristics also called
as clusters. These clusters help in making faster decisions, and exploring data. The
algorithm first identifies relationships in a dataset following which it generates a series of
clusters based on the relationships. The process of creating clusters is iterative. The
algorithm redefines the groupings to create clusters that better represent the data.
WEEK 12:
(Extra Credit): How can you convert a Decision Trees into "if –then -else rules". Make up your
own small Decision Tree consisting of 2 - 3 levels and convert it into a set of rules. There also
exist different classifiers that output the model in the form of rules -one such classifier in Weka
is rules. PART, train this model and report the set of rules obtained. Sometimes just one attribute
can be good enough in making the decision, yes, just one! Can you predict what attribute that
might be in this dataset? OneR classifier uses a single attribute to make decisions (it chooses the
attribute based on minimum error). Report the rule obtained by training a one R classifier. Rank
the performance of j48, PART and OneR.
AIM: Converting the decision tree to the different set of rules based on the different levels in the
dataset.
PROCEDURE:
1) Given the Bank database for mining.
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
7) Go to Classify tab.
9) Select “J48”.
13) Now we can see the output details in the Classifier output.
14) Right click on the result list and select ” visualize tree “option .
5) Go to OPEN file and browse the file that is already stored in the system “bank.csv”.
7) Go to Classify tab.
9) Select “OneR”.
13) Now we can see the output details in the Classifier output.
5) Go to OPEN file and browse the file that is already stored in the system
“bank.csv”.
7) Go to Classify tab.
9) Select “PART”.
13) Now we can see the output details in the Classifier output.
VIVA QUESTIONS:
Distributed data warehouse shares data across multiple data repositories for the purpose
of OLAP operation