Constructor
new Word2VecModel()
- Source:
Extends
Methods
(static) load(path) → {Word2VecModel}
Parameters:
Name |
Type |
Description |
path |
string
|
|
- Source:
Returns:
-
Type
-
Word2VecModel
(static) read() → {MLReader}
- Source:
Returns:
-
Type
-
MLReader
Parameters:
- Source:
Returns:
-
Type
-
module:eclairjs/ml/feature.Word2VecModel
Find "num" number of words closest in similarity to the given word.
Returns a Dataset with the words and the cosine similarities between the
synonyms and the given word.
Parameters:
Name |
Type |
Description |
word |
string
|
|
num |
number
|
|
- Source:
Returns:
-
Type
-
module:eclairjs/sql.Dataset
save(path) → {Promise.<Void>}
Saves this ML instance to the input path, a shortcut of `write.save(path)`.
Parameters:
Name |
Type |
Description |
path |
string
|
|
- Inherited From:
- Source:
Returns:
A Promise that resolves to nothing.
-
Type
-
Promise.<Void>
Parameters:
Name |
Type |
Description |
value |
string
|
|
- Source:
Returns:
-
Type
-
module:eclairjs/ml/feature.Word2VecModel
Parameters:
Name |
Type |
Description |
value |
string
|
|
- Source:
Returns:
-
Type
-
module:eclairjs/ml/feature.Word2VecModel
Transform a sentence column to a vector column to represent the whole sentence. The transform
is performed by averaging all word vectors it contains.
Parameters:
- Source:
Returns:
-
Type
-
module:eclairjs/sql.Dataset
Parameters:
- Source:
Returns:
-
Type
-
module:eclairjs/sql/types.StructType
- Overrides:
- Source:
Returns:
-
Type
-
MLWriter