def batch(): print("Tesing the accuracy of LogisticRegression(batch)...") # Train model clf = LogisticRegression() clf.fit(X=X_train, y=y_train, lr=0.05, epochs=200) # Model accuracy get_acc(clf, X_test, y_test)
def batch(): print("Tesing the performance of LogisticRegression(batch)...") # Train model clf = LogisticRegression() clf.fit(X=X_train, y=y_train, lr=0.05, epochs=200) # Model evaluation model_evaluation(clf, X_test, y_test)
def batch(): print("Tesing the performance of LogisticRegression(batch)...") # Train model clf = LogisticRegression() clf.fit(data=data_train, label=label_train, learning_rate=0.1, epochs=1000) # Model evaluation model_evaluation(clf, data_test, label_test) print(clf)
def stochastic(): print("Tesing the performance of LogisticRegression(stochastic)...") # Train model clf = LogisticRegression() clf.fit(data=data_train, label=label_train, learning_rate=0.01, epochs=100, method="stochastic", sample_rate=0.8) # Model evaluation model_evaluation(clf, data_test, label_test) print(clf)
def stochastic(): print("Tesing the performance of LogisticRegression(stochastic)...") # Train model clf = LogisticRegression() clf.fit(X=X_train, y=y_train, lr=0.01, epochs=100, method="stochastic", sample_rate=0.8) # Model evaluation model_evaluation(clf, X_test, y_test) print(clf)
def stochastic(): print("Tesing the accuracy of LogisticRegression(stochastic)...") # Train model clf = LogisticRegression() clf.fit(X=X_train, y=y_train, lr=0.01, epochs=200, method="stochastic", sample_rate=0.5) # Model accuracy get_acc(clf, X_test, y_test)