-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#' --- | ||
#' title: "Pick types of clusters in CEC" | ||
#' author: "" | ||
#' date: "" | ||
#' output: | ||
#' html_document: | ||
#' self_contained: false | ||
#' --- | ||
|
||
library(gmum.r) | ||
|
||
data(cec_ts) | ||
standard_cluster_param = list(method.type = "standard") | ||
spherical_cluster_param = list(method.type = "sphere") | ||
diagonal_cluster_param = list(method.type = 'diagonal') | ||
|
||
c <- CEC(x = Tset, k = 4, params.mix = list(standard_cluster_param, spherical_cluster_param, diagonal_cluster_param, diagonal_cluster_param), control.nstart = 100, control.eps=0.09) | ||
|
||
plot(c, ellipses = TRUE, centers = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#' --- | ||
#' title: "Basic clustering of mouse dataset using CEC" | ||
#' author: "" | ||
#' date: "" | ||
#' output: | ||
#' html_document: | ||
#' self_contained: false | ||
#' --- | ||
|
||
library(gmum.r) | ||
|
||
# Fitting to mouse like dataset | ||
data(cec_mouse_1_spherical) | ||
plot(cec.mouse1spherical, main="Mouse-like dataset") | ||
|
||
# Fit spherical gaussians to the dataset | ||
cec <- CEC(k=3, x=cec.mouse1spherical, control.nstart=10, method.type="sphere") | ||
|
||
# Plot results | ||
plot(cec, centers=TRUE, ellipses=TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#' --- | ||
#' title: "Fit any gauss family to dataset in CEC" | ||
#' author: "" | ||
#' date: "" | ||
#' output: | ||
#' html_document: | ||
#' self_contained: false | ||
#' --- | ||
|
||
|
||
library(gmum.r) | ||
data(cec_ellipse_gauss) | ||
|
||
# Try to fit 5 gaussians to the dataset | ||
cec <- CEC(k=5, x=cec.ellipsegauss, method.init="random") | ||
|
||
# Note that we set 5 cluster. Only 4 was needed. | ||
plot(cec, centers=TRUE, ellipses=TRUE) | ||
summary(cec) | ||
|