CSC581 Homepage
Topics in AI: Introduction to Machine Learning with Support Vector Machines
Spring 2018
Instructor:
Dr. Lutz Hamel
Tyler, Rm 251
Office Hours: Tuesday 23pm and Thursday 11amnoon
email: hamel@cs.uri.edu
Description:
Support vector machines (SVMs) belong to a new class of machine learning
algorithms with their origins firmly rooted in statistical learning theory. Due
to the strong theoretical foundation these algorithms possess desirable
properties such as the ability to learn from very small sample sets and a firm
estimation of the generalization capacity of the learned model. These
properties make this new class of learning algorithms extremely attractive to
the practitioner who is frequently faced with "not enough data" and needs to
understand "how good a constructed model" actually is. The fact that SVMs have
surpassed the performance of artificial neural networks in many areas such as
text categorization, speech recognition and bioinformatics bears witness to the
power of this class of learning algorithms.
This course is an introduction to machine learning and SVMs. We begin by
framing the notion of machine learning and then develop basic concepts such as
hyperplanes, features spaces and kernels necessary for the construction of SVMs.
Once the theoretical groundwork has been laid we look at practical examples
where this class of algorithms can been applied. Here we use machine learning as
a knowledge discovery tool. We will use the statistical computing environment R
for our experiments.
The goals of this course are for you,
 To have a basic understanding of machine learning and knowledge discovery.
 To be familiar with the mathematical framework of describing data and constructing models.
 To be able to apply machine learning packages in R to realworld problems.
Announcements:
All announcements other than code snippets are made through Sakai
[1/22/18] Welcome!
Documents of Interest:
Data Sets:
Many of the packages above have accompanying data sets. But the
premier source for experimental machine learning data sets is the UCI
Machine Learning Repository.
Assignments:

Assignment #1: Read Chapter 1, Read Appendix B. Do problems 1.1, 1.2, and 1.4. For problem 1.4
write your program in R and demonstrate that your program works with at least two different data sets.

Assignment #2: Read Chapters 2 through 5. Do problem 3.2 (prove the identities in Table 3.3), problem 3.4, and
problem 5.3.
To test your code you can use this dataset.

Assignment #3: Read Chapter 6. Do problem 6.2. You can reuse your code from assignment #2 for parts 1
and 2 (or the code given on the solutions page). Use the QP solver given in file solveQP.r.

Assignment #4: Read Chapter 7. Do problems 7.1, 7.3, 7.5.

Assignment #5: Midterm Data Proposal.

Assignment #6: Do Problem 11.2.
Use the svm function as implemented
in e1071, but only use it in binary mode. That is, you are supposed to implement the multiclass framework
around the binary svm implementation. For part b compare your multiclass implementation
for the R svm to the multiclass implementation of the e1071 package usign the iris data set.

Assignment #7: Read the The Backprop Algorithm for ANNs
. Install the 'neuralnet' package in R. Transform the iris data set into a 3class numeric data set
appropriate for training MLPs. Experiment with building MLPs. Build an MLP with the smallest **training classification error**. Hint: the plot function
and the model itself report the mse network error on the training set. Can you get the classification error down to 0? What is the relationship between
the MSE and the classification error? You can vary the number of hidden
units to give the network different learning abilities. Write a brief report describing your findings. . Here is some example code
to get you going:
# load our data set
data(iris)
# make sure the ANN library is available
library(neuralnet)
# convert the labels into numeric labels and put them into a data frame
Species.numeric < as.numeric(iris$Species)
iris.df < data.frame(iris,Species.numeric)
# train a neural network with two hidden nodes
net < neuralnet(Species.numeric ~ Sepal.Width+Sepal.Length+Petal.Width+Petal.Length,iris.df,hidden=2)
# display the ANN
plot(net)
# report the ANN
net
# the training predictions from the ANN are numeric values, turn them into labels by rounding
result < round(net$net.result[[1]])
# plot the confusion matrix
table(iris.df$Species.numeric,result)
Assignment #8: Implement the ID3 algorithm as given in class and test it on the Play Tennis data set. Your report should
include: the confusion matrix showing your classification of the training data; a copy of the tree you generated for the data set, and your source code.
Extra Credit: Extend the basic ID3 algorithm with continuous variable support as discussed in class and
test it on this data set. Show your generated tree and the confusion matrix.