Prediction of genetic Values using Neural Networks
Paulino Perez 1 Daniel Gianola 2 Jose Crossa 1
1CIMMyT-Mexico 2University of Wisconsin, Madison.
September, 2014
SLU,Sweden Prediction of genetic Values using Neural Networks 1/26
Prediction of genetic Values using Neural Networks Paulino Perez 1 - - PowerPoint PPT Presentation
Prediction of genetic Values using Neural Networks Paulino Perez 1 Daniel Gianola 2 Jose Crossa 1 1 CIMMyT-Mexico 2 University of Wisconsin, Madison. September, 2014 SLU,Sweden Prediction of genetic Values using Neural Networks 1/26 Contents
1CIMMyT-Mexico 2University of Wisconsin, Madison.
SLU,Sweden Prediction of genetic Values using Neural Networks 1/26
1
2
3
4
5
SLU,Sweden Prediction of genetic Values using Neural Networks 2/26
Introduction
p
SLU,Sweden Prediction of genetic Values using Neural Networks 3/26
Introduction
SLU,Sweden Prediction of genetic Values using Neural Networks 4/26
Introduction
SLU,Sweden Prediction of genetic Values using Neural Networks 5/26
Non linear models and NN
2p+1
SLU,Sweden Prediction of genetic Values using Neural Networks 6/26
Non linear models and NN
SLU,Sweden Prediction of genetic Values using Neural Networks 7/26
Non linear models and NN
SLU,Sweden Prediction of genetic Values using Neural Networks 8/26
Non linear models and NN
Combine output from hidden layer
p
j
SLU,Sweden Prediction of genetic Values using Neural Networks 9/26
Model fitting
1 , ...., β[1] p ; ..., β[S] 1 , ...., β[S] p ), µ and σ2 e.
SLU,Sweden Prediction of genetic Values using Neural Networks 10/26
Model fitting Empirical Bayes
1
2
3
4
5
SLU,Sweden Prediction of genetic Values using Neural Networks 11/26
Model fitting Empirical Bayes
1 , ...., β[1] p ; ..., β[S] 1 , ...., β[S] p , µ)′
θ) = MN(0, σ2 θI)
θ, σ2 e
θ, σ2 e) = p(y|θ, σ2 e)p(θ|σ2 θ)
θ, σ2 e)
e)p(θ|σ2 θ)
e)p(θ|σ2 θ)dθ
e n
θ m
j
SLU,Sweden Prediction of genetic Values using Neural Networks 12/26
Model fitting Empirical Bayes
θ, σ2 e by maximizing marginal likelihood of the data p(y|σ2 θ, σ2 e).
θ, σ2 e) ≈ k + n
∂2 ∂θθ′ F(θ).
j=1 θ2 j
i=1 e2 i
SLU,Sweden Prediction of genetic Values using Neural Networks 13/26
Model fitting Empirical Bayes
SLU,Sweden Prediction of genetic Values using Neural Networks 14/26
Model fitting Empirical Bayes
SLU,Sweden Prediction of genetic Values using Neural Networks 15/26
Case study: Wheat
1
2
SLU,Sweden Prediction of genetic Values using Neural Networks 16/26
Case study: Wheat
SLU,Sweden Prediction of genetic Values using Neural Networks 17/26
Case study: Wheat
SLU,Sweden Prediction of genetic Values using Neural Networks 18/26
Application examples
#Example 1 #Noise triangle wave function, similar to example 1 in Foresee and Hagan (1997) #Generating the data x1=seq(0,0.23,length.out=25) y1=4*x1+rnorm(25,sd=0.1) x2=seq(0.25,0.75,length.out=50) y2=2-4*x2+rnorm(50,sd=0.1) x3=seq(0.77,1,length.out=25) y3=4*x3-4+rnorm(25,sd=0.1) x=c(x1,x2,x3) y=c(y1,y2,y3) X=as.matrix(x) neurons=2
cat("Message: ",out$reason,"\n") plot(x,y,xlim=c(0,1),ylim=c(-1.5,1.5), main="Bayesian Regularization for ANN 1-2-1")
1
SLU,Sweden Prediction of genetic Values using Neural Networks 19/26
Application examples
SLU,Sweden Prediction of genetic Values using Neural Networks 20/26
Application examples
#2 Inputs and 1 output #the data used in Paciorek and #Schervish (2004). The data is from a two input one output function with Gaussian noise #with mean zero and standard deviation 0.25. data(twoinput) X=normalize(as.matrix(twoinput[,1:2])) y=as.vector(twoinput[,3]) neurons=10
cat("Message: ",out$reason,"\n") f=function(x1,x2,theta,neurons) predictions.nn(X=cbind(x1,x2),theta,neurons) x1=seq(min(X[,1]),max(X[,1]),length.out=50) x2=seq(min(X[,1]),max(X[,1]),length.out=50) z=outer(x1,x2,f,theta=out$theta,neurons=neurons) # calculating the density values transformation_matrix=persp(x1, x2, z, main="Fitted model", sub=expression(y==italic(g)~(bold(x))+e), col="lightgreen",theta=30, phi=20,r=50, d=0.1, expand=0.5,ltheta=90, lphi=180, shade=0.75, ticktype="detailed",nticks=5) points(trans3d(X[,1],X[,2], f(X[,1],X[,2], theta=out$theta,neurons=neurons), transformation_matrix), col = "red")
SLU,Sweden Prediction of genetic Values using Neural Networks 21/26
Application examples
Prediction of genetic Values using Neural Networks 22/26
Application examples
rm(list=ls()) setwd("/tmp") library(brnn) library(BLR) #Load the wheat dataset data(wheat) #Normalize inputs y=normalize(Y[,1]) X=normalize(X) p=300 #Fit the model with the FULL DATA, but some markers, #You can select the markers based on p-values for example
cat("Message: ",out$reason,"\n") #Obtain predictions yhat_R=predictions.nn(X[,1:p],out$theta,neurons=2) plot(y,yhat_R)
SLU,Sweden Prediction of genetic Values using Neural Networks 23/26
Application examples
−0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 y yhat_R
SLU,Sweden Prediction of genetic Values using Neural Networks 24/26
Application examples
SLU,Sweden Prediction of genetic Values using Neural Networks 25/26
Application examples
SLU,Sweden Prediction of genetic Values using Neural Networks 26/26