10
Finding Regression Coefficient To Predict Radiation Advance Mathematics Contents: Finding of regression coefficient using Statistical method Genetic algorithm (by minimizing error) References: 1. Course work in environmental geology 2. Course work in advance mathematics for planning Nirmal Raj Joshi|13ME135|Structual Material Laboratory 1

Advance mathematics mid term presentation rev01

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Advance mathematics mid term presentation rev01

Finding Regression Coefficient To Predict Radiation

Advance MathematicsContents:• Finding of regression coefficient using

• Statistical method• Genetic algorithm (by minimizing error)

References:1. Course work in environmental geology2. Course work in advance mathematics for planning

Nirmal Raj Joshi|13ME135|Structual Material Laboratory1

Page 2: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

OBJECTIVE*The objective of this analysis is to predict the radiation level at 6th location using known data of 5 locations. The data set contains radiation measured at 6 different spots.

*Use various techniques to find the regression coefficientsa) Linear regressionb) genetic algorithm

2

Page 3: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

Data

Date D-1 D-14 D-15 D-20 D-24 D-26

9/2/2013 1.318 2.132 1.48 3.144 2.128 2.8589/3/2013 1.3 2.132 1.46 3.468 2.13 2.899/4/2013 1.324 2.158 1.378 3.32 1.924 2.874

….. ….. ….. ….. ….. ….. …..11/8/2013 1.294 2.116 1.438 3.356 2.036 2.72411/11/2013 1.32 2.084 1.384 3.156 1.936 2.904

Input dataTarget data

0

1

2

3

4

5Radiation level at various locations

D-1 D-14 D-15

D-20 D-24 D-26

Time (days)

Radia

tion level

3

Page 4: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

Regression analysis using normal statistical method

The regression equation is

R-OutputCoefficients: Estimate Std. Error t value Pr(>|t|) D.14 0.226600 0.088572 2.558 0.0143 *D.15 0.407026 0.155673 2.615 0.0124 *D.20 0.025524 0.024257 1.052 0.2989 D.24 0.004203 0.081023 0.052 0.9589 D.26 0.050943 0.052996 0.961 0.3421 ---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1Residual standard error: 0.03299 on 41 degrees of freedomMultiple R-squared: 0.9994, Adjusted R-squared: 0.9993 F-statistic: 1.353e+04 on 5 and 41 DF, p-value: < 2.2e-16

Source of Variation SS df MS F P-value F critBetween Groups 6.85E-07 1 6.85E-07 0.000453 0.983061 3.946876Within Groups 0.135982 90 0.001511

Total 0.135982 91        

ANOVA table

*R2 value of this multiple regression is 0.9994 which indicated the linear model is quite reliable. *R2 value of PD-1 calculated and observed value is 0.4668.*F<Fcrit, hence the model is acceptable at 95% confidence level

11.05

1.11.15

1.21.25

1.31.35

1.4Radiation at location D-1: Actual Vs

Predicted

D-1 D-1 predTime (days)

Rad

iati

on

level

4

*There is no constant term in the equation.

model_radiation=lm(D.1~D.14+D.15+D.20+D.24+D.26+0,data=rdata)summary(model_radiation)

Page 5: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

About genetic algorithm

Regression analysis using Genetic algorithm

1. Start with a randomly generated population of n l−bit chromosomes (candidate solutions to a problem).

2. Calculate the fitness ƒ(x) of each chromosome x in the population.

3. Repeat the following steps until n offspring have been created:a. Select a pair of parent chromosomes from the current

population, the probability of selection being an increasing function of fitness.

b. With probability pc (the "crossover probability" or "crossover rate"), cross over the pair at a randomly chosen point (chosen with uniform probability) to form two offspring. If no crossover takes place, form two offspring that are exact copies of their respective parents.

c. Mutate the two offspring at each locus with probability pm (the mutation probability or mutation rate), and place the resulting chromosomes in the new population.

4. Replace the current population with the new population.5. Go to step 2 until the fitness of successive population

converges.

Array of [P] values. Find fitness.

Generate off-springs using elite population

Generate initial population

Set of new population

Stop when convergence is met

5

Page 6: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

Solution using genetic algorithm

Regression analysis using Genetic algorithm

Two fitness functions were used viz. (a) R2 and (b) E2=(Yactual-Ypred)2 separately. The program was run in MATLAB and results were obtained. For both run, the input parameters are:

SN Parameter Value1 Population type Double precision

numbers

2 Number of variables to optimize

5

3 Number of population 50004 Number of generation 100 or attainment of

error

5 Allowable error in consecutive population

1e-6

6 Population generation scheme

Uniform

7 Fitness scaling Rank8 Selection function Roulette wheel9 Reproduction scheme Elite selection with

crossover of 0.8 at single point

10 Mutation function Uniform6

Page 7: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

Solution using genetic algorithm

Regression analysis using Genetic algorithm

CASE-1: Maximizing R2 value

=> α=[ 0.4702 0.9999 0.0861 0.0232 0.0957] and R2=0.4688

CASE-2: Minimizing E2=(Yactual-Ypred)2

=> α=[0.1952 0.3847 0.0362 0.0502 0.0397] and R2=0.4600

Although R2 is low, the fitting is

more realistic

0.000

0.500

1.000

1.500

2.000

2.500

3.000

3.500

Radiation at location D-1: Actual Vs Predicted

D-1 pred with E2 D-1actual D-1pred with R2

Time (Days)

Radi

ation

Leve

l

7

Page 8: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

Final adopted values

Regression analysis using Genetic algorithm

9/2/2

013

9/4/2

013

9/6/2

013

9/8/2

013

9/10/2

013

9/12/2

013

9/14/2

013

9/16/2

013

9/18/2

013

9/20/2

013

9/22/2

013

9/24/2

013

9/26/2

013

9/28/2

013

9/30/2

013

10/2/2

013

10/4/2

013

10/6/2

013

10/8/2

013

10/10/2

013

10/12/2

013

10/14/2

013

10/16/2

013

10/18/2

013

10/20/2

013

10/22/2

013

10/24/2

013

10/26/2

013

10/28/2

013

10/30/2

013

11/1/2

013

11/3/2

013

11/5/2

013

11/7/2

013

11/9/2

013

11/11/2

0131.000 1.050 1.100 1.150 1.200 1.250 1.300 1.350 1.400

Radiation at location D-1: Actual Vs Predicted

D-1 pred with E2 D-1actual

Time (Days)

Radi

ation

Leve

l

Source of Variation SS df MS F P-value F critBetween Groups 2.21E-05 1 2.21E-05 0.014681 0.90383 3.946876Within Groups 0.135241 90 0.001503

Total 0.135263 91        

In the table, we see that F<Fcrit, thus it can be said that the distribution estimated by the regression coefficients α gives significantly correct value at 95% confidence level.

8

Page 9: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

• Regression coefficients was calculated using two method.

• The data analysis tools should be selected wisely to get the correct results. For e.g. in case of GA, R2 value may not yield proper results.

Summary

9

Page 10: Advance mathematics mid term presentation rev01

Adva

nce

Mat

hem

atics

for P

lann

ing

THANK

YOU

10