class_docstr: Test the create method for DBSCAN clustering.
class_docstr_tok: ["Test","the","create","method","for","DBSCAN","clustering","."]
docstr: Make sure the features parameter works properly, particularly with
  respect to the distance parameter, which can be composite. These
  parameters get passed directly to a nearest neighbors model, so they
  would work in the same way.
docstr_tok: ["Make","sure","the","features","parameter","works","properly",",","particularly","with","respect","to","the","distance","parameter",",","which","can","be","composite",".","These","parameters","get","passed","directly","to","a","nearest","neighbors","model",",","so","they","would","work","in","the","same","way","."]
code: def test_create_features(self):
      """
      Make sure the features parameter works properly, particularly with
      respect to the distance parameter, which can be composite. These
      parameters get passed directly to a nearest neighbors model, so they
      would work in the same way.
      """
  
      ## Features in list form, default argument
      self.assertItemsEqual(self.model.features, ["X1"])
      self.assertItemsEqual(
          self.model.unpacked_features, ["X1[0]", "X1[1]"]
      )
  
      ## Separate features, default argument
      sf = self.sf.unpack("X1")
      m = tc.dbscan.create(
          sf,
          distance="euclidean",
          radius=self.radius,
          min_core_neighbors=self.min_core_neighbors,
          verbose=False,
      )
      self.assertItemsEqual(m.features, ["X1.0", "X1.1"])
  
      ## Separate features, specified explicitly
      m = tc.dbscan.create(
          sf,
          features=["X1.0"],
          distance="euclidean",
          radius=self.radius,
          min_core_neighbors=self.min_core_neighbors,
          verbose=False,
      )
      self.assertItemsEqual(m.features, ["X1.0"])
  
      ## Features can be specified by the composite distance argument.
      test_dist = [
          [["X1.0"], "euclidean", 1],
          [["X1.1"], "manhattan", 1],
      ]
  
      m = tc.dbscan.create(
          sf,
          distance=test_dist,
          radius=self.radius,
          min_core_neighbors=self.min_core_neighbors,
          verbose=False,
      )
      self.assertItemsEqual(m.features, ["X1.0", "X1.1"])
  
      ## Features parameter should be overridden by the composite distance
      #  argument.
      m = tc.dbscan.create(
          sf,
          features=["X1.0"],
          distance=test_dist,
          radius=self.radius,
          min_core_neighbors=self.min_core_neighbors,
          verbose=False,
      )
      self.assertItemsEqual(m.features, ["X1.0", "X1.1"])
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import copy
  import numpy
  import unittest
  import turicreate
  from .None import util
  from turicreate.util import _assert_sframe_equal
  from turicreate.toolkits._main import ToolkitError
  from .test_knn_classifier import make_classifier_data
  import sys
  import os
label_desc: Use image node_id 4 for calling the CreateTest obj's underlying member method code with example usage: obj.test_create_features() without return types