You are on page 1of 4

COMSATS University Islamabad

Sahiwal Campus
(Department of Computer Science)
Course Credit
Course Title Machine Learning CSC 354 3 (3,0)
Code Hours
Course Dr. Muhammad Farhan Program BSSE
Semester 7th Submission Date: 21-10-2022
Student’s Section:
ESHA MARYAM Reg. No. CUI/ FA19-BSE-086 /SWL
Name

Assignment # 1

Explain the following machine-learning algorithms

Inferring rudimentary rules


 1R: learns a 1-level decision tree
In other words, generates a set of rules that all teston one attribute
 Basic version (assuming nominal attributes)
 One branch for each of the attribute’s values
 Each branch assigns the most frequent class
 Error rate: proportion of instances that don’t belong to the majority class of their
corresponding branch
 Choose the attribute with the lowest error rate

Simple probabilistic modelling


 Opposite” of 1R: use all the attributes
 Two assumptions: Attributes are
1. equally important
2. statistically independent (given the class value)
 Independence assumption is almost never correct!
 But … this scheme often works surprisingly well in practice
 The scheme is easy to implement in a program and very fast
 It is known as naïve Bayes
Constructing decision trees
• Strategy: top-down learning using a recursive divide-and-conquer process
• First: select an attribute for the root node
Create a branch for each possible attribute value
• Then: split instances into subsets
One for each branch extending from the node
• Finally: repeat recursively for each branch, using only instances that
reach the branch
• Stop if all instances have the same class
Constructing rules
 Can convert decision tree into a rule set
• Straightforward, but ruleset overly complex
• More effective conversions are not trivial and may incur a lot of
computation
• Instead, we can generate a rule set directly. One approach for each class, in turn, find
a rule set that covers all instances in it
• Called a covering approach: At each stage of the algorithm, a rule is identified that
“covers” some of the instances
• But: rule sets can be more perspicuous when decision trees suffer from replicated
subtrees
• Also: in multiclass situations, the covering algorithm concentrates on one class at a
time whereas the decision tree learner takes all classes into account

Association rule learning


• Above method makes one pass through the data for each different item set size
• Another possibility: generate (k+2)-item sets just after (k+1)-item sets
have been generated
• Result: more candidate (k+2)-item sets than necessary will be
generated but this requires fewer passes through the data
• Makes sense if data too large for main memory
• Practical issue: support level for generating a certain minimum number of rules for a
particular dataset
• This can be done by running the whole algorithm multiple times with
different minimum support levels
• Support level is decreased until enough rules have been found

Linear models
Linear models are hyperplanes, the perceptron, winnow.
 Work most naturally with numeric attributes
 Standard technique for numeric prediction
 Outcome is a linear combination of attributes

 Weights are calculated from the training data


 The predicted value for first training instance a(1)

Instance-based learning
• In instance-based learning the distance function defines what is learned
• Most instance-based schemes use Euclidean distance:

• a(1) and a(2): two instances with k attributes


• Note that taking the square root is not required when comparing distances
• Other popular metrics: city-block metric
• Adds differences without squaring them

Clustering
• Clustering techniques apply when there is no class to be predicted: they perform
unsupervised learning
• Aim: divide instances into “natural” groups
• As we have seen, clusters can be:
• disjoint vs. overlapping
• deterministic vs. probabilistic
• flat vs. hierarchical
• We will look at a classic clustering algorithm called k-means
• k-means clusters are disjoint, deterministic, and flat

Multi-instance learning
• Recap: multi-instance learning is concerned with examples corresponding to sets
(really, bags or multi-sets) of instances
• All instances have the same attributes, but the full set of instances is split into
subsets of related instances that are not necessarily independent
• These subsets are the examples for learning
• Example applications of multi-instance learning: image classification, classification
of molecules
• Simplicity-first methodology can be applied to multi-instance learning with
surprisingly good results
• Two simple approaches to multi-instance learning, both using standard single-
instance learners:
• Manipulate the input to learning
• Manipulate the output of learning

You might also like