Docsity

Introduction to Bioinformatics: Microarray Data Analysis V - Classification Techniques, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
2006-4-18 A. Y. Zhang, University of Kansas 1
EEC EECS 690
Introduction to Bioinformatics
Microarray Data Analysis IV
Anne Y. Zhang
Electrical Engineering and Computer Science
http://people.eecs.ku.edu/~yazhang/
2006-4-18 A. Y. Zhang, University of Kansas 2
General model of classification
zGiven input X, output Y
zWant to estimate the function f based on
known data set (training data)
unknown
2006-4-18 A. Y. Zhang, University of Kansas 3
K Nearest Neighbor
K= 1: brown
K= 3: green
new
zMajority vote within the k
nearest neighbors
zk-NN requires a parameter k
and a distance metric.
zFor k = 1, training error is zero,
but test error could be large.
zAs k↑, training error tends to
increase, but test error tends to
decrease first, and then tends
to increase.
2006-4-18 A. Y. Zhang, University of Kansas 4
Decision Tree Learning
zThe classification model is a tree, called
decision tree.age?
overcast
student? credit rating?
no yes fair
excellent
<=30 >40
no noyes yes
yes
30..40
Internal node denotes a
test on an attribute
Branch represents an
outcome of the test
Leaf nodes
represent
class labels
A flow-chart-
like tree
structure
2006-4-18 A. Y. Zhang, University of Kansas 5
Naïve Bayes Classifier
zAssume target function f: X ÆY, where each instance
Xidescribed by attributes <x1,x2,…,xn>. Most probable
value of f(X) is :
∏
∈
∈
∈
∈
=
=
=
=
ijij
Vy
jjn
Vy
n
jjn
Vy
nj
Vy
yxPyP
yPyxxP
xxP
yPyxxP
xxyPv
j
j
j
j
)|()(maxarg
)()|,...,(maxarg
),...,(
)()|,...,(
maxarg
),...,|(maxarg
1
1
1
1
2006-4-18 A. Y. Zhang, University of Kansas 6
Support Vector Machines
pf3
pf4
pf5

Partial preview of the text

Download Introduction to Bioinformatics: Microarray Data Analysis V - Classification Techniques and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

2006-4-18 A. Y. Zhang, University of Kansas 1

EEC EECS 690

Introduction to Bioinformatics

Microarray Data Analysis IV

Anne Y. Zhang

Electrical Engineering and Computer Science

http://people.eecs.ku.edu/~yazhang/

2006-4-18 A. Y. Zhang, University of Kansas 2

General model of classification

z Given input X, output Y

z Want to estimate the function f based on

known data set (training data)

unknown

2006-4-18 A. Y. Zhang, University of Kansas 3

K Nearest Neighbor

K= 1: brown

K= 3: green

new

z Majority vote within the k

nearest neighbors

z k-NN requires a parameter k

and a distance metric.

z For k = 1, training error is zero,

but test error could be large.

z As k↑, training error tends to

increase, but test error tends to

decrease first, and then tends

to increase.

2006-4-18 A. Y. Zhang, University of Kansas 4

Decision Tree Learning

z The classification model is a tree, called

decision tree.

age?

overcast

student? credit rating?

no yes excellent fair

no yes no yes

yes

Internal node denotes a

test on an attribute

Branch represents an

outcome of the test

Leaf nodes

represent

class labels

A flow-chart-

like tree

structure

2006-4-18 A. Y. Zhang, University of Kansas 5

Naïve Bayes Classifier

z Assume target function f : X Æ Y, where each instance

Xi described by attributes < x 1 , x 2 ,…, x n>. Most probable

value of f (X) is :

i

j i j yV

n j j yV

n

n j j

yV

j n yV

Py Px y

Px x y Py

Px x

Px x y Py

v Py x x

j

j

j

j

argmax ( ) ( | )

argmax ( ,..., | )( )

argmax

argmax ( | ,..., )

2006-4-18 A. Y. Zhang, University of Kansas 6

Support Vector Machines

2006-4-18 A. Y. Zhang, University of Kansas 7

Linear classifiers – which line is better?

z Data: < Xi , y i > i =1,..., n

z Xi ={ x i1 ,… x ip }— p features/attributes

z y i ∊{-1,+1} -- class

z Consider a two-class,

linearly separable

classification problem

z Many decision boundaries!

z Are all decision boundaries

equally good?

2006-4-18 A. Y. Zhang, University of Kansas 8

Intuition I

z Maximizes the distance

between the decision

boundary and the “difficult

points” close to decision

boundary

z Intuition: if there are no

points near the decision

surface, then there are no

very uncertain classification

decisions

2006-4-18 A. Y. Zhang, University of Kansas 9

Another intuition

z If you have to place a fat separator between classes, you

have less choices, and so the capacity of the model has

been decreased

2006-4-18 A. Y. Zhang, University of Kansas 10

Support Vector Machine (SVM)

Support vectors

Maximize

margin

z SVMs maximize the margin

around the separating

hyperplane.

z The decision function is fully

specified by a subset of training

samples, the support vectors.

z Seen by many as most

successful current classification

method

2006-4-18 A. Y. Zhang, University of Kansas 11

If not linearly separable

z Allow some errors

z Let some points be

moved to where they

belong, at a cost

z Still, try to place decision

boundary “far” from each

class

Large margin classifiers

2006-4-18 A. Y. Zhang, University of Kansas 12

z w: decision hyperplane normal

z x i : data point i

z yi : class of data point i (+1 or -1)

z Classify function is: f(x)=sign(w T^ xi + b)

z Decision boundary: wT^ x + b =

z Distance from example to the separator is

Maximum Margin: Formalization

w

w x b

r

T

2006-4-18 A. Y. Zhang, University of Kansas 19

Non-linear SVMs

z Datasets that are linearly separable with some noise work out great:

z But what are we going to do if the dataset is just too hard?

z How about… mapping data to a higher-dimensional space:

x 2

x

0 x

0 x

2006-4-18 A. Y. Zhang, University of Kansas 20

Non-linear SVMs: Feature spaces

z General idea: the original feature space can always be mapped to

some higher-dimensional feature space where the training set is

separable:

Φ: x → φ( x )

2006-4-18 A. Y. Zhang, University of Kansas 21

The “Kernel Trick”

z The linear classifier relies on inner product

between vectors K ( xi , xj )= xi

T

xj

z If every data point is mapped into high-

dimensional space via some transformation Φ:

x → φ( x ), the inner product becomes:

K ( xi , xj )= φ( xi ) T φ( xj )

z A kernel function is some function that

corresponds to an inner product in some

expanded feature space.

2006-4-18 A. Y. Zhang, University of Kansas 22

Examples of Kernel Functions

z Linear: K ( x i , x j )= x i

T

x j

z Polynomial of power p : K ( x

i

, x

j

)= (1+ x

i

T x

j

) p

z Gaussian (radial-basis function network):

K ( xi , x j )=

2

2

x (^) i − x j −

e

2006-4-18 A. Y. Zhang, University of Kansas 23

Multi-Class SVMs

z Combining into multi-class classifier

z One-vs-rest

z Classes: in this class or not in this class

z Positive training samples: data in this class

z Negative training samples: the rest

z K binary SVM (k the number of the classes)

z One-vs-One

z Classes: in class one or in class two

z Positive training samples: data in this class

z Negative training samples: data in the other class

z K(K-1)/2 binary SVM

2006-4-18 A. Y. Zhang, University of Kansas 24

Advantages of SVMs

z Large margin classifier: leads to good

generalization (performance on test sets)

z Sparse classifier: depends only on support

vectors, leads to fast classification, good

generalization

z Kernel method: as we’ll see, we can introduce

sequence-based kernel functions for use with

SVMs

2006-4-18 A. Y. Zhang, University of Kansas 25

Software

z SVM applets

z http://www.site.uottawa.ca/~gcaron/SVMApplet/S

VMApplet.html

z SVM toolkits

z http://svmlight.joachims.org/

z http://www.csie.ntu.edu.tw/~cjlin/libsvm/

z http://theoval.sys.uea.ac.uk/~gcc/svm/toolbox/

2006-4-18 A. Y. Zhang, University of Kansas 26

SVMLight

z SVMLight is an implementation of Support

Vector Machine (SVM) in C.

z Download source from :

http://svmlight.joachims.org/

Detailed description about: •What are the features of SVMLight? •How to install it? •How to use it? •…

2006-4-18 A. Y. Zhang, University of Kansas 27

Training Step

z svm-learn [-option] train_file model_file

•train_file contains training data; •The filename of train_file can be any filename; •The extension of train_file can be defined by user arbitrarily;

•model_file contains the model built based on training data by SVM;

2006-4-18 A. Y. Zhang, University of Kansas 28

Format of input file (training data)

z For cancer classification, training data is a collection of gene

expression profiles for patients;

z Each line represents a person;

z Each feature represents a gene’s expression level of the person;

z Feature value : e.g., log-ratio;

2006-4-18 A. Y. Zhang, University of Kansas 29

Testing Step

z svm-classify test_file model_file predictions

•The format of test_file is exactly the same as train_file; •Needs to be scaled into same range;

•We use the model built based on training data to classify test data, and compare the predictions with the original label of each test document;

2006-4-18 A. Y. Zhang, University of Kansas 30

Which means the first patient is classified correctly but the second one is incorrectly.

Example

z In test_file, we have:

After running the svm_classify, the Predictions may be:

-0. … …

Which means this classifier classify these two patients Correctly.

or

2006-4-18 A. Y. Zhang, University of Kansas 37

Remote Homology Detection

z The problem

z Protein homology is key clue to structure and function prediction z High sequence similarity indicates homology z Remote homology – “twilight zone”, challenging to detect

z Data

z Sequences (DNA or proteins)

Homologous proteins come from common ancestor

SCOP database

Non-vector inputs; Variable lengths

2006-4-18 A. Y. Zhang, University of Kansas 38

Classification of Genes and Proteins

z Problem:

z Put genes and proteins into biologically interesting categories

z Functions

z Subcellular localization

z Co-regulation

z Clinical categories – benign vs. pathogenic

z Data

z Sequences

z Promoter regions

z Phylogentic profiles