Commit 96687cae authored by Christian Marius Lillelund's avatar Christian Marius Lillelund
Browse files

improved some code references

parent a1a6b918
Pipeline #86651 passed with stage
in 3 minutes and 14 seconds
This diff is collapsed.
......@@ -43,7 +43,7 @@ def main():
"scale_pos_weight": scale_pos_weight,
"use_label_encoder": False,
"learning_rate": 0.07,
"seed": 0
"random_state": 0
}
model = xgb.XGBClassifier(**params)
......
......@@ -5,7 +5,6 @@ from tools import file_writer, data_loader
from sklearn.model_selection import StratifiedKFold
import xgboost as xgb
from sklearn.metrics import accuracy_score
import xgboost as xgb
import pandas as pd
from utility.metrics import gini_xgb
import shap
......@@ -72,8 +71,7 @@ def get_best_shap_features(X: np.ndarray, y: np.ndarray,
eval_metric='logloss',
use_label_encoder=False,
n_jobs=-1,
random_state=0,
seed=seed)
random_state=seed)
acc_score_list = list()
for i, (train_index, test_index) in enumerate(kf.split(X, y)):
......
......@@ -55,7 +55,7 @@ def main(dataset_version : str = 'emb'):
"use_label_encoder": False,
"learning_rate": 0.07,
"eval_metric": "logloss",
"seed": 0
"random_state": 0
}
model = xgb.XGBClassifier(**params)
......
......@@ -61,7 +61,7 @@ class XgbClassifier(BaseClassifer):
"max_depth": 4,
"scale_pos_weight": scale_pos_weight,
"objective": "binary:logistic",
"seed": 0,
"random_state": 0,
"use_label_encoder": False,
"eval_metric": 'logloss'}
return xgb.XGBClassifier(**params)
......
import numpy as np
import pandas as pd
import paths as pt
from sklearn.model_selection import GridSearchCV
from xgboost import XGBClassifier
from tools import data_loader, file_writer
from tools import data_loader
from sklearn.model_selection import StratifiedKFold
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import roc_auc_score, accuracy_score
from sklearn.model_selection import cross_validate, cross_val_score
from sklearn.model_selection import cross_val_score
import matplotlib.pyplot as plt
from pathlib import Path
import paths as pt
......
import numpy as np
import pandas as pd
import paths as pt
from sklearn.model_selection import GridSearchCV
from xgboost import XGBClassifier
from tools import data_loader, file_writer
from tools import data_loader
from sklearn.model_selection import StratifiedKFold
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import roc_auc_score, accuracy_score
from imblearn.pipeline import make_pipeline, Pipeline
from imblearn.pipeline import Pipeline
from imblearn.over_sampling import ADASYN
import matplotlib.pyplot as plt
from pathlib import Path
......
import numpy as np
import pandas as pd
import paths as pt
import xgboost as xgb
from sklearn.model_selection import GridSearchCV
from tools import data_loader, file_writer
from tools import data_loader
from sklearn.model_selection import StratifiedKFold
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import roc_auc_score, accuracy_score
from sklearn.model_selection import cross_validate, cross_val_score
from sklearn.model_selection import cross_val_score
import matplotlib.pyplot as plt
from pathlib import Path
import paths as pt
import yaml
import xgboost as xgb
def main():
with open(Path.joinpath(pt.CONFIGS_DIR, "settings.yaml"), 'r') as stream:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment