Building and training a neural network for handwritten digit recognition¶
In this example we will consider data processing and training of a neural network model for image classification. The MNIST dataset, which contains 70000 labelled images of handwritten digits, is chosen as a set of observation objects. The example will use a .csv file in which the images are expanded as tabular data containing brightness values for each pixel.
Connection of libraries for data processing:¶
Loading data into a variable:¶
Conclusion the first five lines of the dataframe:¶
Out[0]:
5 rows × 785 columns (omitted printing of 775 columns)
| pixel1 | pixel2 | pixel3 | pixel4 | pixel5 | pixel6 | pixel7 | pixel8 | pixel9 | pixel10 |
---|
| Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 |
---|
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
---|
2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
---|
3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
---|
4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
---|
5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
---|
Conclusion the first five rows and the last column of the dataframe, which tells you what class the object of observation belongs to:¶
Out[0]:
5 rows × 6 columns
| pixel780 | pixel781 | pixel782 | pixel783 | pixel784 | class |
---|
| Int64 | Int64 | Int64 | Int64 | Int64 | Int64 |
---|
1 | 0 | 0 | 0 | 0 | 0 | 5 |
---|
2 | 0 | 0 | 0 | 0 | 0 | 0 |
---|
3 | 0 | 0 | 0 | 0 | 0 | 4 |
---|
4 | 0 | 0 | 0 | 0 | 0 | 1 |
---|
5 | 0 | 0 | 0 | 0 | 0 | 9 |
---|
Dividing the data set into training and test samples at a ratio of 8 to 2:¶
Out[0]:
([0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0], [1, 8, 5, 9, 8, 0, 3, 1, 3, 2 … 7, 8, 9, 0, 1, 2, 3, 4, 5, 6])
Out[0]:
(Float32[5.0, 0.0, 4.0, 1.0, 9.0, 2.0, 1.0, 3.0, 1.0, 4.0 … 4.0, 0.0, 9.0, 0.0, 6.0, 1.0, 2.0, 2.0, 3.0, 3.0], Float32[1.0, 8.0, 5.0, 9.0, 8.0, 0.0, 3.0, 1.0, 3.0, 2.0 … 7.0, 8.0, 9.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
Connecting a library for data visualisation:¶
Displaying an object and its class:¶
Out[0]:
(Float32[5.0 0.0 … 3.0 3.0], Float32[1.0 8.0 … 5.0 6.0])
Connecting a machine learning library:¶
Defining the structure of a neural network:¶
Out[0]:
Chain(
Dense(784 => 15, elu), # 11_775 parameters
Dense(15 => 10, σ), # 160 parameters
NNlib.softmax,
) # Total: 4 arrays, 11_935 parameters, 46.871 KiB.
Test result of recognition (before training the model):¶
Out[0]:
10×14000 Matrix{Float32}:
0.0729828 0.133842 0.0592658 … 0.157915 0.133842 0.0600273
0.0729828 0.133842 0.0592658 0.0580938 0.133842 0.0588685
0.198388 0.133842 0.161101 0.0768005 0.133842 0.0588685
0.0729828 0.0492376 0.0592658 0.0580938 0.0492376 0.160021
0.0729828 0.0492376 0.0592658 0.0580938 0.0492376 0.0588685
0.154932 0.0492376 0.161101 … 0.0591634 0.0492376 0.160021
0.0729923 0.133842 0.0592659 0.157915 0.133842 0.160021
0.0729828 0.133842 0.0592658 0.0580938 0.133842 0.0588747
0.0729855 0.133842 0.161101 0.157915 0.133842 0.0644081
0.135789 0.0492376 0.161101 0.157915 0.0492376 0.160021
Determination of training parameters:¶
Out[0]:
Adam(0.01, (0.9, 0.999), 1.0e-8, IdDict{Any, Any}())
Defining a function to calculate the accuracy of the model:¶
Out[0]:
accuracy (generic function with 1 method)
Iterative model training process:¶
Epoch = 1 : Training Loss = 0.08882678, Model Accuracy = 21.357142857142858 %
Epoch = 2 : Training Loss = 0.08633855, Model Accuracy = 22.87857142857143 %
Epoch = 3 : Training Loss = 0.08413743, Model Accuracy = 29.114285714285714 %
Epoch = 4 : Training Loss = 0.082765914, Model Accuracy = 34.31428571428572 %
Epoch = 5 : Training Loss = 0.08176625, Model Accuracy = 36.614285714285714 %
Epoch = 6 : Training Loss = 0.08065751, Model Accuracy = 38.121428571428574 %
Epoch = 7 : Training Loss = 0.079435244, Model Accuracy = 45.050000000000004 %
Epoch = 8 : Training Loss = 0.078252606, Model Accuracy = 55.16428571428571 %
Epoch = 9 : Training Loss = 0.07740078, Model Accuracy = 61.79285714285714 %
Epoch = 10 : Training Loss = 0.07679748, Model Accuracy = 66.17857142857143 %
Epoch = 11 : Training Loss = 0.07649854, Model Accuracy = 69.19999999999999 %
Epoch = 12 : Training Loss = 0.07618407, Model Accuracy = 70.92857142857143 %
Epoch = 13 : Training Loss = 0.07574901, Model Accuracy = 72.02142857142857 %
Epoch = 14 : Training Loss = 0.075383395, Model Accuracy = 72.48571428571428 %
Epoch = 15 : Training Loss = 0.07500039, Model Accuracy = 73.20714285714286 %
Epoch = 16 : Training Loss = 0.07469048, Model Accuracy = 73.08571428571429 %
Epoch = 17 : Training Loss = 0.07434183, Model Accuracy = 73.94285714285715 %
Epoch = 18 : Training Loss = 0.07392979, Model Accuracy = 75.37857142857143 %
Epoch = 19 : Training Loss = 0.073610745, Model Accuracy = 76.27142857142857 %
Epoch = 20 : Training Loss = 0.07343323, Model Accuracy = 76.24285714285715 %
Epoch = 21 : Training Loss = 0.07315283, Model Accuracy = 76.32857142857142 %
Epoch = 22 : Training Loss = 0.07284213, Model Accuracy = 76.21428571428571 %
Epoch = 23 : Training Loss = 0.07260198, Model Accuracy = 75.86428571428571 %
Epoch = 24 : Training Loss = 0.0723972, Model Accuracy = 76.44285714285715 %
Epoch = 25 : Training Loss = 0.07218366, Model Accuracy = 78.10000000000001 %
Epoch = 26 : Training Loss = 0.072051615, Model Accuracy = 79.37857142857143 %
Epoch = 27 : Training Loss = 0.07194763, Model Accuracy = 80.12142857142858 %
Epoch = 28 : Training Loss = 0.07184025, Model Accuracy = 80.92857142857143 %
Epoch = 29 : Training Loss = 0.07170713, Model Accuracy = 81.10714285714286 %
Epoch = 30 : Training Loss = 0.0715578, Model Accuracy = 81.35 %
Epoch = 31 : Training Loss = 0.071458206, Model Accuracy = 81.42857142857143 %
Epoch = 32 : Training Loss = 0.071334094, Model Accuracy = 81.78571428571428 %
Epoch = 33 : Training Loss = 0.07123414, Model Accuracy = 82.19285714285715 %
Epoch = 34 : Training Loss = 0.071115755, Model Accuracy = 82.39285714285714 %
Epoch = 35 : Training Loss = 0.07096117, Model Accuracy = 82.54285714285714 %
Epoch = 36 : Training Loss = 0.07084565, Model Accuracy = 82.62142857142857 %
Epoch = 37 : Training Loss = 0.070747726, Model Accuracy = 82.8 %
Epoch = 38 : Training Loss = 0.07065126, Model Accuracy = 83.22857142857143 %
Epoch = 39 : Training Loss = 0.07053765, Model Accuracy = 83.71428571428572 %
Epoch = 40 : Training Loss = 0.07047585, Model Accuracy = 83.82857142857144 %
Epoch = 41 : Training Loss = 0.070413895, Model Accuracy = 83.76428571428572 %
Epoch = 42 : Training Loss = 0.07036532, Model Accuracy = 83.85714285714285 %
Epoch = 43 : Training Loss = 0.07026137, Model Accuracy = 84.17857142857143 %
Epoch = 44 : Training Loss = 0.07019601, Model Accuracy = 84.37142857142858 %
Epoch = 45 : Training Loss = 0.070140265, Model Accuracy = 84.17857142857143 %
Epoch = 46 : Training Loss = 0.07010393, Model Accuracy = 83.99285714285715 %
Epoch = 47 : Training Loss = 0.07005022, Model Accuracy = 83.96428571428571 %
Epoch = 48 : Training Loss = 0.06997585, Model Accuracy = 84.16428571428571 %
Epoch = 49 : Training Loss = 0.06992216, Model Accuracy = 84.42857142857143 %
Epoch = 50 : Training Loss = 0.06987861, Model Accuracy = 85.0142857142857 %
Visualisation of the change in the loss function at each training step:¶
Известный класс объекта: 0
Вектор, характеризующий класс объекта: Float32[0.23196934, 0.08533675, 0.08533675, 0.08533675, 0.08533675, 0.08533675, 0.08533675, 0.08533675, 0.08533675, 0.08533675]
In this example, the pixel brightness data was preprocessed and the neural network architecture, optimiser parameters and loss function were defined.
The model was trained and showed reasonably accurate, but not perfect class partitioning. To improve the recognition quality, the neural network can be modified by changing the architecture of layers and increasing the training sample.
{"id": "7eb014f7-a410-438d-80ca-4b8c52014482", "data": [{"xaxis": "x", "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "showlegend": false, "name": "y1", "colorscale": [[0, "rgba(0, 0, 0, 1)"], [1, "rgba(255, 255, 255, 1.000)"]], "colorbar": {"title": {"text": ""}}, "zmin": 0, "showscale": false, "z": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2578125, 0.5546875, 0.3515625, 0.1015625, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.51171875, 0.81640625, 0.9921875, 0.9921875, 0.89453125, 0.28515625, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0234375, 0.4296875, 0.9921875, 0.59765625, 0.64453125, 0.68359375, 0.97265625, 0.75390625, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.30078125, 0.9921875, 0.6015625, 0.07421875, 0, 0, 0.6875, 0.76953125, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.09765625, 0.39453125, 0.65234375, 0.75, 0.7421875, 0.5078125, 0.5078125, 0.953125, 0.8515625, 0.109375, 0.07421875, 0.0546875, 0.0703125, 0.8671875, 0.5234375, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0.34765625, 0.84765625, 0.99609375, 0.953125, 0.47265625, 0.765625, 0.87890625, 0.9921875, 0.9921875, 0.9921875, 0.83203125, 0.91015625, 0.84375, 0.89453125, 0.953125, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.26171875, 0.85546875, 0.9453125, 0.359375, 0.16015625, 0, 0.0546875, 0.27734375, 0.9921875, 0.6328125, 0.453125, 0.3359375, 0.234375, 0.65234375, 0.359375, 0.171875, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0.2421875, 0.671875, 0.9921875, 0.359375, 0, 0, 0, 0.0078125, 0.703125, 0.8984375, 0.015625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0.37890625, 0.9921875, 0.37890625, 0.015625, 0, 0, 0.0078125, 0.37890625, 0.90625, 0.1796875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0.7734375, 0.9921875, 0.26171875, 0, 0, 0, 0.24609375, 0.9921875, 0.70703125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.1484375, 0.94921875, 0.87890625, 0.0546875, 0, 0, 0.02734375, 0.703125, 0.984375, 0.234375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.1875, 0.9921875, 0.8515625, 0, 0, 0, 0.296875, 0.9921875, 0.5703125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.1875, 0.9921875, 0.8515625, 0, 0, 0, 0.77734375, 0.91015625, 0.203125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.0859375, 0.828125, 0.92578125, 0.359375, 0.015625, 0.41015625, 0.9296875, 0.4921875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0.10546875, 0.96875, 0.90234375, 0.57421875, 0.9921875, 0.93359375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.15625, 0.4765625, 0.98828125, 0.9921875, 0.3671875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0.08984375, 0.9375, 0.69140625, 0.0390625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.08203125, 0.79296875, 0.90625, 0.04296875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.640625, 0.921875, 0.359375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.73046875, 0.23046875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "zmax": 0.99609375, "zaxis": null, "yaxis": "y", "metadata": {"smartZoomParams": {"maxCount": 30, "minCount": 25000, "currentCount": 30}, "shouldEnableSmartZoom": false}, "type": "heatmap"}], "config": {"showlegend": true, "height": 400, "xaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "y", "range": [0, 29], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.03619130941965587, 0.9934383202099738], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "ticks": "inside", "type": "linear"}, "annotations": [], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"t": 20, "b": 20, "r": 0, "l": 0}, "yaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "x", "range": [29, 0], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.03762029746281716, 0.9901574803149606], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "ticks": "inside", "type": "linear"}, "width": 1213.3125, "legend": {"x": 1, "traceorder": "normal", "yanchor": "auto", "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "borderwidth": 1, "bordercolor": "rgba(0, 0, 0, 1)", "y": 1, "bgcolor": "rgba(255, 255, 255, 1.000)", "tracegroupgap": 0, "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "xanchor": "auto"}}}
{"id": "a167c7eb-be13-4260-a127-2f5240e9fc5b", "data": [{"xaxis": "x", "mode": "lines", "x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "showlegend": true, "name": "y1", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "y1", "y": [0.08882678300142288, 0.08633854985237122, 0.0841374322772026, 0.08276591449975967, 0.08176624774932861, 0.08065751194953918, 0.07943524420261383, 0.07825260609388351, 0.07740078121423721, 0.0767974779009819, 0.07649853825569153, 0.07618407160043716, 0.07574900984764099, 0.07538339495658875, 0.07500039041042328, 0.07469048351049423, 0.07434183359146118, 0.0739297866821289, 0.07361074537038803, 0.07343322783708572, 0.07315283268690109, 0.07284212857484818, 0.07260198146104813, 0.07239720225334167, 0.07218366116285324, 0.07205161452293396, 0.0719476267695427, 0.07184024900197983, 0.07170712947845459, 0.07155779749155045, 0.07145820558071136, 0.07133409380912781, 0.07123413681983948, 0.07111575454473495, 0.07096116989850998, 0.07084564864635468, 0.0707477256655693, 0.07065126299858093, 0.07053764909505844, 0.07047584652900696, 0.07041389495134354, 0.07036531716585159, 0.07026136666536331, 0.0701960101723671, 0.07014026492834091, 0.07010392844676971, 0.07005021721124649, 0.0699758529663086, 0.06992215663194656, 0.06987860798835754], "zmax": null, "line": {"shape": "linear", "color": "rgba(0, 154, 250, 1.000)", "dash": "solid", "width": 1}, "zaxis": null, "yaxis": "y", "metadata": {"smartZoomParams": {"maxCount": 50, "minCount": 25000, "currentCount": 50}, "shouldEnableSmartZoom": false}, "type": "scatter"}], "config": {"showlegend": true, "height": 400, "xaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "y", "range": [-0.4700000000000024, 51.47], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.10609871682706327, 0.9934383202099737], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": "Шаг обучения"}, "ticks": "inside", "type": "linear"}, "annotations": [{"y": 1, "yanchor": "top", "rotation": 0, "x": 0.5497685185185185, "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 20}, "yref": "paper", "xref": "paper", "showarrow": false, "text": "Изменение функции потерь", "xanchor": "center"}], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"t": 20, "b": 20, "r": 0, "l": 0}, "yaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "x", "range": [0.06931016273796559, 0.08939522825181484], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.07581474190726165, 0.9415463692038496], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": "Функция потерь"}, "ticks": "inside", "type": "linear"}, "width": 1213.3125, "legend": {"x": 1, "traceorder": "normal", "yanchor": "auto", "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "borderwidth": 1, "bordercolor": "rgba(0, 0, 0, 1)", "y": 1, "bgcolor": "rgba(255, 255, 255, 1.000)", "tracegroupgap": 0, "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "xanchor": "auto"}}}
{"id": "f6ddd741-dd9b-4db7-a169-904ae2141c75", "data": [{"xaxis": "x", "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "showlegend": false, "name": "y1", "colorscale": [[0, "rgba(0, 0, 0, 1)"], [1, "rgba(255, 255, 255, 1.000)"]], "colorbar": {"title": {"text": ""}}, "zmin": 0, "showscale": false, "z": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.5, 0.74609375, 0.99609375, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.74609375, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.5, 0.25, 0.5, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.74609375, 0.99609375, 0.99609375, 0.99609375, 0.25, 0, 0, 0.25, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.25, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0.99609375, 0.25, 0, 0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.74609375, 0.99609375, 0.99609375, 0.99609375, 0.74609375, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0.5, 0.99609375, 0.99609375, 0.99609375, 0.25, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.99609375, 0.74609375, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.25, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.74609375, 0.99609375, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.25, 0, 0, 0, 0, 0, 0, 0, 0.74609375, 0.99609375, 0.25, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0.74609375, 0.99609375, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.74609375, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0.99609375, 0.74609375, 0, 0, 0, 0, 0, 0, 0.99609375, 0.99609375, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0.25, 0.74609375, 0.74609375, 0.99609375, 0.99609375, 0.5, 0, 0.25, 0.25, 0.74609375, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.99609375, 0.99609375, 0.99609375, 0.74609375, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0.99609375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.74609375, 0.5, 0.25, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "zmax": 0.99609375, "zaxis": null, "yaxis": "y", "metadata": {"smartZoomParams": {"maxCount": 30, "minCount": 25000, "currentCount": 30}, "shouldEnableSmartZoom": false}, "type": "heatmap"}], "config": {"showlegend": true, "height": 400, "xaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "y", "range": [0, 29], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.03619130941965587, 0.9934383202099738], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "ticks": "inside", "type": "linear"}, "annotations": [], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"t": 20, "b": 20, "r": 0, "l": 0}, "yaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "x", "range": [29, 0], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.03762029746281716, 0.9901574803149606], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "ticks": "inside", "type": "linear"}, "width": 1213.3125, "legend": {"x": 1, "traceorder": "normal", "yanchor": "auto", "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "borderwidth": 1, "bordercolor": "rgba(0, 0, 0, 1)", "y": 1, "bgcolor": "rgba(255, 255, 255, 1.000)", "tracegroupgap": 0, "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "xanchor": "auto"}}}