Skip to content

Commit

Permalink
Merge pull request #54 from MahdiAll99/dev
Browse files Browse the repository at this point in the history
deleted auto ml
  • Loading branch information
MahdiAll99 committed Mar 7, 2024
2 parents 9f30a45 + 430c25a commit 38ba3e8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions MEDimage/learning/RadiomicsLearner.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from pycaret.classification import *
from sklearn import metrics
from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
from supervised.automl import AutoML
from xgboost import XGBClassifier

from MEDimage.learning.DataCleaner import DataCleaner
Expand Down Expand Up @@ -314,7 +313,6 @@ def train_xgboost_model(
- "pycaret": Use PyCaret to train the model (automatic).
- "grid_search": Grid search with cross-validation to find the best parameters.
- "random_search": Random search with cross-validation to find the best parameters.
- "auto": AutoML to find the best XGBoost model.
use_gpu (bool, optional): Boolean specifying if the GPU should be used to train the model. Default is True.
seed (int, optional): Integer specifying the seed to use for the random number generator.
Expand All @@ -328,14 +326,7 @@ def train_xgboost_model(
# Finalize the new radiomics table with the remaining variables
var_table_train = finalize_rad_table(var_table_train)

if method == "auto":
# Best model using AutoML
classifier = AutoML(algorithms=["Xgboost"], mode="Compete", golden_features=False, eval_metric=metrics.matthews_corrcoef)

# Fit the best XGB Classifier
classifier.fit(var_table_train, outcome_table_binary_train)

elif method.lower() == "pycaret":
if method.lower() == "pycaret":
# Set up data for PyCaret
temp_data = pd.merge(var_table_train, outcome_table_binary_train, left_index=True, right_index=True)

Expand Down Expand Up @@ -699,7 +690,6 @@ def run_experiment(self, holdout_test: bool = True, method: str = "pycaret") ->
- "pycaret": Use PyCaret to train the model (automatic).
- "grid_search": Grid search with cross-validation to find the best parameters.
- "random_search": Random search with cross-validation to find the best parameters.
- "auto": AutoML to find the best XGBoost model.
Returns:
None
Expand Down

0 comments on commit 38ba3e8

Please sign in to comment.