diff --git a/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_Error.png b/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_Error.png new file mode 100644 index 0000000000000000000000000000000000000000..bba3ac45c24332262d8dc4b7e5c8893dc2e30a97 Binary files /dev/null and b/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_Error.png differ diff --git a/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_Predicted.png b/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_Predicted.png new file mode 100644 index 0000000000000000000000000000000000000000..0e30efb76215bbbf279c3924df9360c83508a254 Binary files /dev/null and b/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_Predicted.png differ diff --git a/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_True.png b/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_True.png new file mode 100644 index 0000000000000000000000000000000000000000..b46211e1decbef1dc4bf5674557ca7f6aefc937c Binary files /dev/null and b/src/Visualizations/HighestError/Pressure_RBFCubic_R8_i59_True.png differ diff --git a/src/i6_VisualizeDifferentErrorFields.py b/src/i6_VisualizeDifferentErrorFields.py index e854c048d4f5e643553bcff8735449a2e5d6fd13..cc0b040a1f9a2f0ea4b3383aae1ef73b6ee45e34 100644 --- a/src/i6_VisualizeDifferentErrorFields.py +++ b/src/i6_VisualizeDifferentErrorFields.py @@ -26,8 +26,10 @@ norm_funcs = { ModelFolder = f'{DataFolder}/TrainedModels/RBF_cubic' PatchesFolder = f'{DataFolder}/Patches' -R_ = 21 -sample = 14 +# R_ = 21 +# sample = 14 +R_ = 8 +sample = 59 GEOMETRY_FILE = f'{DataFolder}/test/microstructure/index_{sample}.xml' PRESSURE_FILE = f'{PatchesFolder}/POD_{int(R_)}/pressure_field_patches_{sample}.xml' diff --git a/src/i8_IdentifyWorstPrediction.ipynb b/src/i8_IdentifyWorstPrediction.ipynb index 6f66293f6bc99924e7b9c3c732f42987e9c4b1ac..7126b08c3c8e909950e286897357eb0f8dc23ad9 100644 --- a/src/i8_IdentifyWorstPrediction.ipynb +++ b/src/i8_IdentifyWorstPrediction.ipynb @@ -45,7 +45,8 @@ "source": [ "# Take the 99 percent cutoff\n", "# As the velocity cutoff is later than the pressure cutoff we take the velocity cutoff\n", - "R = 16\n", + "# R = 16 # Velocity\n", + "R = 8 # Pressure\n", "models = {\n", " # 'POD'\n", " # 'LinearRegression',\n", @@ -86,15 +87,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "Evaluating model RBF_cubic with R=16 for H_REFINEMENT=0\n" + "Evaluating model RBF_cubic with R=8 for H_REFINEMENT=0\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 64/64 [00:36<00:00, 1.77it/s]\n", - "100%|██████████| 1/1 [00:36<00:00, 36.16s/it]\n" + "100%|██████████| 64/64 [00:38<00:00, 1.66it/s]\n", + "100%|██████████| 1/1 [00:38<00:00, 38.55s/it]\n" ] } ], @@ -188,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 7, "id": "c8e0eca1", "metadata": {}, "outputs": [ @@ -198,7 +199,7 @@ "((1, 64), (1, 64), (1, 64))" ] }, - "execution_count": 9, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -212,7 +213,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 8, "id": "ebf09da1", "metadata": {}, "outputs": [], @@ -248,7 +249,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 9, "id": "5b6e6c8f", "metadata": {}, "outputs": [ @@ -256,11 +257,11 @@ "data": { "text/plain": [ "((array([0]), array([59])),\n", - " (array([0]), array([63])),\n", - " (array([0]), array([55])))" + " (array([0]), array([31])),\n", + " (array([0]), array([23])))" ] }, - "execution_count": 11, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -274,7 +275,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 10, "id": "bd27750b", "metadata": {}, "outputs": [ @@ -286,17 +287,17 @@ "Pressure\n", "Model with maximum relative L2 error: RBF_cubic\n", "Test sample for the maximum error: 59\n", - "Max Pressure Error: [0.0580657]\n", + "Max Pressure Error: [0.05816053]\n", "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n", "Velocity X\n", "Model with maximum relative L2 error: RBF_cubic\n", - "Test sample for the maximum error: 63\n", - "Max Velocity X Error: [0.03785187]\n", + "Test sample for the maximum error: 31\n", + "Max Velocity X Error: [0.07722455]\n", "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n", "Velocity Y\n", "Model with maximum relative L2 error: RBF_cubic\n", - "Test sample for the maximum error: 55\n", - "Max Velocity Y Error: [0.06116032]\n", + "Test sample for the maximum error: 23\n", + "Max Velocity Y Error: [0.22988784]\n", "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" ] }, @@ -304,9 +305,9 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/v_/5q1gkdc53z34pdsfnpkx2t340000gn/T/ipykernel_81308/1771942688.py:9: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)\n", + "/var/folders/v_/5q1gkdc53z34pdsfnpkx2t340000gn/T/ipykernel_59850/1771942688.py:9: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)\n", " print(f'Model with maximum relative L2 error: {model_list[int(idx[0])]}')\n", - "/var/folders/v_/5q1gkdc53z34pdsfnpkx2t340000gn/T/ipykernel_81308/1771942688.py:10: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)\n", + "/var/folders/v_/5q1gkdc53z34pdsfnpkx2t340000gn/T/ipykernel_59850/1771942688.py:10: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)\n", " print(f'Test sample for the maximum error: {int(idx[1])}')\n" ] }