def train_m_step_early_stopp(self, classifier, social_features, prob_e_step, steps, total_epochs, y_test, y_val, X_val, start_val):
    monitor = EarlyStopping(monitor='val_loss', min_delta=0.001, patience=10, verbose=0, mode='auto', restore_best_weights=True)
    classifier.fit(social_features, prob_e_step, validation_data=(X_val, y_val), callbacks=[monitor], verbose=0, epochs=total_epochs, batch_size=4)
    theta_i = classifier.predict(social_features)
    weights = classifier.get_weights()[0]
    return (theta_i, classifier, weights)
def train_m_step_early_stopp(self, classifier, social_features, prob_e_step, steps, total_epochs, y_test, y_val, X_val, start_val):
    monitor = EarlyStopping(monitor='val_loss', min_delta=0.001, patience=10, verbose=0, mode='auto', restore_best_weights=True)
    classifier.fit(social_features, prob_e_step, validation_data=(X_val, y_val), callbacks=[monitor], verbose=0, epochs=total_epochs, batch_size=4)
    theta_i = classifier.predict(social_features)
    weights = classifier.get_weights()[0]
    return (theta_i, classifier, weights)