Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 15, 2021 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/ecc3152fe984cb5c9fe1344035fc18c9 to your computer and use it in GitHub Desktop.
Save amankharwal/ecc3152fe984cb5c9fe1344035fc18c9 to your computer and use it in GitHub Desktop.
lgbm_tuned = LGBMClassifier(boosting_type = 'gbdt',
class_weight = None,
min_child_samples = 20,
num_leaves = 30,
subsample_for_bin = 20000,
learning_rate=0.01,
max_depth=10,
n_estimators=40,
colsample_bytree=0.6) # LightGBM Classifier with optimum paramteres
lgbm_tuned.fit(X_train, y_train)
y_test_pred = lgbm_tuned.predict(X_test) #Predicting X_test to find the solutiın
score = round(accuracy_score(y_test, y_test_pred), 3) # Find the accuracy of y_test and predicitons, and round the result
print(score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment