Create a classifier.

        Train a new multi-faceted classifier on the uploaded image data. Create your
        custom classifier with positive or negative examples. Include at least two sets of
        examples, either two positive example files or one positive and one negative file.
        You can upload a maximum of 256 MB per call.
        Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image
        file names, and classifier and class names). The service assumes UTF-8 encoding if
        it encounters non-ASCII characters.

        :param str name: The name of the new classifier. Encode special characters in
        UTF-8.
        :param dict positive_examples: A dictionary that contains the value for each
        classname. The value is a .zip file of images that depict the visual subject of a
        class in the new classifier. You can include more than one positive example file
        in a call.
        Specify the parameter name by appending `_positive_examples` to the class name.
        For example, `goldenretriever_positive_examples` creates the class
        **goldenretriever**.
        Include at least 10 images in .jpg or .png format. The minimum recommended image
        resolution is 32X32 pixels. The maximum number of images is 10,000 images or 100
        MB per .zip file.
        Encode special characters in the file name in UTF-8.
        :param file negative_examples: A .zip file of images that do not depict the visual
        subject of any of the classes of the new classifier. Must contain a minimum of 10
        images.
        Encode special characters in the file name in UTF-8.
        :param str negative_examples_filename: The filename for negative_examples.
        :param dict headers: A `dict` containing the request headers
        :return: A `DetailedResponse` containing the result, headers and HTTP status code.
        :rtype: DetailedResponse

def create_classifier(self,
                          name,
                          positive_examples,
                          negative_examples=None,
                          negative_examples_filename=None,
                          **kwargs):
        """
        Create a classifier.

        Train a new multi-faceted classifier on the uploaded image data. Create your
        custom classifier with positive or negative examples. Include at least two sets of
        examples, either two positive example files or one positive and one negative file.
        You can upload a maximum of 256 MB per call.
        Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image
        file names, and classifier and class names). The service assumes UTF-8 encoding if
        it encounters non-ASCII characters.

        :param str name: The name of the new classifier. Encode special characters in
        UTF-8.
        :param dict positive_examples: A dictionary that contains the value for each
        classname. The value is a .zip file of images that depict the visual subject of a
        class in the new classifier. You can include more than one positive example file
        in a call.
        Specify the parameter name by appending `_positive_examples` to the class name.
        For example, `goldenretriever_positive_examples` creates the class
        **goldenretriever**.
        Include at least 10 images in .jpg or .png format. The minimum recommended image
        resolution is 32X32 pixels. The maximum number of images is 10,000 images or 100
        MB per .zip file.
        Encode special characters in the file name in UTF-8.
        :param file negative_examples: A .zip file of images that do not depict the visual
        subject of any of the classes of the new classifier. Must contain a minimum of 10
        images.
        Encode special characters in the file name in UTF-8.
        :param str negative_examples_filename: The filename for negative_examples.
        :param dict headers: A `dict` containing the request headers
        :return: A `DetailedResponse` containing the result, headers and HTTP status code.
        :rtype: DetailedResponse
        """

        if name is None:
            raise ValueError('name must be provided')
        if not positive_examples:
            raise ValueError('positive_examples must be provided')

        headers = {}
        if 'headers' in kwargs:
            headers.update(kwargs.get('headers'))
        sdk_headers = get_sdk_headers('watson_vision_combined', 'V3',
                                      'create_classifier')
        headers.update(sdk_headers)

        params = {'version': self.version}

        form_data = {}
        form_data['name'] = (None, name, 'text/plain')
        for key in positive_examples.keys():
            part_name = '%s_positive_examples' % (key)
            value = positive_examples[key]
            if hasattr(value, 'name'):
                filename = basename(value.name)
            form_data[part_name] = (filename, value, 'application/octet-stream')
        if negative_examples:
            if not negative_examples_filename and hasattr(
                    negative_examples, 'name'):
                negative_examples_filename = basename(negative_examples.name)
            if not negative_examples_filename:
                raise ValueError('negative_examples_filename must be provided')
            form_data['negative_examples'] = (negative_examples_filename,
                                              negative_examples,
                                              'application/octet-stream')

        url = '/v3/classifiers'
        response = self.request(
            method='POST',
            url=url,
            headers=headers,
            params=params,
            files=form_data,
            accept_json=True)
        return response