title: Linear Regression problem, ridiculously high loss
body: <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  
  csv = 'C:\\Users\\Alex\\Downloads\\weight-height.csv'
  
  df = pd.read_csv(csv)
  df.head
  
  x_train = df['Height'].values
  #into centimetres because im english
  x_train = x_train * 2.54
  y_train = df['Weight'].values
  #into kilos because im english
  y_train = y_train / 2.2046226218
  
  plt.figure()
  plt.scatter(x_train, y_train, c=None)
  plt.show()
  print(X[:10])
  print(y[:10])
  
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense, Activation
  import numpy as np
  
  X = np.array(x_train).reshape(-1,1)
  y = np.array(y_train).reshape(-1,1)
  
  X = X[:5000]
  y = y[:5000]
  
  model = Sequential()
  model.add(Dense(36, activation='relu'))
  model.add(Dense(18))
  model.add(Dense(1))
  
  model.compile(optimizer='adam',
                loss='mean_squared_error',
                metrics=['accuracy'])
  
  history = model.fit(X,y, batch_size=1, epochs=1, validation_split=0.1)
  
  #plt.plot(history.history['acc'])
  #plt.plot(history.history['val_acc'])
  </code></pre>
  
  <p>My problem is pretty much that I'm a noob and I'm trying to create my own linear regression model from scratch using keras and I can't understand why my loss is so high. I need to know if its the optimizer or loss function I'm using or a data problem. The dataset is simply a list of weights and heights.</p>