<jupyter_start><jupyter_text>Artificial Neural Network  Importing the libraries<jupyter_code>import numpy as np
import pandas as pd
import tensorflow as tf
tf.__version__<jupyter_output><empty_output><jupyter_text>Part 1 - Data Preprocessing  Importing the dataset<jupyter_code>dataset = pd.read_excel('Folds5x2_pp.xlsx')
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values<jupyter_output><empty_output><jupyter_text>Splitting the dataset into the Training set and Test set<jupyter_code>from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0)<jupyter_output><empty_output><jupyter_text>Part 2 - Building the ANN  Initializing the ANN<jupyter_code>ann = tf.keras.models.Sequential()<jupyter_output><empty_output><jupyter_text>Adding the input layer and the first hidden layer<jupyter_code>ann.add(tf.keras.layers.Dense(units=6, activation='relu'))<jupyter_output><empty_output><jupyter_text>Adding the second hidden layer<jupyter_code>ann.add(tf.keras.layers.Dense(units=6, activation='relu'))<jupyter_output><empty_output><jupyter_text>Adding the output layer<jupyter_code>ann.add(tf.keras.layers.Dense(units=1))<jupyter_output><empty_output><jupyter_text>Part 3 - Training the ANN  Compiling the ANN<jupyter_code>ann.compile(optimizer = 'adam', loss = 'mean_squared_error')<jupyter_output><empty_output><jupyter_text>Training the ANN model on the Training set<jupyter_code>ann.fit(X_train, y_train, batch_size = 32, epochs = 100)<jupyter_output>Epoch 1/100
240/240 [==============================] - 0s 2ms/step - loss: 82110.9922
Epoch 2/100
240/240 [==============================] - 0s 1ms/step - loss: 656.9040
Epoch 3/100
240/240 [==============================] - 0s 1ms/step - loss: 429.4050
Epoch 4/100
240/240 [==============================] - 0s 1ms/step - loss: 417.9655
Epoch 5/100
240/240 [==============================] - 0s 1ms/step - loss: 405.0805
Epoch 6/100
240/240 [==============================] - 0s 1ms/step - loss: 388.9652
Epoch 7/100
240/240 [==============================] - 0s 2ms/step - loss: 371.9583
Epoch 8/100
240/240 [==============================] - 0s 1ms/step - loss: 353.7564
Epoch 9/100
240/240 [==============================] - 0s 1ms/step - loss: 332.1931
Epoch 10/100
240/240 [==============================] - 0s 1ms/step - loss: 310.8850
Epoch 11/100
240/240 [==============================] - 0s 1ms/step - loss: 288.6723
Epoch 12/100
240/240 [==============================] - 0s 1ms/step - lo[...]<jupyter_text>Predicting the results of the Test set<jupyter_code>y_pred = ann.predict(X_test)
np.set_printoptions(precision=2)
print(np.concatenate((y_pred.reshape(len(y_pred),1), y_test.reshape(len(y_test),1)),1))<jupyter_output>[[430.79 431.23]
 [461.8  460.01]
 [465.29 461.14]
 ...
 [472.51 473.26]
 [439.39 438.  ]
 [458.55 463.28]]
{'fraction_non_alphanumeric': 0.24463667820069204, 'fraction_numerical': 0.10553633217993079, 'mean_word_length': 6.356234096692112, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '360286', 'license': 'MIT', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1038, 'n_words': 203, 'path': 'Basic ANN (regression and classification)/artificial_neural_network_regression.ipynb', 'repo_name': 'yttehs123/Deep-learning-models', 'size': '2890'}