Skip to content

Instantly share code, notes, and snippets.

View zyuzuguldu's full-sized avatar
🛰️
Hijacking

zahid zyuzuguldu

🛰️
Hijacking
View GitHub Profile
@zyuzuguldu
zyuzuguldu / custom_gbrt.py
Created June 6, 2024 16:54 — forked from tomonori-masui/custom_gbrt.py
CustomGradientBoostingRegressor
class CustomGradientBoostingRegressor:
def __init__(self, learning_rate, n_estimators, max_depth=1):
self.learning_rate = learning_rate
self.n_estimators = n_estimators
self.max_depth = max_depth
self.trees = []
def fit(self, X, y):
@zyuzuguldu
zyuzuguldu / compare_gbm_rmses.py
Created June 6, 2024 16:54 — forked from tomonori-masui/compare_gbm_rmses.py
Comparing custom GBM's RMSE to sklearn's
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.metrics import mean_squared_error
custom_gbm = CustomGradientBoostingRegressor(
n_estimators=20,
learning_rate=0.1,
max_depth=1
)
custom_gbm.fit(x, y)
custom_gbm_rmse = mean_squared_error(y, custom_gbm.predict(x), squared=False)
@zyuzuguldu
zyuzuguldu / CleanRepo.md
Created June 8, 2024 06:31 — forked from fschiettecatte/CleanRepo.md
Removing all traces of a file from a GIT repository

Removing all traces of a file from a GIT repository

I recently had to remove all traces of a file from a GIT repository.

First clone the repository:

git clone ssh://[email protected]/home/repositories/codebase codebase