Description Usage Arguments Value Examples
Create a FeatureObject
, which will be used as input for all
the feature computations.
1 2 3 4 5 6 7 8 9 10 11 12 | createFeatureObject(
init,
X,
y,
fun,
minimize,
lower,
upper,
blocks,
objective,
force = FALSE
)
|
init |
[ |
X |
[ |
y |
[ |
fun |
[ |
minimize |
[ |
lower |
[ |
upper |
[ |
blocks |
[ |
objective |
[ |
force |
[ |
[FeatureObject
].
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 | # (1a) create a feature object using X and y:
X = createInitialSample(n.obs = 500, dim = 3,
control = list(init_sample.lower = -10, init_sample.upper = 10))
y = apply(X, 1, function(x) sum(x^2))
feat.object1 = createFeatureObject(X = X, y = y,
lower = -10, upper = 10, blocks = c(5, 10, 4))
# (1b) create a feature object using X and fun:
feat.object2 = createFeatureObject(X = X,
fun = function(x) sum(sin(x) * x^2),
lower = -10, upper = 10, blocks = c(5, 10, 4))
# (1c) create a feature object using a data.frame:
feat.object3 = createFeatureObject(iris[,-5], blocks = 5,
objective = "Petal.Length")
# (2) have a look at the feature objects:
feat.object1
feat.object2
feat.object3
# (3) now, one could calculate features
calculateFeatureSet(feat.object1, "ela_meta")
calculateFeatureSet(feat.object2, "cm_grad")
library(plyr)
calculateFeatureSet(feat.object3, "cm_angle", control = list(cm_angle.show_warnings = FALSE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.