# Predict with Deep Learning in Mathematica

I have two series of number (Tmax,Tmin) and my target is (ET). I want modeling this and I have one code for this operation but this code is not very acceptable. Can you help me to improve or use an other code?

Data = Import[
"data.TXT", {"Data"}];
Target =
Import["target.TXT", "Data"];

TrainData = MapThread[#1 -> #2 &, {Standardize[Data], Target}, 1]

Model = NetGraph[{BatchNormalizationLayer[], Tanh, LogisticSigmoid,
Tanh, TotalLayer[], TotalLayer[], TotalLayer[], CatenateLayer[],
LinearLayer[10], BatchNormalizationLayer[], Tanh, LogisticSigmoid,
Tanh, TotalLayer[], TotalLayer[], TotalLayer[], CatenateLayer[],
LinearLayer[10], DropoutLayer[], DropoutLayer[], TotalLayer[],
LogisticSigmoid, BatchNormalizationLayer[], Tanh, LogisticSigmoid,
Tanh, TotalLayer[], TotalLayer[], TotalLayer[], CatenateLayer[],
LinearLayer[10], DropoutLayer[], TotalLayer[], TotalLayer[],
TotalLayer[], TotalLayer[], TotalLayer[], TotalLayer[],
LinearLayer[10], LinearLayer[1]}, {1 -> 2, 1 -> 3, 1 -> 4, 2 -> 5,
3 -> 5, 3 -> 6, 4 -> 6, 2 -> 7, 4 -> 7, 5 -> 8, 6 -> 8, 7 -> 8,
8 -> 9, 10 -> 11, 10 -> 12, 10 -> 13, 11 -> 14, 12 -> 14, 11 -> 15,
13 -> 15, 13 -> 16, 12 -> 16, 16 -> 17, 15 -> 17, 14 -> 17,
17 -> 18, 18 -> 19, 9 -> 20, 20 -> 21, 19 -> 21, 21 -> 22,
23 -> 24, 23 -> 25, 23 -> 26, 24 -> 27, 25 -> 27, 24 -> 28,
25 -> 29, 26 -> 28, 26 -> 29, 27 -> 30, 28 -> 30, 29 -> 30,
30 -> 31, 31 -> 32, 32 -> 21, 30 -> 33, 8 -> 33, 8 -> 34, 17 -> 34,
30 -> 35, 17 -> 35, 33 -> 36, 34 -> 36, 34 -> 37, 35 -> 37,
37 -> 38, 36 -> 38, 38 -> 39, 39 -> 21, 22 -> 40}, "Input" -> 2]

Net = NetTrain[Model, TrainData, LearningRate -> 0.01,
TargetDevice -> "CPU", WorkingPrecision -> "Real32",
BatchSize -> 10]


for example:

The amount of observations 4.444

Predict is:

Net[{27.4, 16}]


Out= {4.75871}

The amount of observations 6.463

Predict is:

Net[{32.6, 16.6}]


Out= {4.75893}

• "but this code is not very acceptable" What's not acceptable and what would be acceptable? Is it about execution time or that you don't like the results?
– JimB
Commented Aug 4, 2023 at 16:12