Skip to main content

An embedding toolkit that can perform multiple embedding process which are low-dimensional embedding (dimension reduction), categorical variable embedding, and financial time-series embedding.

Project description

Dimension Reduction

The function performs dimensionality reduction, pre-processing the data and comparing the reconstruction error via PCA and autoencoder.

Install

pip install embedding-tools

How to use

from short_text_analyzer.core import *

Input data: The input matrix has a size of 863 $\times$ 768.

print ("Data's size: ", testing_data.shape)
print ("Dimension:   ", testing_data.shape[1])
Data's size:  (863, 768)
Dimension:    768

Performing dimension reduction: we will reduce the number of dimension from 768 to 2.

dim_reducer = dimensionReducer(analyzer.embeddingRaw, 2, 0.002)
dim_reducer.fit()
---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-5-6ee2cf251bab> in <module>
----> 1 dim_reducer = dimensionReducer(analyzer.embeddingRaw, 2, 0.002)
      2 dim_reducer.fit()


NameError: name 'dimensionReducer' is not defined

Calculating the MSE of the reconstructed vectors

dim_reducer.rmse_result

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

embedding_tool-0.1.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

embedding_tool-0.1-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page