| hanaml.GeoDBSCAN {hana.ml.r} | R Documentation |
hanaml.GeoDBSCAN is a R wrapper for PAL GeoDBSCAN algorithm.
hanaml.GeoDBSCAN(conn.context,
data = NULL,
key = NULL,
features = NULL,
minpts = NULL,
eps = NULL,
thread.ratio = NULL,
metric = NULL,
minkowski.power = NULL,
algorithm = NULL,
save.model = NULL)
conn.context |
|
data |
|
key |
|
features |
|
minpts |
|
eps |
|
thread.ratio |
|
metric |
Defaults to "euclidean". |
minkowski.power |
|
algorithm |
|
save.model |
|
R6Class object.
A "GeoDBSCAN" object with the following attributes:
labels : DataFrame
Label assigned to each sample. -1 means the point is labeled as noise.
model : DataFrame
PMML model.
Set to None if no PMML model was requested.
## Not run:
following SQL:
> CREATE COLUMN TABLE PAL_GEO_DBSCAN_DATA_TBL (
"ID" INTEGER,
"POINT" ST_GEOMETRY);
Input DataFrame for clustering:
> data$collect()
ID V1 V2 V3
0 1 0.10 0.10 B
1 2 0.11 0.10 A
2 3 0.10 0.11 C
3 4 0.11 0.11 B
4 5 0.12 0.11 A
5 6 0.11 0.12 E
...
27 28 16.11 16.11 A
28 29 20.11 20.12 C
29 30 15.12 15.11 A
> GeoDBSCAN <- hanaml.GeoDBSCAN(conn,
data,
thread.ratio = 0.2,
metric = "Manhattan")
expected output:
> DBSCAN$labels$Collect()
ID CLUSTER.ID
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
...
28 28 -1
29 29 -1
30 30 -1
## End(Not run)