To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 3cf7fae9 authored by felikskiszkurno's avatar felikskiszkurno
Browse files

Set parameters for execution on HPC. Commit only to ETHZ gitlab

parent af7ef1e3
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Statistic">
<option name="excludedDirectories">
<list>
<option value="$PROJECT_DIR$/results" />
<option value="$PROJECT_DIR$/results_old" />
<option value="$PROJECT_DIR$/notebooks" />
</list>
</option>
</component>
</project>
\ No newline at end of file
......@@ -20,8 +20,8 @@ import pygimli.meshtools as mt
import pygimli.physics.ert as ert
# Config
create_new_data = False
create_new_data_only = False
create_new_data = True
create_new_data_only = True
# Prepare folder structure for output
is_success = slopestabilitytools.folder_structure.create_folder_structure()
......@@ -35,25 +35,25 @@ else:
# TODO Put this part into a function
# Settings
number_of_tests = 5
number_of_tests = 100
rho_spread_factor = 1.5
rho_max = 10
rho_max = 25
layers_min = 1
layers_max = 1
layers_max = 2
min_depth = 4
max_depth = 8
max_depth = 15
# Generate parameters for tests
# tests_horizontal = slopestabilitytools.model_params(number_of_tests,
# rho_spread_factor, rho_max,
# layers_min, layers_max,
# min_depth, max_depth)
tests_horizontal = {'hor_1': {'layer_n': 1, 'rho_values': [[1, 5], [2, 15]], 'layers_pos': np.array([-5])},
'hor_2': {'layer_n': 1, 'rho_values': [[1, 5], [2, 50]], 'layers_pos': np.array([-5])},
'hor_3': {'layer_n': 1, 'rho_values': [[1, 15], [2, 20]], 'layers_pos': np.array([-8])},
'hor_4': {'layer_n': 1, 'rho_values': [[1, 5], [2, 10]], 'layers_pos': np.array([-3])},
'hor_5': {'layer_n': 1, 'rho_values': [[1, 5], [2, 25]], 'layers_pos': np.array([-3])}}
tests_horizontal = slopestabilitytools.model_params(number_of_tests,
rho_spread_factor, rho_max,
layers_min, layers_max,
min_depth, max_depth)
# tests_horizontal = {'hor_1': {'layer_n': 1, 'rho_values': [[1, 5], [2, 15]], 'layers_pos': np.array([-5])},
# 'hor_2': {'layer_n': 1, 'rho_values': [[1, 5], [2, 50]], 'layers_pos': np.array([-5])},
# 'hor_3': {'layer_n': 1, 'rho_values': [[1, 15], [2, 20]], 'layers_pos': np.array([-8])},
# 'hor_4': {'layer_n': 1, 'rho_values': [[1, 5], [2, 10]], 'layers_pos': np.array([-3])},
# 'hor_5': {'layer_n': 1, 'rho_values': [[1, 5], [2, 25]], 'layers_pos': np.array([-3])}}
# Create models and invert them
test_results = {}
......
......@@ -56,6 +56,7 @@ def run_classification(test_training, test_prediction, test_results, clf):
score = clf_pipeline_UM.score(x_question, y_answer)
# print('score: '+str(score))
# TODO: Move plotting to a function for plotting a, b and a-b
x = test_results[test_name_pred]['X']
y = test_results[test_name_pred]['Y']
class_in = test_results[test_name]['CLASS']
......@@ -114,7 +115,8 @@ def run_classification(test_training, test_prediction, test_results, clf):
fig.savefig('results/figures/pdf/{}_ML_class_res.pdf'.format(test_name_pred))
# Evaluate result
accuracy_score.append(len(np.where(y_pred == y_answer.to_numpy())) / len(y_answer.to_numpy()) * 100)
#accuracy_score.append(len(np.where(y_pred == y_answer.to_numpy())) / len(y_answer.to_numpy()) * 100)
accuracy_score.append(score)
accuracy_labels.append(test_name_pred)
return accuracy_labels, accuracy_score
......
......@@ -42,6 +42,7 @@ def plot_and_save(test_name, test_result, plot_title):
print('plot_and_save')
# Plot data input, inversion result and difference
# TODO: Move plotting to a function for plotting a, b and a-b
cb = []
fig, _ax = plt.subplots(nrows=3, ncols=1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment