getFeatureSet: Feature: all features.

Description Usage Arguments Value Examples

View source: R/getFeatureSet.R

Description

Feature: all features.

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  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")

  # 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)

jakobbossek/salesperson documentation built on Dec. 11, 2021, 4:54 a.m.