def create_model(X_train, Y_train):
    'create_model will create a very simple neural net model and  save the weights in a predefined directory.\n\n    Args:\n        X_train:    Input X_train\n        Y_train:    Lables Y_train\n    '
    xin = X_train.shape[1]
    model = Sequential()
    model.add(Dense(units=4, input_shape=(xin,)))
    model.add(Activation('tanh'))
    model.add(Dense(4))
    model.add(Activation('linear'))
    model.add(Dense(1))
    rms = kop.RMSprop()
    print('compiling now..')
    model.compile(loss='mse', optimizer=rms)
    model.fit(X_train, Y_train, epochs=1000, batch_size=1, verbose=2)
    score = model.evaluate(X_train, Y_train, batch_size=1)
    print('Evaluation results:', score)
    open('pickles/my_model_architecture.json', 'w').write(model.to_json())
    print('Saving weights in: ./pickles/my_model_weights.h5')
    model.save_weights('pickles/my_model_weights.h5')
create_model will create a very simple neural net model and  save the weights in a predefined directory.

Args:
    X_train:    Input X_train
    Y_train:    Lables Y_train
def create_model(X_train, Y_train):
    'create_model will create a very simple neural net model and  save the weights in a predefined directory.\n\n    Args:\n        X_train:    Input X_train\n        Y_train:    Lables Y_train\n    '
    xin = X_train.shape[1]
    model = Sequential()
    model.add(Dense(units=4, input_shape=(xin,)))
    model.add(Activation('tanh'))
    model.add(Dense(4))
    model.add(Activation('linear'))
    model.add(Dense(1))
    rms = kop.RMSprop()
    print('compiling now..')
    model.compile(loss='mse', optimizer=rms)
    model.fit(X_train, Y_train, epochs=1000, batch_size=1, verbose=2)
    score = model.evaluate(X_train, Y_train, batch_size=1)
    print('Evaluation results:', score)
    open('pickles/my_model_architecture.json', 'w').write(model.to_json())
    print('Saving weights in: ./pickles/my_model_weights.h5')
    model.save_weights('pickles/my_model_weights.h5')