|
283 | 283 | "\n", |
284 | 284 | "from ml_grid.pipeline.data import pipe\n", |
285 | 285 | "\n", |
286 | | - "base_project_dir_global = 'HFE_ML_experiments/'\n", |
| 286 | + "base_project_dir_global = 'HFE_ML_experiments_ts/'\n", |
287 | 287 | "\n", |
288 | 288 | "logger = setup_logger(log_folder_path = base_project_dir_global)\n", |
289 | 289 | "\n", |
|
309 | 309 | "\n", |
310 | 310 | "pathlib.Path(base_project_dir).mkdir(parents=True, exist_ok=True) \n", |
311 | 311 | "\n", |
312 | | - "input_csv_path = os.path.join('..', 'gloabl_files', 'ml_binary_classification_gridsearch_hyperOpt', 'notebooks' ,'unit_test_synthetic_time_series_data_large.csv') #large\n", |
| 312 | + "input_csv_path = 'unit_test_synthetic_time_series_data_large.csv' #large\n", |
313 | 313 | "\n", |
314 | 314 | "#init csv to store each local projects results\n", |
315 | 315 | "\n", |
|
423 | 423 | "best = fmin(fn=objective,\n", |
424 | 424 | " space=space,\n", |
425 | 425 | " algo=tpe.suggest,\n", |
426 | | - " max_evals=100,\n", |
| 426 | + " max_evals=2,\n", |
427 | 427 | " trials = trials,\n", |
428 | 428 | " verbose=1\n", |
429 | 429 | " )" |
|
477 | 477 | "feature_encoding_to_feature_names(pd.read_csv('../gloabl_files/ml_grid_ts_project/ml_binary_classification_gridsearch_hyperOpt/ml_grid/tests/unit_test_synthetic_time_series_data_large.csv'), results_df)" |
478 | 478 | ] |
479 | 479 | }, |
| 480 | + { |
| 481 | + "cell_type": "code", |
| 482 | + "execution_count": null, |
| 483 | + "metadata": {}, |
| 484 | + "outputs": [], |
| 485 | + "source": [ |
| 486 | + "# Import the necessary classes\n", |
| 487 | + "from ml_grid.results_processing.core import ResultsAggregator\n", |
| 488 | + "from ml_grid.results_processing.plot_master import MasterPlotter\n", |
| 489 | + "import pandas as pd\n", |
| 490 | + "\n", |
| 491 | + "# 1. Load your data using the ResultsAggregator\n", |
| 492 | + "# Replace with the actual path to your results and feature names file.\n", |
| 493 | + "# The feature_names_csv is optional but required for feature-related plots.\n", |
| 494 | + "try:\n", |
| 495 | + " aggregator = ResultsAggregator(\n", |
| 496 | + " root_folder='HFE_ML_experiments_ts',\n", |
| 497 | + " feature_names_csv='test_data_hfe_1yr_m_small_multiclass.csv')\n", |
| 498 | + " results_df = aggregator.aggregate_all_runs()\n", |
| 499 | + "\n", |
| 500 | + " # 2. Instantiate the MasterPlotter with your data\n", |
| 501 | + " master_plotter = MasterPlotter(results_df)\n", |
| 502 | + "\n", |
| 503 | + " # 3. Call the plot_all() method to generate all visualizations\n", |
| 504 | + " # You can customize the primary metric and other options.\n", |
| 505 | + " master_plotter.plot_all(metric='auc', stratify_by_outcome=True)\n", |
| 506 | + "\n", |
| 507 | + "except (ValueError, FileNotFoundError) as e:\n", |
| 508 | + " print(f\"An error occurred: {e}\")\n", |
| 509 | + " print(\"Please ensure your results folder path is correct and contains valid run data.\")\n", |
| 510 | + "\n" |
| 511 | + ] |
| 512 | + }, |
480 | 513 | { |
481 | 514 | "cell_type": "code", |
482 | 515 | "execution_count": null, |
|
855 | 888 | "kernelspec": { |
856 | 889 | "display_name": "ml_grid_ts_env", |
857 | 890 | "language": "python", |
858 | | - "name": "ml_grid_ts_env" |
| 891 | + "name": "python3" |
859 | 892 | }, |
860 | 893 | "language_info": { |
861 | 894 | "codemirror_mode": { |
|
867 | 900 | "name": "python", |
868 | 901 | "nbconvert_exporter": "python", |
869 | 902 | "pygments_lexer": "ipython3", |
870 | | - "version": "3.10.9" |
| 903 | + "version": "3.10.12" |
871 | 904 | } |
872 | 905 | }, |
873 | 906 | "nbformat": 4, |
|
0 commit comments