Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for...
- new_line['x'] = a
- new_line['y'] = b
- new_line['z'] = a + math.cos(math.pi * b)
- rows_list.append(new_line)
- dataset = pd.DataFrame(rows_list, columns=['x','y','z'])
- ...
- model = keras.Sequential([
- layers.Dense(8, activation='relu', input_shape=[len(features.keys())]),
- layers.Dense(8, activation='relu'),
- layers.Dense(1, activation='relu')
- ])
- optimizer = tf.keras.optimizers.RMSprop(learning_rate=0.005)
- model.compile(loss='mse',
- optimizer=optimizer,
- metrics=['mae', 'mse'])
- model.fit(features, labels, validation_split=0.2, epochs=500)
- ...
- print("Expected | Predicted")
- # iterating over rows using iterrows() function
- for i, j in example_labels.iterrows():
- print(j[0], example_result[i][0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement