Skip to content

Commit

Permalink
Fixed bug and added logo
Browse files Browse the repository at this point in the history
  • Loading branch information
djgagne committed Sep 12, 2024
1 parent 8bf0573 commit bee3353
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions bridgescaler/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,12 @@ def inv_transform_variable(td_obj, xv,
td_centroids = td_obj.centroids()
x_transformed = np.zeros_like(xv)
if distribution == "normal":
x_transformed = ndtr(xv)
x_intermediate = ndtr(xv)
elif distribution == "logistic":
x_transformed = logistic.cdf(xv)
tdigest_quantile(xv, td_centroids["mean"], td_centroids["weight"],
x_intermediate = logistic.cdf(xv)
else:
x_intermediate = xv
tdigest_quantile(x_intermediate, td_centroids["mean"], td_centroids["weight"],
td_obj.min(), td_obj.max(), x_transformed)
return x_transformed

Expand Down Expand Up @@ -503,6 +505,8 @@ class DQuantileScaler(DBaseScaler):
datasets in parallel. The library can perform fitting, transforms, and inverse transforms across variables
in parallel using the multiprocessing library. Multidimensional arrays are stored in shared memory across
processes to minimize inter-process communication.
DQuantileScaler supports
Attributes:
compression: Recommended number of centroids to use.
Expand Down Expand Up @@ -637,7 +641,7 @@ def inverse_transform(self, x, channels_last=None, pool=None):
del outputs[:]
else:
for td_obj in td_i_objs:
x_transformed[..., td_obj[0]] = inv_trans_var_func(td_obj[1], xv[:, td_obj[0]])
x_transformed[..., td_obj[0]] = inv_trans_var_func(td_obj[1], xv[..., td_obj[0]])
else:
if pool is not None:
split_indices = np.round(np.linspace(0, xv[..., 0].size, pool._processes)).astype(int)
Expand Down
Binary file added doc/source/_static/bridgescaler_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/logo.graffle
Binary file not shown.
5 changes: 3 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'bridgescaler'
copyright = '2024, David John Gagne'
copyright = '2024, University Corporation for Atmopsheric Research'
author = 'David John Gagne'
release = '0.7.0'
release = '0.8.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand All @@ -26,3 +26,4 @@

html_theme = 'sphinx_book_theme'
html_static_path = ['_static']
html_logo = "_static/bridgescaler_logo.png"
1 change: 0 additions & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ distributed scaling of data for pre-processing of AI and ML models.
:maxdepth: 2
:caption: Contents:

index.rst
gettingstarted.rst
usage.rst
distributed.rst
Expand Down

0 comments on commit bee3353

Please sign in to comment.