PALEmbeddings
- class hana_ml.text.pal_embeddings.PALEmbeddings(model_version=None, max_token_num=None)
Embeds input documents into vectors.
Examples
Assume we have a hana dataframe df which has two columns: 'ID' and 'TEXT' and then we could invoke create a PALEmbeddings instance to embed the documents into vectors.
>>> embed = PALEmbeddings() >>> vectors = embed.fit_transform(data=df, key='ID', target='TEXT') >>> vectors.collect()
- Attributes:
- result_DataFrame
The embedding result.
- stat_DataFrame
The statistics.
Methods
fit_transform
(data, key, target[, ...])Getting the embeddings.
- fit_transform(data, key, target, thread_number=None, batch_size=None, is_query=None, max_token_num=None)
Getting the embeddings.
- Returns:
- DataFrames
The result.
Inherited Methods from PALBase
Besides those methods mentioned above, the PALEmbeddings class also inherits methods from PALBase class, please refer to PAL Base for more details.