You are on page 1of 16

1

Computer
Vision
Lecture 7
Training & Testing
Hendrawan A.
Sekolah Tinggi Teknik Surabaya
Computer Vision
Diagram
Pre Feature
Image
Processing Extraction

Training Testing

Database Information

Sekolah Tinggi Teknik Surabaya


Training
Training is a process to make
our system understand what
the purpose of his existence.
This process required as many
as data. A little data can make
our system give a wrong
information.
Data for this purpose, we call it
data training
3

Sekolah Tinggi Teknik Surabaya


Testing
Testing is a process to make our
system give us an information
based on the data input and data
training
This process will give an correct
answer if we already trained
correctly, if we give an input that
we never trained then our system
will be wrong.
Data for this purpose, we call it 4
data testing
Sekolah Tinggi Teknik Surabaya
Data
Usually the proportional
between data training and data
testing is 80% data training and
20% data testing.
Example: We have 100 image
then we use 80 image for data
training and 20 image for data
testing

Sekolah Tinggi Teknik Surabaya


Methodology
There is many method for
training and testing, we can use
one of them to make a
computer vision application. For
Example:
Back Propagation (Supervised)
Counter Propagation (Supervised)
K-Means (Unsupervised)
SOM (Unsupervised)
Etc 6

Sekolah Tinggi Teknik Surabaya


Methodology
But if we select one of the method for
training then we must use the same
method for testing.
Example: We select back propagation
then both of training and testing
must use back propagation
At this course, we will learn using
Unsupervised Method. If you want to
learn much more about other
method, you can learn it at Soft
Computing Course. 7

Sekolah Tinggi Teknik Surabaya


Agglomerative
Hierarchical
Clustering
This method is the easiest
method for unsupervised
learning method
Algortihm:
Initially each item X1 .. Xn is in its
own cluster C1 .. Cn
Repeat until there is only one cluster
Merge the nearest clusters
8

Sekolah Tinggi Teknik Surabaya


Agglomerative
Hierarchical
Clustering
To calculate the distance
between each cluster we can
use one of this method:

Sekolah Tinggi Teknik Surabaya


Agglomerative
Hierarchical
Clustering
To calculate the distance between 2
cluster, we must calculate the
distance between all elements from
that cluster. After that we can
choose the distance using one of this
method:

1
0
Sekolah Tinggi Teknik Surabaya
Agglomerative
Hierarchical
Clustering

1
1
Sekolah Tinggi Teknik Surabaya
Agglomerative
Hierarchical
Clustering

1
2
Sekolah Tinggi Teknik Surabaya
K-Mean
This method is one of the easiest
algorithm in unsupervised algorithm
but many people used it.
Algotihm:
Specify how many cluster we want to
produce (k)
Randomly choose k centers 1 ,... ,k
Repeat
Assign X1 ... Xn to their nearest
centers
Update i to the mean of the items
assigned to it 1
Until the cluster no longer change 3
Sekolah Tinggi Teknik Surabaya
K-Mean (Example)

1
4
Sekolah Tinggi Teknik Surabaya
Clustering
Because of clustering is
unsupervised learning method
then before we process to testing,
we must labeling every cluster
that we generate from training
For Example after training we
have 2 cluster (Apple and
Banana) but we dont know which
one is for apple and which one is
for banana. 1
5
Sekolah Tinggi Teknik Surabaya
Clustering
If we continue to testing without
knowing the label for each cluster
then our system wont be able to
give the correct information.
To give a label for each cluster,
we must give our system data
that we already know what is the
answer. For example we give a
picture of banana and we tell the
system what picture is that. 1
6
Sekolah Tinggi Teknik Surabaya

You might also like