paraheat_gaussian_parameters


paraheat_gaussian_parameters, a keras script which reads data for the heat equation with a parameterized gaussian diffusivity, and uses a neural network to estimate four parameters from solution values at sensor locations.

The steady state heat equation to be solved is:

        - del ( k(x,y) * grad u ) = f(x,y)
      
over the unit square 0 < x, y < 1.

Zero Dirichlet boundary conditions are applied. The right hand side function is set as:

        f(x,y) = 1000 * x * ( 1 - x ) * y * ( 1 - y );
      

The diffusivity is represented by a gaussian function:

        k(x,y) = 0.5 + vc * exp ( - 0.5 * ((x-xc)^2+(y-yc)^2)/sc^2 )
      
with parameters xc, yc, sc, vc.

The equation is solved using a finite element method. Values of the solution are sampled at 50 sensor locations.

For this code, the problem is to be solved many (500) times. Each time, the values of xc, yc, sc and vc were picked uniformaly at random from given intervals. A data file is created, containing, for each case, the random number seed, the parameter values (xc,yc,sc,vc), and the 50 solution values at sensor locations.

The task of the neural network is a kind of regression. Given the solution values at the sensor locations, estimate the values of the parameter xc, yc, sc, vc used to define the heat equation.

With 500 sets of data, the results were not brilliant, although we tried variations in the number of levels, nodes, and epochs, without getting good matches to the data. Moving to 2000 sets of data made a huge improvement in the results.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

boston_housing, a keras script which sets up a neural network to apply regression to predict housing prices, based on the Boston housing dataset.

boston_housing_external, a keras script which reads the Boston housing dataset from an external file, rather than referencing the built-in keras dataset, and applies regression to predict housing prices

dogs_vs_cats_data, a keras script which sets up test, train, and valid directories with data for the dogs versus cats example.

dogs_vs_cats1, a keras script which sets up a convolutional neural network to classify jpeg images as being of dogs or of cats.

hourly_wages, a keras script which uses a neural network to create a multivariable regression model from a set of hourly wage data.

mnist, a keras script which sets up a neural network to classify the MNIST digit image data.

mnist_convnet, a keras script which sets up a convolutional neural network to classify the MNIST digit image data.

movie_review, a keras script which sets up a neural network to classify movie reviews from the IMDB database.

newswire, a keras script which sets up a neural network for the classification of Reuters newswire texts into one of 46 categories.

paraheat_gaussian_parameter, a keras script which reads data for the heat equation with a parameterized gaussian diffusivity, and uses a neural network to estimate a single parameter from solution values at sensor locations.

regression_1d, a keras script which reads training and test files of data pairs (x,y), and seeks a regression formula y = b + w * x.

Author:

John Burkardt.

Reference:

  1. Francois Chollet,
    Deep Learning with Python,
    Manning, 2018,
    ISBN: 9781617294433.

Source Code:


Last revised on 15 May 2019.