numerical analysis - simulation - hanyang university jong-il park

9
Numerical Analysis Numerical Analysis - - Simulation - Simulation - Hanyang University Jong-Il Park

Upload: cecil-summers

Post on 11-Jan-2016

220 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

Numerical AnalysisNumerical Analysis- - Simulation -Simulation -

Hanyang University

Jong-Il Park

Page 2: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

ModelingModeling

Modeling and fitting

unmodeledWorld

modeledWorld

modeling

observeddata

modelparameters

fitting

),(

),( 1

nn y

y

x

x1

Noise),( xafy

Page 3: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

Modeling - complexityModeling - complexity

Eg. Computer graphics

Page 4: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

SimulationSimulation

nxfy ),(a data generation

Simulation

model Synthetic data

※ varyingii yx ,

n

a

fitting

◦ Data generationRandom number generation

-Uniform distribution-Gaussian distribution

NR in C chap. 7

Page 5: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

General procedure of random number General procedure of random number generationgeneration

1. Determine the probability density function(pdf)

- uniform, Gaussian, Poisson, Gamma,...

2. Generate a RN with uniform distribution

eg. Call ran1() in NR in C.

3. Generate a RN with an arbitrary pdf using the RN of 2.

- Transformation method, Rejection method...

eg. Call gasdev() in NR in C for Gaussian distribution

Page 6: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

Generating an arbitrary pdf(I)Generating an arbitrary pdf(I)

Transformation method

Page 7: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

Generating an arbitrary pdf(II)Generating an arbitrary pdf(II)

Rejection method

Page 8: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

Synthetic data generationSynthetic data generation

Flow diagram of synthetic data generation

Randomnumber

generationmodel

Randomnumber

generation

-pdf of x : uniform, Gaussian, ... ; probability-Determined x : x1,x2,...,xN given-yideal : no noise-y : contaminated data-pdf of noise : uniform, Gaussian, ...-Mixer : additive, multiplicative, ...

pdf of x

Determined x

yideal

noise

Contaminated data= practical data

yMix

pdf of noise

a

Page 9: Numerical Analysis - Simulation - Hanyang University Jong-Il Park

            

Department of Computer Science and Engineering, Hanyang University

Homework #6Homework #6

Programming on Random Number Generation: (1) Uniform distribution in [a,b],

(2) Gaussian distribution with mean=m, standard deviation=s.

- Generate 1000 samples and draw a histogram for each distribution (a=-4, b=1, m=0.5, s=1.5).

- Repeat the same job with varying the number of samples. (eg. 100, 10000, 100000)

- Discuss the shape of the histograms in terms of the number of samples. Refer to Ch. 7, NR in C.

[Due: Nov. 5]