diff --git a/examples/demo_visualization.py b/examples/demo_visualization.py index 8ba6498..7bdf06e 100644 --- a/examples/demo_visualization.py +++ b/examples/demo_visualization.py @@ -49,7 +49,7 @@ def binary_polygon( """ # Creates a Polygon abject out of the polygon vertices in pzs - poly = Polygon(pzs, True) + poly = Polygon(pzs, closed=True) # Checks which points are enclosed by polygon. ind = np.nonzero(poly.contains_points(xys))[0] phi = np.ones((nrow, ncol)) * outside # SD - create matrix of 'outside' @@ -693,7 +693,7 @@ def plot_results( if Y is not None: # WHP - h test + training - fig_dir = jp(base_dir, root) + fig_dir = jp(base_dir, root, "uq") ff = jp(fig_dir, "whpa.png") # figure name Y = check_array(Y, allow_nd=True) try: @@ -717,8 +717,6 @@ def plot_results( labels = ["Training", "Test"] legend = _proxy_annotate(annotation=[], loc=2, fz=14) _proxy_legend(legend1=legend, colors=colors, labels=labels, fig_file=ff) - if show: - plt.show() plt.close() # WHPs @@ -777,8 +775,6 @@ def plot_results( labels=labels, fig_file=ff, ) - if show: - plt.show() plt.close() diff --git a/examples/whpa_demo.py b/examples/whpa_demo.py index 4e94b23..b8a4b94 100644 --- a/examples/whpa_demo.py +++ b/examples/whpa_demo.py @@ -65,20 +65,14 @@ def init_bel(): sub_dir = jp(os.getcwd(), "results") # Folders - obj_dir = jp(sub_dir, "obj") # Location to save the BEL model fig_data_dir = jp(sub_dir, "data") # Location to save the raw data figures - fig_pca_dir = jp(sub_dir, "pca") # Location to save the PCA figures - fig_cca_dir = jp(sub_dir, "regression_model") # Location to save the CCA figures fig_pred_dir = jp(sub_dir, "uq") # Location to save the prediction figures # Creates directories [ utils.dirmaker(f, erase=True) for f in [ - obj_dir, fig_data_dir, - fig_pca_dir, - fig_cca_dir, fig_pred_dir, ] ] diff --git a/requirements.txt b/requirements.txt index 303849e..4f7b101 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,11 @@ scikit-learn matplotlib scipy -numpy joblib -pandas +pandas<2 pytest scikit-image seaborn -tensorflow +tensorflow==2.14 loguru -tensorflow_probability \ No newline at end of file +tensorflow_probability==0.22 \ No newline at end of file