![]() You are now ready to define your neural network model. We can then select the output column (the 9th variable) via index 8. You can select the first eight columns from index 0 to index 7 via the slice 0:8. You can split the array into two arrays by selecting subsets of columns using the standard NumPy slice operator or “:”. The data will be stored in a 2D array where the first dimension is rows and the second dimension is columns, e.g. Once the CSV file is loaded into memory, you can split the columns of data into input and output variables. Body mass index (weight in kg/(height in m)^2).Plasma glucose concentration at 2 hours in an oral glucose tolerance test.The variables can be summarized as follows: You will be learning a model to map rows of input variables (X) to an output variable (y), which is often summarized as y = f(X). There are eight input variables and one output variable (the last column). You can now load the file as a matrix of numbers using the NumPy function loadtxt(). Update Jun/2022: Updated to modern TensorFlow syntax.Update Oct/2021: Deprecated predict_class syntax.Update Aug/2020: Updated for Keras v2.4.3 and TensorFlow v2.3. ![]()
0 Comments
Leave a Reply. |