.. _package-rst-classification: ============================ Package rst.classification ============================ In machine learning and statistics, classification is the problem of identifying to which of a set of categories (sub-populations) a new observation belongs. This package contains data types representing classification problems and classification results (e.g. :py:class:`ClassificationResult `). .. seealso:: Wikipedia article containing the definition above http://en.wikipedia.org/wiki/Statistical_classification Messages ======== .. container:: mess4ge-multi .. container:: mess4ge-graph .. digraph:: message_graph fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "15" [label=<
ClassificationResults
ClassificationResultclasses
>,shape=box,style=filled,fillcolor="white"]; "13" [label=<
ClassificationResultMap
Entryaspects
>,shape=box,style=filled,fillcolor="white"]; "14" [label=<
Entry
ASCII-STRINGname
ClassificationResultresult
>,shape=box,style=filled,fillcolor="white"]; "7" [label=<
ClassifiedRegions3D
ClassifiedRegion3Dregions
>,shape=box,style=filled,fillcolor="white"]; "8" [label=<
ClassifiedRegion3D
BoundingBox3DFloatregion
ClassificationResultresult
>,shape=box,style=filled,fillcolor="white"]; "9" [label=<
BoundingBox3DFloat
Posetransformation
FLOAT32width
FLOAT32depth
FLOAT32height
>,shape=box,style=filled,fillcolor="white"]; "10" [label=<
Pose
Translationtranslation
Rotationrotation
>,shape=box,style=filled,fillcolor="white"]; "12" [label=<
Rotation
FLOAT64qw
FLOAT64qx
FLOAT64qy
FLOAT64qz
ASCII-STRINGframe_id
>,shape=box,style=filled,fillcolor="white"]; "11" [label=<
Translation
FLOAT64x
FLOAT64y
FLOAT64z
ASCII-STRINGframe_id
>,shape=box,style=filled,fillcolor="white"]; "1" [label=<
ClassifiedRegions2D
ClassifiedRegion2Dregions
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
ClassifiedRegion2D
BoundingBoxregion
ClassificationResultresult
>,shape=box,style=filled,fillcolor="white"]; "5" [label=<
ClassificationResult
OCTET-VECTORdecided_class
ClassWithProbabilityclasses
>,shape=box,style=filled,fillcolor="white"]; "6" [label=<
ClassWithProbability
OCTET-VECTORname
FLOAT32confidence
>,shape=box,style=filled,fillcolor="white"]; "3" [label=<
BoundingBox
Vec2DInttop_left
UINT32width
UINT32height
UINT32image_width
UINT32image_height
>,shape=box,style=filled,fillcolor="white"]; "4" [label=<
Vec2DInt
INT32x
INT32y
>,shape=box,style=filled,fillcolor="white"]; "15":classes -> "5"[]; "13" -> "14"[dir=both,arrowtail=odiamond]; "13":aspects -> "14"[]; "14":result -> "5"[]; "7":regions -> "8"[]; "8":result -> "5"[]; "8":region -> "9"[]; "9":transformation -> "10"[]; "10":rotation -> "12"[]; "10":translation -> "11"[]; "1":regions -> "2"[]; "2":result -> "5"[]; "2":region -> "3"[]; "5" -> "6"[dir=both,arrowtail=odiamond]; "5":classes -> "6"[]; "3":top_left -> "4"[]; .. container:: mess4ge-list .. container:: messages * :ref:`ClassifiedRegions2D ` * :ref:`ClassifiedRegion2D ` * :ref:`ClassifiedRegions3D ` * :ref:`ClassifiedRegion3D ` * :ref:`ClassificationResultMap ` * :ref:`ClassificationResults ` * :ref:`ClassificationResult ` .. container:: clearer clearer: should be made invisible via css .. _message-rst-classification-classifiedregions2d: Message ClassifiedRegions2D --------------------------- .. container:: message-rst-classification-classifiedregions2d-multi .. container:: message-rst-classification-classifiedregions2d-documentation .. py:class:: rst.classification.ClassifiedRegions2D A set of image regions with classification results. .. codeauthor:: Leon Ziegler .. py:attribute:: regions :type: array of :py:class:`rst.classification.ClassifiedRegion2D` The set of regions. The order of elements is not significant. .. container:: message-rst-classification-classifiedregions2d-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassifiedRegions2D.proto :lines: 14-23 :language: protobuf :emphasize-lines: 8-8 .. _message-rst-classification-classifiedregion2d: Message ClassifiedRegion2D -------------------------- .. container:: message-rst-classification-classifiedregion2d-multi .. container:: message-rst-classification-classifiedregion2d-documentation .. py:class:: rst.classification.ClassifiedRegion2D Focus on image coordinate systems (vision-based). A image region with a classification result. .. codeauthor:: Leon Ziegler .. py:attribute:: region :type: :py:class:`rst.geometry.BoundingBox` Region in the input image. .. py:attribute:: result :type: :py:class:`rst.classification.ClassificationResult` The class represented by the image region. .. container:: message-rst-classification-classifiedregion2d-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassifiedRegion2D.proto :lines: 17-29 :language: protobuf :emphasize-lines: 6-6,11-11 .. _message-rst-classification-classifiedregions3d: Message ClassifiedRegions3D --------------------------- .. container:: message-rst-classification-classifiedregions3d-multi .. container:: message-rst-classification-classifiedregions3d-documentation .. py:class:: rst.classification.ClassifiedRegions3D A set of 3D regions with classification results. .. codeauthor:: Leon Ziegler .. py:attribute:: regions :type: array of :py:class:`rst.classification.ClassifiedRegion3D` The set of regions. The order of elements is not significant. .. container:: message-rst-classification-classifiedregions3d-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassifiedRegions3D.proto :lines: 14-23 :language: protobuf :emphasize-lines: 8-8 .. _message-rst-classification-classifiedregion3d: Message ClassifiedRegion3D -------------------------- .. container:: message-rst-classification-classifiedregion3d-multi .. container:: message-rst-classification-classifiedregion3d-documentation .. py:class:: rst.classification.ClassifiedRegion3D Focus on image coordinate systems (vision-based). A region in 3D space with a classification result. .. codeauthor:: Leon Ziegler .. py:attribute:: region :type: :py:class:`rst.geometry.BoundingBox3DFloat` Region in 3D space. .. py:attribute:: result :type: :py:class:`rst.classification.ClassificationResult` The class represented by the 3D region. .. container:: message-rst-classification-classifiedregion3d-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassifiedRegion3D.proto :lines: 17-29 :language: protobuf :emphasize-lines: 6-6,11-11 .. _message-rst-classification-classificationresultmap: Message ClassificationResultMap ------------------------------- .. container:: message-rst-classification-classificationresultmap-multi .. container:: message-rst-classification-classificationresultmap-documentation .. py:class:: rst.classification.ClassificationResultMap A map of :py:class:`ClassificationResult ` instances. Entries are indexed by string keys. .. codeauthor:: Viktor Richter .. py:attribute:: aspects :type: array of :py:class:`rst.classification.ClassificationResultMap.Entry` The map contents. Each must exist only once. Order does not matter. Empty set is allowed. .. container:: message-rst-classification-classificationresultmap-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassificationResultMap.proto :lines: 15-41 :language: protobuf :emphasize-lines: 25-25 .. _message-rst-classification-classificationresultmap-entry: Message Entry ------------- .. container:: message-rst-classification-classificationresultmap-entry-multi .. container:: message-rst-classification-classificationresultmap-entry-documentation .. py:class:: rst.classification.ClassificationResultMap.Entry One entry of the map as a key-value pair. .. py:attribute:: name :type: :py:class:`ASCII-STRING` The name or key of the entry. .. py:attribute:: result :type: :py:class:`rst.classification.ClassificationResult` The associated :py:class:`ClassificationResult ` of the entry. .. container:: message-rst-classification-classificationresultmap-entry-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassificationResultMap.proto :lines: 20-33 :language: protobuf :emphasize-lines: 6-6,12-12 .. _message-rst-classification-classificationresults: Message ClassificationResults ----------------------------- .. container:: message-rst-classification-classificationresults-multi .. container:: message-rst-classification-classificationresults-documentation .. py:class:: rst.classification.ClassificationResults A class representing multiple result of classification process(es). .. codeauthor:: Norman Koester .. py:attribute:: classes :type: array of :py:class:`rst.classification.ClassificationResult` A vector of results holding multiple classification results. The results inside should be a merged representation and not contradict each other w.r.t. the individual classes. Empty collection of boxes is allowed. The order of box objects is not significant. .. container:: message-rst-classification-classificationresults-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassificationResults.proto :lines: 14-27 :language: protobuf :emphasize-lines: 12-12 .. _message-rst-classification-classificationresult: Message ClassificationResult ---------------------------- .. container:: message-rst-classification-classificationresult-multi .. container:: message-rst-classification-classificationresult-documentation .. py:class:: rst.classification.ClassificationResult A class representing the result of a classification process. An example of such a result could be the output of an SVM-based classifier. In the simplest form, only the name of a decided class is given. However, it is also possible to give the whole vector of possible classes with their probabilities. .. codeauthor:: Johannes Wienke .. py:attribute:: decided_class :type: :py:class:`OCTET-VECTOR` A shortcut to get the most likely class easily. This needs to be an ASCII string. .. py:attribute:: classes :type: array of :py:class:`rst.classification.ClassificationResult.ClassWithProbability` The complete vector of classes with their probabilities if suitable. The results in this vector should of cause not contradict decided_class. .. container:: message-rst-classification-classificationresult-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassificationResult.proto :lines: 19-58 :language: protobuf :emphasize-lines: 8-8,38-38 .. _message-rst-classification-classificationresult-classwithprobability: Message ClassWithProbability ---------------------------- .. container:: message-rst-classification-classificationresult-classwithprobability-multi .. container:: message-rst-classification-classificationresult-classwithprobability-documentation .. py:class:: rst.classification.ClassificationResult.ClassWithProbability Represents a single class a classification process can return with the probability that this class applies to the classified aspect. .. py:attribute:: name :type: :py:class:`OCTET-VECTOR` Name of the class (ASCII string). .. py:attribute:: confidence :type: :py:class:`FLOAT32` Some kind of confidence, values are application dependent. However, values summing up to 1 are preferred. .. container:: message-rst-classification-classificationresult-classwithprobability-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/stable/rst/classification/ClassificationResult.proto :lines: 33-47 :language: protobuf :emphasize-lines: 6-6,13-13