public class AstTfIdf extends AstPrimitive<AstTfIdf>
frame - Input frame containing data for whose TF-IDF values should be computed
doc_id_idx - Index of a column containing document IDs
text_idx - Index of a column containing words/documents (depending on the preprocess parameter)
preprocess - Flag indicating whether input should be pre-processed or not
case_sensitive - Flag indicating whether input should be treated as a case sensitive data
Content of a column with index content_idx:
TfIdfPreprocessorTask - (default) when pre-processing is enabled
word - when pre-processing is disabled
| Constructor and Description |
|---|
AstTfIdf() |
| Modifier and Type | Method and Description |
|---|---|
Val |
apply(Env env,
Env.StackHelp stk,
AstRoot[] asts)
Primary method to invoke this function, passing all the parameters
as the `asts` list.
|
java.lang.String[] |
args()
List of argument names.
|
int |
nargs()
Number of function's arguments + 1.
|
java.lang.String |
str()
String representation of this Ast object in the Rapids language.
|
description, example, execasBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSONpublic int nargs()
AstPrimitivenargs in class AstPrimitive<AstTfIdf>public java.lang.String[] args()
AstPrimitiveargs in class AstPrimitive<AstTfIdf>public Val apply(Env env, Env.StackHelp stk, AstRoot[] asts)
AstPrimitivePrimary method to invoke this function, passing all the parameters as the `asts` list.
apply in class AstPrimitive<AstTfIdf>env - Current execution environment. Variables are looked up here.stk - TODO need clarificationasts - List of AstRoot expressions that are arguments to the
function. First element in this list is the function itself.public java.lang.String str()
AstRootAstPrimitives this is the name of the function; for
AstParameters this is either the name of the variable, or the
value of the numeric constant that the parameter represents. For more
complicated constructs such as AstExec or AstFunction
this method should return those objects as a Rapids string.