Skip to content

Commit

Permalink
Merge pull request #31 from NCAR/ggantos
Browse files Browse the repository at this point in the history
post hackathon typo fixes
  • Loading branch information
djgagne authored Jul 1, 2020
2 parents 54ece6e + 0a8b592 commit 0533e19
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 423 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# model output directories
*_models/
476 changes: 64 additions & 412 deletions notebooks/holodec.ipynb

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions notebooks/microphysics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
"out_scales_df = pd.concat(out_scales_list)\n",
"out_scales_df.to_csv(join(out_path, \"output_scale_values.csv\"),\n",
" index_label=\"output\")\n",
"out_scales_df"
"out_scales_df\n"
]
},
{
Expand Down Expand Up @@ -327,20 +327,22 @@
"source": [
"# Inverse transform and scaling of scaled train data\n",
"\n",
"output_col = \"nrtend_TAU\"\n",
"original_out_train_nr = np.zeros(scaled_out_train.shape[0])\n",
"original_out_train_nr[labels_train[\"nrtend_TAU\"] == 1] = 10 ** output_scalers[\"nrtend_TAU\"][1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[\"nrtend_TAU\"] == 1, [\"nrtend_TAU\"]]).ravel()\n",
"original_out_train_nr[labels_train[\"nrtend_TAU\"] == -1] = -10 ** output_scalers[\"nrtend_TAU\"][-1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[\"nrtend_TAU\"] == -1, [\"nrtend_TAU\"]]).ravel()\n",
"\n",
"original_out_train_nr[labels_train[output_col] == 1] = 10 ** output_scalers[output_col][1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[output_col] == 1, [output_col]]).ravel()\n",
"original_out_train_nr[labels_train[output_col] == -1] = -10 ** output_scalers[output_col][-1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[output_col] == -1, [output_col]]).ravel()\n",
"\n",
"output_col = \"nctend_TAU\"\n",
"original_out_train_nc = np.zeros(scaled_out_train.shape[0])\n",
"original_out_train_nc[labels_train[\"nctend_TAU\"] == 1] = -10 ** output_scalers[\"nctend_TAU\"][1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[\"nctend_TAU\"] == 1, [\"nctend_TAU\"]]).ravel()\n",
"original_out_train_nc[labels_train[output_col] == 1] = -10 ** output_scalers[output_col][1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[output_col] == 1, [output_col]]).ravel()\n",
"\n",
"output_col = \"qrtend_TAU\"\n",
"original_out_train_qr = np.zeros(scaled_out_train.shape[0])\n",
"original_out_train_qr[labels_train[\"qrtend_TAU\"] == 1] = 10 ** output_scalers[\"qrtend_TAU\"][1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[\"qrtend_TAU\"] == 1, [\"qrtend_TAU\"]]).ravel()\n"
"original_out_train_qr[labels_train[output_col] == 1] = 10 ** output_scalers[output_col][1].inverse_transform(\n",
" scaled_out_train.loc[labels_train[output_col] == 1, [output_col]]).ravel()\n"
]
},
{
Expand Down Expand Up @@ -867,7 +869,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0533e19

Please sign in to comment.