Академический Документы
Профессиональный Документы
Культура Документы
Advance DataBase
Advance DataBase
DATA
• In general, data is any set of characters that has been gathered and translated for
some purpose, usually analysis. It can be any character, including text and numbers,
pictures, sound, statistics or video.
• Eg: 0143 0157 0164 0145 0162 0040 0150 0157 0160 0145
• @ : > ?~#”*(){/|\
Advance DataBase
Information
• Process form of data that bearing some meaning.
• Managed data upon which a decision can made.
• Information is any entity or form that resolves uncertainty or provides
the answer to a question of some kind.
Advance DataBase
Terms
• Table
• Row (record)
• Column
• Redundancy
• Inconsistency
• Integrity
Advance DataBase
Unsupervised ML
Advance DataBase
Euclidean distance
• The Euclidean distance between points p and q is the length of the line segment connecting them ( pq ) =
• Two dimensions:
• In the Euclidean plane, if p = (p1, p2) and q = (q1, q2) then the distance is
• Example
Advance DataBase
3. Compute seed points as the centroids of the clusters of the current partition. The
centroid is the center (mean point) of the cluster.
4. Assign each object to the cluster with the nearest seed point.
10 10
10
9 9
9
8 8
8
7 7
7
6 6
6
5 5
5
4
Update the
4
4
Assign each 3 3
3 cluster
objects to 2 2
2
means
1
most similar 1 1
0
center 0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
reassign reassign
10 10
K=2 9 9
6 6
5 5
4 Update the 4
3 cluster 3
2 means 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Advance DataBase
K-Means Example
• Given: {2,4,10,12,3,20,30,11,25}, k=2
• Randomly assign means: m1=3,m2=4
• K1={2,3}, K2={4,10,12,20,30,11,25}, m1=2.5,m2=16
• K1={2,3,4},K2={10,12,20,30,11,25}, m1=3,m2=18
• K1={2,3,4,10},K2={12,20,30,11,25}, m1=4.75,m2=19.6
• K1={2,3,4,10,11,12},K2={20,30,25}, m1=7,m2=25
• Stop as the clusters with these means are the same.
Advance DataBase
Knn Example
• We have data from the questionnaires survey (to ask people opinion) and objective testing with two attributes (acid durability and
strength) to classify whether a special paper tissue is good or not. Here is four training samples .
• Now the factory produces a new paper tissue that pass laboratory test with X1 = 3 and X2 = 7. Without another expensive survey,
can we guess what the classification of this new tissue is?
7 4
3 4
1 4
Advance DataBase
3. Sort the distance and determine nearest neighbors based on the K-th minimum distance.
7 4 4 No
3 4 1 Yes
1 4 2 Yes
Advance DataBase
4. Gather the category of the nearest neighbors. Notice in the second row last column that the category of nearest neighbor (Y) is
not included because the rank of this data is more than 3 (=K).
7 4 4 No -
3 4 1 Yes Good
1 4 2 Yes Good
Advance DataBase
5. Use simple majority of the category of nearest neighbors as the prediction value of the query instance
We have 2 good and 1 bad, since 2>1 then we conclude that a new paper tissue that pass laboratory test with X1 = 3 and X2 = 7 is
included in Good category.
Advance DataBase
ANN Introduction
• Inspired by biological brain
• imitate the human brain's ability to make decisions and draw conclusions when presented with complex, noisy, irrelevant, and/or
partial information.
• Go by many names such as connectionist models, parallel distributed processing models
• Models are based on dense interconnection of simple computational elements.
Advance DataBase
ANN Applications
• Aerospace: autopilot, flight path simulation, fault detection
• Banking : fraud detection, credit application evaluation
• Defense: weapon steering, target tracking, image and signal processing data
compression
• Electronics: voice synthesis, IC chip layout, process control
• Entertainment: animation
• Financial: market forecasting
• Insurance: Policy application evaluation
• Manufacturing: planning and management, process control, machine diagnosis)
• Medical: ECG, Cancer cells analysis
• Oil and Gas : Exploration
• Robotics: Manipulator controller, vision system
• Speech: Speech recognition, compression, vowel classification
• Telecommunications : Image and data compression
• Transportation: Vehicle scheduling, routing system
Advance DataBase
Assignment
• How ANN could be utilized in the areas mentioned in previous slide ?
• Each Person should select different area based upon his/her Class No.
• Submission Deadline:
▫ Before Final-term
Advance DataBase
Biological Neuron
• Neuron : a basic building block in the nervous system
• The major components of a neuron include: a central body, dendrites, and an axon
• The signal flow goes from the dendrites, through the cell body, and out through the axon. The signal from one neuron is passed on
to another by means of connection (Synapse) between the axon and of the first and a dendrite of the second
Advance DataBase
Biological Neuron
Advance DataBase
ANN Example
• Invented in 1957 by Frank Rosenblatt at the Cornell Aeronautical Laboratory, a perceptron is the simplest neural network
possible: a computational model of a single neuron.
• A perceptron consists of one or more inputs, a processor, and a single output.
• A perceptron follows the “feed-forward” model, meaning inputs are sent into the neuron, are processed, and
result in an output. In previous diagram, this means the network (one neuron) reads from left to right: inputs
come in, result goes out.
• Let’s follow each of these steps in more detail.
Step 1: Receive inputs.
Say we have a perceptron with two inputs—let’s call them x1 and x2.
Input 0: x1 = 12
Input 1: x2 = 4
Step 2: Weight inputs.
Each input that is sent into the neuron must first be weighted, i.e. multiplied by some value (often a number
between -1 and 1). When creating a perceptron, we’ll typically begin by assigning random weights. Here,
let’s give the inputs the following weights:
Weight 0: 0.5
Weight 1: -1
We take each input and multiply it by its weight.
Input 0 * Weight 0 ⇒ 12 * 0.5 = 6
Input 1 * Weight 1 ⇒ 4 * -1 = -4
Advance DataBase
Advance DataBase
L1 L2 L3 L4
Output
0
x1 a1(2) a1(3) a1(4) 0
4
x4 a4(2) a4(3) a4(4) 0
5
x5 a5(2) a5(3) a5(4) 0
43
xn an(2) an(3) a44(4) 0
L1 L2
W11(1)
x1
a1(2)
x2
x3
x4
x5
xn
L1 L2
x1 W11(1)
W12(1)
x2
a2(2)
W13(1)
x3
x4
x5
xn
L1 L2
x1 W11(1)
x2 W12(1)
W13(1)
x3
a3(2)
W14(1)
x4
W15(1)
x5
W1n(1)
xn
L1 L2
x1 W11(1)
x2 W12(1)
W13(1)
x3
W14(1)
x4
W15(1) a4(2)
x5
W1n(1)
xn
L1 L2
x1
x2
x3
x4
x5
a5(2)
xn
L1 L2
x1
x2
x3
x4
x5
W1n(1)
xn an(2)
L1 L2
x1 a1(2)
x2 a2(2)
x3 a3(2)
x4 a4(2)
x5 a5(2)
xn an(2)
L2 L3
W21(2)
a1(2)
a1(3)
W22(2)
a2(2)
a3(2)
a4(2)
a5(2)
an(2)
Hidden Layers
a0(2) W20(2) Bias Unit
Advance DataBase
L2 L3
a1(2) W21(2)
W22(2)
a2(2)
a2(3)
W23 (2)
a3(2)
a4(2)
a5(2)
an(2)
Hidden Layers
a0(2) W20(2) Bias Unit
Advance DataBase
L2 L3
a1(2) W21(2)
a2(2) W22(2)
W23(2)
a3(2)
W24(2) a3(3)
a4(2)
W25(2)
a5(2)
W2n(2)
an(2)
Hidden Layers
a0(2) W20(2) Bias Unit
Advance DataBase
L2 L3
a1(2)
a2(2)
a3(2)
a4(2)
a4(3)
a5(2)
an(2)
Hidden Layers
a0(2) W20(2) Bias Unit
Advance DataBase
L2 L3
a1(2)
a2(2)
a3(2)
a4(2)
W25(2)
a5(2) a5(3)
an(2)
Hidden Layers
a0(2)
W20(2) Bias Unit
Advance DataBase
L2 L3
a1(2)
a2(2)
a3(2)
a4(2)
a5(2)
an(2) an(3)
Hidden Layers
Bias Unit
a0(3)
Advance DataBase
L3 L4
0
a1(3) a1(4) 1
W31 (3)
a2(3)
a3(3)
a4(3)
a5(3)
an(3)
a0(3) Bias Units
Advance DataBase
L3 L4
a1(3)
a2(3) a2(4) 1 1
W32(3)
a3(3)
a4(3)
a5(3)
an(3)
Bias Units
a0(3)
Advance DataBase
L3 L4
a1(3)
a2(3)
a3(3)
2
a3(4)
1
W33(3)
a4(3)
a5(3)
an(3)
a0(3) Bias Units
Advance DataBase
L3 L4
a1(3)
a2(3)
a3(3)
4
a4(3) a4(4) 1
W34(3)
a5(3)
an(3)
a0(3) Bias Units
Advance DataBase
L3 L4
a1(3)
a2(3)
a3(3)
a4(3)
5
a5(3) a5(4) 1
W35(3)
an(3)
a0(3)
Bias Unit
Advance DataBase
L3 L4
a1(3)
a2(3)
a3(3)
a4(3)
a5(3)
43
a44(4) 1
an(3)
Advance DataBase
ANN
Advance DataBase
ANN
Advance DataBase
ANN
Advance DataBase
Ann
Advance DataBase
ANN
Advance DataBase
ANN
Advance DataBase
ANN
Advance DataBase
ANN