Gets the value of minCount or its default value. Gets the value of maxSentenceLength or its default value. Gets the value of maxIter or its default value. Gets the value of inputCol or its default value. Returns the documentation of all params with their optionally default values and user-supplied values.Įxtracts the embedded default param values and user-supplied values, and then merges them with extra values from input into a flat param map, where the latter value is used if there exist conflicts, i.e., with ordering: default param values < user-supplied values < extra.įits a model to the input dataset with optional parameters.įits a model to the input dataset for each param map in paramMaps. take ( 1 ) TrueĬlears a param from the param map if it has been explicitly set.Ĭreates a copy of this instance with the same uid and some extra params.Įxplains a single param and returns its name, doc, and optional default value and user-supplied value in a string. save ( modelPath ) > loadedModel = Word2VecModel. getMinCount () True > modelPath = temp_path + "/word2vec-model" > model. getNumPartitions () True > loadedWord2Vec.
save ( word2vecPath ) > loadedWord2Vec = Word2Vec. model DenseVector() > word2vecPath = temp_path + "/word2vec" > word2Vec. select ( "word", fmt ( "similarity", 5 ). show () +-+-+ |word| vector| +-+-+ | a| > from import format_number as fmt > model. setInputCol ( "sentence" ) Word2VecModel. createDataFrame (, ) > word2Vec = Word2Vec ( vectorSize = 5, seed = 42, inputCol = "sentence", outputCol = "model" ) > word2Vec.