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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for embedding_tool-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145fa065fe7637a4eb49bac3715b0b7f23bfdf8f81b4a70048d6b9ba913284a6 |
|
MD5 | 474a93bce84e0033799340432e50d1c4 |
|
BLAKE2b-256 | abd3b30163425be8baedb965c949b121535f9deca15ea16fca131506aaea91e0 |