diff --git "a/conv_antarctis_randomsearch.ipynb" "b/conv_antarctis_randomsearch.ipynb" new file mode 100644--- /dev/null +++ "b/conv_antarctis_randomsearch.ipynb" @@ -0,0 +1,979 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "e7e09770", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import xarray as xr\n", + "from sklearn.model_selection import train_test_split\n", + "import matplotlib.pyplot as plt\n", + "from tensorflow.keras import layers\n", + "from tensorflow import keras\n", + "import keras_tuner as kt" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "797deb25", + "metadata": {}, + "outputs": [], + "source": [ + "#data = xr.open_dataset('conv_train_1.nc')\n", + "data = xr.open_dataset(r'C:\\Users\\marku\\Desktop\\4år\\AML\\Final_project_huggingface\\finalprojectdata\\conv_train_1.nc')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "399483a9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(99766, 27, 27)" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data.images.values.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "a92d3499", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
<xarray.Dataset> Size: 298MB\n", + "Dimensions: (sample: 99766, x: 27, y: 27)\n", + "Coordinates:\n", + " * sample (sample) int32 399kB 0 1 2 3 4 5 ... 99761 99762 99763 99764 99765\n", + " * x (x) int32 108B 0 1 2 3 4 5 6 7 8 9 ... 18 19 20 21 22 23 24 25 26\n", + " * y (y) int32 108B 0 1 2 3 4 5 6 7 8 9 ... 18 19 20 21 22 23 24 25 26\n", + "Data variables:\n", + " images (sample, x, y) float32 291MB 1.093e+03 1.093e+03 ... 2.133e+03\n", + " labels (sample) float64 798kB ...\n", + " vx (sample) float64 798kB ...\n", + " vy (sample) float64 798kB ...\n", + " v (sample) float64 798kB ...\n", + " smb (sample) float64 798kB ...\n", + " z (sample) float64 798kB ...\n", + " s (sample) float64 798kB ...\n", + " temp (sample) float64 798kB ...\n", + "Attributes:\n", + " description: CNN data with elevation images. Scalar features are everyth...