Hypertools

Latest version: v0.8.0

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.5.0

Enhancements:

**Plotting and transforming text data**
+ `hyp.plot` now supports plotting text data. Simply pass a string, list of strings or list of lists of strings and the text will be transformed using a semantic model and plotted. By default, the text will be fit to a topic model (LDA) fit to a selection of wikipedia pages.
+ A new `vectorizer` argument in `hyp.plot` to specify a text vectorizer. Currently supports `CountVectorizer, `TfidfVectorizer`, or class instances (fit or unfit) of these models.
+ A new `semantic` argument in `hyp.plot` that specifies the semantic model to use to transform text. Current supports `LatentDirichletAllocation`, `NMF`, or class instances (fit or unfit) of these models.
+ A new `corpus` argument in `hyp.plot` that allows the user to specify text to fit a semantic model. Can be 'wiki', 'nips', 'sotus' or a custom list of text.
+ Enhanced `hyp.format_data` function that takes data in various forms (numpy array, dataframe, str, or list of str, or mixed list) and returns them in a standard format (a list of numpy arrays). This function can be used to transform text data using a semantic model.

**New algorithms**
+ A new clustering algorithm HDBSCAN (thanks lmcinnes!) e.g. `hyp.plot(data, cluster='HDBSCAN')`
+ A new dimensionality reduction algorithm UMAP (thanks lmcinnes!) e.g. `hyp.plot(data, reduce='UMAP')`

**New parameters**
+ A new `size` param to resize figure e.g. `hyp.plot(data, size=[10,8])`
+ A new `ax` param to add figure to existing axis e.g. `hyp.plot(data, ax=ax)`

**New text examples**
+ A new dataset of NIPS papers e.g. `hyp.load('nips')` (from [kaggle](https://www.kaggle.com/benhamner/nips-papers))
+ A new dataset of selected wikipedia pages e.g. `hyp.load('wiki')`
+ A new dataset of State of the Union text from 1989-2017. Can be loaded as `hyp.load('sotus')` (from [kaggle](https://www.kaggle.com/rtatman/state-of-the-union-corpus-1989-2017))

**API changes**
In `hyp.plot` changed `group` arg to `hue` (group will still be supported but depreciated in a coming release).
+ Removed deprecated `describe_pca` function. Please use more general function, `describe`.

**Bugs fixed**
+ When using `chemtrails` in `hyp.plot`, the entire timeseries would appear for the first few seconds of an animation and then dissapear.
+ The legend colors did not align with the data when using the `fmt` or `color` args.
+ When grouping with group/hue arg, labels were not reshuffled.
+ Fixed bug in describe function where correlations between data and reduced data would asymptote < 1.

NOTE: If you have been using the development version of 0.5.0, please clear your
data cache (/Users/yourusername/hypertools_data).

0.4.2

+ fixed bug in plot function where software would crash if reduce was specified as `dict`
+ added tutorials to readthedocs

0.4.1

+ exposed format_data which formats numpy array, pandas df or mixed list in list of numpy arrays(hypertools.tools.format_data)
+ added tests for the function to format_data
+ added documentation to format_data

0.4.0

Enhancements -

+ A new class: DataGeometry with methods for plotting, transforming new data and saving
Support for loading *.geo objects
+ A new function: analyze to perform combinations of transformations
+ A new function: describe for characterizing the loss of information due to dimensionality reduction algs
+ In-memory caching of time-intensive reduce, align and describe operations
+ New syntax for reduce function: model and model_params are now passed as a dictionary using the reduce arg
+ New clustering models added to the cluster function: MiniBatchKMeans, AgglomerativeClustering, Birch, FeatureAgglomeration, and SpectralClustering
+ Moved major functions (normalize, align, reduce, cluster, load) to main level (i.e. hyp.load instead of hyp.tools.load, but the latter will still work)

Deprecations -

+ A deprecation warning is thrown for the following align arguments: normalize, ndims, and method
+ A deprecation warning is thrown for the following reduce arguments: model, model_params, align, and normalize
+ A deprecation warning is thrown for the following cluster arguments: ndims
+ A deprecation warning is thrown for the describe_pca function (replaced by describe)

Bugs -

+ fixed 148 bug in hyp.plot where figure would be rendered despite setting `show=False` (thanks chaseWilliams !)
+ fixed a bug where n_clusters would not override group, even though a warning message said it would
+ fixed a bug where `hyp.plot` would quit if any kwargs were not the same length as the number of arrays in the list of input data.

Minor -
+ added brainiak toolbox citation and github link to align.py docstring
+ added additional details and fixed typos in align.py docstring

0.3.1

+ suppress warning when attempting to switch to `TkAgg` backend

0.3.0

This release extends hypertools to support the following dimensionality reduction / manifold learning models:

+ PCA
+ FastICA
+ IncrementalPCA
+ KernelPCA
+ FactorAnalysis
+ TruncatedSVD
+ SparsePCA
+ MiniBatchSparsePCA
+ DictionaryLearning
+ MiniBatchDictionaryLearning
+ TSNE
+ MDS
+ SpectralEmbedding
+ LocallyLinearEmbedding
+ Isomap

The default reduction algorithm was switched from PCA to IncrementalPCA for better handling of large datasets.

Bugs squashed:

+ fixed plot_procrustes example so that rotation matrix is orthonormal

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.