<jupyter_start><jupyter_text>Epoch 799/8004/4 [==============================] - 0s 13ms/step - loss: 70.3076 - root_mean_squared_error: 8.3850 - val_loss: 60.6809 - val_root_mean_squared_error: 7.7898Epoch 800/8004/4 [==============================] - 0s 10ms/step - loss: 70.9484 - root_mean_squared_error: 8.4231 - val_loss: 62.0963 - val_root_mean_squared_error: 7.8801dict_keys(['loss', 'root_mean_squared_error', 'val_loss', 'val_root_mean_squared_error'])4/4 [==============================] - 0s 9ms/step - loss: 76.4740 - root_mean_squared_error: 8.7449 - val_loss: 60.9773 - val_root_mean_squared_error: 7.8088dict_keys(['loss', 'root_mean_squared_error', 'val_loss', 'val_root_mean_squared_error'])<jupyter_code>### history에서 loss와 val_loss의 key를 가지는 값들만 추출
loss = result.history['loss']
val_loss = result.history['val_loss']

### loss와 val_loss를 그래프화
epochs = range(1, len(loss) + 1)
plt.subplot(211)  ## 2x1 개의 그래프 중에 1번째
plt.plot(epochs, loss, 'bo', label='Training loss')
plt.plot(epochs, val_loss, 'b', label='Validation loss')
plt.title('Training and validation loss')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.legend()

### history에서 root_mean_squared_error val_root_mean_squared_error key를 가지는 값들만 추출
rmse = result.history['root_mean_squared_error']
val_rmse = result.history['val_root_mean_squared_error']
epochs = range(1, len(rmse) + 1)
### mean_absolute_error와  val_mean_absolute_error key를 그래프화
plt.subplot(212)  ## 2x1 개의 그래프 중에 2번째
plt.plot(epochs, rmse, 'ro', label='Training rmse')
plt.plot(epochs, val_rmse, 'r', label='Validation rmse')
plt.title('Training and validation rmse')
plt.xlabel('Epochs')
plt.ylabel('rmse')
plt.legend()

print("\n Test rmse: %.4f" % (model.evaluate(X_test,Y_test)[1]))

plt.show()<jupyter_output>4/4 [==============================] - 0s 3ms/step - loss: 18.3287 - root_mean_squared_error: 4.2812

 Test rmse: 4.2812
{'fraction_non_alphanumeric': 0.20458177943526903, 'fraction_numerical': 0.06925945657964838, 'mean_word_length': 6.603238866396761, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '448725', 'license': 'Apache-2.0', 'n_tokens_mistral': 880, 'n_tokens_neox': 786, 'n_words': 137, 'path': 'tensorflow/day2/exercise/02_07_house_prediction_data_div_with_normalization.ipynb', 'repo_name': 'daludaluking/LG_AI_all_in_one-', 'size': '1877'}