class_docstr: Unit test class for testing the libsvm sklearn converter.
class_docstr_tok: ["Unit","test","class","for","testing","the","libsvm","sklearn","converter","."]
code: def test_input_names(self):
      data = load_boston()
      df = pd.DataFrame({"input": data["data"].tolist()})
      df["input"] = df["input"].apply(np.array)
  
      # Default values
      spec = libsvm.convert(self.libsvm_model)
      if _is_macos() and _macos_version() >= (10, 13):
          (df["prediction"], _, _) = svmutil.svm_predict(
              data["target"], data["data"].tolist(), self.libsvm_model
          )
          metrics = evaluate_regressor(spec, df)
          self.assertAlmostEquals(metrics["max_error"], 0)
  
      # One extra parameters. This is legal/possible.
      num_inputs = len(data["data"][0])
      spec = libsvm.convert(
          self.libsvm_model, input_length=num_inputs + 1
      )
  
      # Not enought input names.
      input_names = ["this", "is", "not", "enought", "names"]
      with self.assertRaises(ValueError):
          libsvm.convert(self.libsvm_model, input_names=input_names)
      with self.assertRaises(ValueError):
          libsvm.convert(self.libsvm_model, input_length=num_inputs - 1)
  
imports: import pandas
  import numpy
  import random
  import tempfile
  import unittest
  import pytest
  from coremltools._deps import _HAS_LIBSVM, MSG_LIBSVM_NOT_FOUND, _HAS_SKLEARN, MSG_SKLEARN_NOT_FOUND
  from coremltools.models.utils import evaluate_regressor, _macos_version, _is_macos
label_desc: Use image node_id 2 for calling the EpsilonSVRLibSVMTest obj's underlying member method code with example usage: obj.test_input_names() without return types