-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from quanted/gemini-models
Gemini models
- Loading branch information
Showing
15 changed files
with
92,711 additions
and
61,854 deletions.
There are no files selected for viewing
44,258 changes: 21,091 additions & 23,167 deletions
44,258
notebooks/.ipynb_checkpoints/epa_nmf-py_workflow_01-checkpoint.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
38,263 changes: 18,445 additions & 19,818 deletions
38,263
notebooks/.ipynb_checkpoints/epa_nmf-py_workflow_01-data-test-checkpoint.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
notebooks/.ipynb_checkpoints/gemini-analysis-checkpoint.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "2ce7bb70-e4ee-4e27-a8c9-9ce1ab0b5fc0", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Notebook imports\n", | ||
"import os\n", | ||
"import sys\n", | ||
"import json\n", | ||
"\n", | ||
"module_path = os.path.abspath(os.path.join('..'))\n", | ||
"if module_path not in sys.path:\n", | ||
" sys.path.append(module_path)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "bccedc41-222f-46b6-9461-e64a35cbeb7e", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"LS_NMF = \"D:\\\\\\\\projects\\\\nmf_py\\\\funsearch\\\\algorithms\\\\ls-nmf\\\\summary.json\"\n", | ||
"WS_NMF = \"D:\\\\\\\\projects\\\\nmf_py\\\\funsearch\\\\algorithms\\\\ws-nmf\\\\summary.json\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"id": "44131ca7-2cb7-40d9-ba1c-0097708e202f", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Best Model: 267, Q(robust): 54418.75, Base Q(robust): 54424.27\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"best_Q = None\n", | ||
"best_model = None\n", | ||
"base_Q = None\n", | ||
"with open(LS_NMF, 'r') as gemini_file:\n", | ||
" model_summary = json.load(gemini_file)\n", | ||
" for k, v in model_summary.items():\n", | ||
" k_Q = v[\"Q(robust)\"][0]\n", | ||
" if best_Q is None:\n", | ||
" best_Q = k_Q\n", | ||
" best_model = k\n", | ||
" elif k_Q < best_Q:\n", | ||
" best_Q = k_Q\n", | ||
" best_model = k\n", | ||
" if k == '0':\n", | ||
" base_Q = k_Q\n", | ||
"\n", | ||
"print(f\"Best Model: {best_model}, Q(robust): {best_Q}, Base Q(robust): {base_Q}\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fe5ac9bc-3767-4529-90ce-e2e5e6f4eb1a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Oops, something went wrong.