-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathgen_knn.py
37 lines (34 loc) · 938 Bytes
/
gen_knn.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
extensions = dict(
extra_params=[('verbose', 'FALSE')],
required_params=['x', 'y', 'training_frame', 'id_column', 'response_column'],
skip_default_set_params_for=['training_frame', 'ignored_columns', 'response_column', 'offset_column'],
set_required_params="""
parms$training_frame <- training_frame
args <- .verify_dataxy(training_frame, x, y)
if (!missing(id_column)) {
parms$id_column <- id_column
} else {
stop("ID column is required.")
}
parms$ignored_columns <- args$x_ignore
parms$response_column <- args$y
"""
)
doc = dict(
preamble="""
Build a KNN model
Builds a K-nearest neighbour model on an H2OFrame.
""",
params=dict(
verbose="""
\code{Logical}. Print scoring history to the console. Defaults to FALSE.
"""
),
returns="""
Creates a \linkS4class{H2OModel} object of the right type.
""",
seealso="""
\code{\link{predict.H2OModel}} for prediction
""",
examples=""""""
)