Feature: all features.

getFeatureSet(x, black.list = character(0), include.costs = FALSE,
  normalize = FALSE, drop.duplicates = TRUE,
  feature.fun.args = getDefaultFeatureFunArgs())

Arguments

x

[Network]
Network.

black.list

[character]
Optional black list of feature sets which we do not want to compute. Default is the empty character vector.

include.costs

[logical(1)]
Include the times needed to compute the specific feature sets as additional features? Default is FALSE. Time is measured via proc.time.

normalize

[logical(1)]
Should the features be normalized? Note that normalization is not available for all features. E.g. skew, sd and varcoeff features as well as the VRP features are not normalized. Default is FALSE.

drop.duplicates

[logical(1)]
Should duplicate nodes be deleted? Duplicate node coordinates cause some angle features to be NA. Hence, it is better to drop those duplicates. Default is TRUE.

feature.fun.args

[list]
List of lists. Each component of the list corresponds to one of the feature sets and the subordered list contains vectors of values for each parameter. Name the sublists according to getAvailableFeatureSets.

Value

[list] Named list of features.

Examples

  x = generateRandomNetwork(n.points = 50L)
  # get all features available in salesperson with default parameters
  # Note that we always exclude the VRP problem specific VRP features, since
  # we are operating on a simple euclidean TSP instance without depots and
  # arrival times.
  fs = getFeatureSet(x, black.list = "VRP")
#> Loading required package: igraph
#> 
#> Attaching package: ‘igraph’
#> The following object is masked from ‘package:BBmisc’:
#> 
#>     normalize
#> The following objects are masked from ‘package:stats’:
#> 
#>     decompose, spectrum
#> The following object is masked from ‘package:base’:
#> 
#>     union
#> Loading required package: cccd

  # now include the costs of computing (in seconds) for each set of parameters
  # as additional features
  fs = getFeatureSet(x, black.list = "VRP", include.costs = TRUE)

  # compute all but MST and distance features
  fs = getFeatureSet(x, black.list = c("VRP", "MST", "Distance"))

  # now set user-defined parameter values for cluster
  args = list("Cluster" = list("epsilon" = c(0.01, 0.05, 0.1, 0.2, 0.3)))
  fs = getFeatureSet(x, black.list = "VRP", feature.fun.args = args)