Skip to content

Commit

Permalink
perf: optimze the loading of built-in application data.
Browse files Browse the repository at this point in the history
  • Loading branch information
SanyHe committed Feb 27, 2024
1 parent 2872da2 commit bc56c7e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions geochemistrypi/data_mining/cli_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,21 @@ def cli_pipeline(training_data_path: str, application_data_path: Optional[str] =
logger.debug("Built-in Application Data Loading")
# If the user doesn't provide training data path and inference data path, then use the built-in inference data.
if is_built_in_inference_data and built_in_training_data_num == 1:
application_data_path = "InferenceData_Regression.xlsx"
application_data_path = "ApplicationData_Regression.xlsx"
inference_data = read_data(file_path=application_data_path)
print(f"Successfully loading the built-in inference data set '{application_data_path}'.")
print(f"Successfully loading the built-in application data set '{application_data_path}'.")
show_data_columns(inference_data.columns)
clear_output()
elif is_built_in_inference_data and built_in_training_data_num == 2:
application_data_path = "InferenceData_Classification.xlsx"
application_data_path = "ApplicationData_Classification.xlsx"
inference_data = read_data(file_path=application_data_path)
print(f"Successfully loading the built-in inference data set '{application_data_path}'.")
print(f"Successfully loading the built-in application data set '{application_data_path}'.")
show_data_columns(inference_data.columns)
clear_output()
elif is_built_in_inference_data and built_in_training_data_num == 3:
inference_data = None
elif is_built_in_inference_data and built_in_training_data_num == 4:
inference_data = None
clear_output()

# <--- World Map Projection --->
logger.debug("World Map Projection")
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions geochemistrypi/data_mining/model/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -4115,7 +4115,7 @@ def __init__(

@property
def settings(self) -> Dict:
"""The configuration of Lasso to implement AutoML by FLAML framework."""
"""The configuration of Ridge to implement AutoML by FLAML framework."""
configuration = {
"time_budget": 10, # total running time in seconds
"metric": "r2",
Expand All @@ -4128,7 +4128,7 @@ def settings(self) -> Dict:

@property
def customization(self) -> object:
"""The customized Lasso of FLAML framework."""
"""The customized Ridge of FLAML framework."""
from flaml import tune
from flaml.data import REGRESSION
from flaml.model import SKLearnEstimator
Expand Down

0 comments on commit bc56c7e

Please sign in to comment.