MIL_ID ContextOrResultClassId, | //in |
MIL_INT64 LabelOrIndex, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue | //in |
This function allows you to control a setting of a classifier context (or a class definition therein), a dataset context (or a class definition therein), a training context, a training result buffer, or a prediction result buffer. You can typically inquire these settings, using MclassInquire(). These settings can affect the execution of MclassTrain() or MclassPredict().
Specifies the identifier of a context or result buffer to control. Set this parameter to one of the following values.
For specifying the context or result
buffer
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
ContextClassifierId |
Specifies the identifier of a predefined CNN or tree ensemble classifier context. These contexts must have been previously allocated on the required system using MclassAlloc() with M_CLASSIFIER_CNN_PREDEFINED or M_CLASSIFIER_TREE_ENSEMBLE. (summarize)Specifies the identifier of a predefined CNN or tree ensemble classifier context. (more details...) |
||||||||||||||||||||||||||||||||||||||
ContextDatasetId |
Specifies the identifier of an images or features dataset context. These contexts must have been previously allocated on the required system using MclassAlloc() with M_DATASET_IMAGES or M_DATASET_FEATURES. (summarize)Specifies the identifier of an images or features dataset context. (more details...) |
||||||||||||||||||||||||||||||||||||||
ContextTrainId |
Specifies the identifier of a CNN or tree ensemble training context. These contexts must have been previously allocated on the required system using MclassAlloc() with M_TRAIN_CNN or M_TRAIN_TREE_ENSEMBLE. (summarize)Specifies the identifier of a CNN or tree ensemble training context. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultPredictId |
Specifies the identifier of a CNN or tree ensemble prediction result buffer. These buffers must have been previously allocated on the required system using MclassAllocResult() with M_PREDICT_CNN_RESULT or M_PREDICT_TREE_ENSEMBLE_RESULT. (summarize)Specifies the identifier of a CNN or tree ensemble prediction result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultTrainId |
Specifies the identifier of a CNN or tree ensemble training result buffer. These buffers must have been previously allocated on the required system using MclassAllocResult() with M_TRAIN_CNN_RESULT or M_TRAIN_TREE_ENSEMBLE_RESULT. (summarize)Specifies the identifier of a CNN or tree ensemble training result buffer. (more details...) |
Specifies what to control. Set this parameter to one of the following values.
For specifying what to control
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_CONTEXT. |
||||||||||||||||||||||||||||||||||||||
Specifies to control an author in a dataset context. (summarize)Specifies to control an author in a dataset context. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies to control a class definition in a classifier context or a dataset context. (summarize)Specifies to control a class definition in a classifier context or a dataset context. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_CONTEXT |
Specifies to control a global setting of a classifier context or a dataset context. |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Specifies to control a general setting of a classification result buffer. |
Specifies the type of control to set.
See the Parameter associations section for possible values that can be specified.
Specifies the required value for the control.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
To control a global setting of a predefined CNN classifier context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a predefined CNN classifier context, and set the LabelOrIndex parameter to M_CONTEXT.
For a classifier context (predefined
CNN)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_TARGET_IMAGE_SIZE_X |
Sets the X-size of the target image with which to call MclassPredict(). By default, MIL assumes the target image size is the same as the default source layer size, which you can retrieve, using MclassInquire() with M_SIZE_X and M_SIZE_Y. M_TARGET_IMAGE_SIZE_X and M_TARGET_IMAGE_SIZE_Y must both be set to M_DEFAULT (or 0), or they must both be greater or equal to M_SIZE_X and M_SIZE_Y. The increment by which you can increase the dimensions of the target image depends on the size of the classifier's source layer and step. The following calculations indicate how to establish these dimensions:
If the target image size is the same as the source layer size, you are performing a typical image classification process (default). If the target image size is larger than the source layer size, you are performing coarse segmentation. The target image size must never be smaller than the source layer size. INQ (summarize)Sets the X-size of the target image with which to call MclassPredict(). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0. By default, MIL assumes the target image size is the same as the default source layer size. (summarize)Specifies the default value; the default value is 0. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the X-size. |
||||||||||||||||||||||||||||||||||||||
M_TARGET_IMAGE_SIZE_Y |
Sets the Y-size of the target image with which to call MclassPredict(). By default, MIL assumes the target image size is the same as the default source layer size, which you can retrieve, using MclassInquire() with M_SIZE_X and M_SIZE_Y. M_TARGET_IMAGE_SIZE_X and M_TARGET_IMAGE_SIZE_Y must both be set to M_DEFAULT (or 0), or they must both be greater or equal to M_SIZE_X and M_SIZE_Y. The increment by which you can increase the dimensions of the target image depends on the size of the classifier's source layer and step. The following calculations indicate how to establish these dimensions:
If the target image size is the same as the source layer size, you are performing a typical image classification process (default). If the target image size is larger than the source layer size, you are performing coarse segmentation. The target image size must never be smaller than the source layer size. INQ (summarize)Sets the Y-size of the target image with which to call MclassPredict(). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0. By default, MIL assumes the target image size is the same as the default source layer size. (summarize)Specifies the default value; the default value is 0. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the Y-size. |
To control a global setting of a dataset context, the ControlType and corresponding ControlValue parameter settings can be set to the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a dataset context. Unless otherwise specified, the following values apply to an images or features dataset context and you should set the LabelOrIndex parameter to M_CONTEXT.
For a dataset context (images or
features)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_ACTIVE_AUTHOR_INDEX |
Sets the author that is automatically added to labeling operations performed on a dataset context. MIL uses the active author unless you specify a different one. INQ (summarize)Sets the author that is automatically added to labeling operations performed on a dataset context. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_CURRENT_USER. |
||||||||||||||||||||||||||||||||||||||
Specifies the index identifying the author that is automatically defined for each dataset entry. You can only specify the index of an existing author. Use M_AUTHOR_ADD to add a new author. (summarize)Specifies the index identifying the author that is automatically defined for each dataset entry. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Set this parameter to the following. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_CURRENT_USER |
Specifies the system's current username as the author that is automatically defined for each dataset entry. If the system's current user name does not exist in the dataset, MIL adds at its end. Note that, in this case, authors are considered the same if their respective names are the same (regardless of their index). (summarize)Specifies the system's current username as the author that is automatically defined for each dataset entry. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ACTIVE_AUTHOR_UPDATE |
Sets the behavior of the entry's author after a modification was performed on the entry. When disabled, changing an entry will never change its author's name. INQ (summarize)Sets the behavior of the entry's author after a modification was performed on the entry. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ENABLE. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies to keep the existing author's information. |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies that when an entry's information (an entry's region information) is modified, its author is automatically modified according to M_ACTIVE_AUTHOR_INDEX. Note, entries only have one region. (summarize)Specifies that when an entry's information (an entry's region information) is modified, its author is automatically modified according to M_ACTIVE_AUTHOR_INDEX. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_AUTHOR_ADD |
Adds a new author to a dataset context, according to the specified name. Added authors are given an index and a key (UUID). Once you add an author, you can refer to it in a dataset's entries. (summarize)Adds a new author to a dataset context, according to the specified name. (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the author to add, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the author to add, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_AUTHOR_DELETE |
Deletes authors from a dataset context, according to the specified index. (summarize)Deletes authors from a dataset context, according to the specified index. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ALL. |
||||||||||||||||||||||||||||||||||||||
Specifies the authors to delete from the dataset context. Note that you cannot delete the active author specified with M_ACTIVE_AUTHOR_INDEX. (summarize)Specifies the authors to delete from the dataset context. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to delete all explicitly added authors. MIL does not delete the active author (M_ACTIVE_AUTHOR_INDEX). (summarize)Specifies to delete all explicitly added authors. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_AUTHOR_DELETE_BY_KEY |
Deletes an author from a dataset context, according to the specified key (UUID). (summarize)Deletes an author from a dataset context, according to the specified key (UUID). (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_UUID Value |
Specifies the key of the author to delete. The key is defined as a MIL universal unique identifier (UUID). To specify a MIL_UUID value when using a C compiler, you must call the MIL_UUID version of this function (MclassControlMilUuid). When using a C++ or other compiler, MclassControl() internally calls the MIL_UUID version of this function.
Specifies the key of the author to delete. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_AUTHOR_NAME |
Sets the name of an author in the dataset context. You must set the LabelOrIndex parameter to M_AUTHOR_INDEX(). INQ (summarize)Sets the name of an author in the dataset context. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the name of the author, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the name of the author, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_CLASS_ADD |
Adds a new class definition to a dataset context, according to the specified name. MIL assigns an index to the new class definition that is 1 greater than the highest existing class definition index. Note, you cannot add a class definition to a classifier context. (summarize)Adds a new class definition to a dataset context, according to the specified name. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies to add a new class definition with no explicitly defined name. MIL defines a default name, in a "Class ##" format, where "##" is the index value. (summarize)Specifies to add a new class definition with no explicitly defined name. (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the name of the class definition to add, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the name of the class definition to add, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_CLASS_DELETE |
Deletes a class definition from a dataset context, according to the specified index. If an entry in a dataset context references this deleted class definition, that reference is also deleted. Dataset entries without class definitions will cause an error when you call MclassTrain(). (summarize)Deletes a class definition from a dataset context, according to the specified index. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ALL. |
||||||||||||||||||||||||||||||||||||||
Specifies a class definition to delete. (summarize)Specifies a class definition to delete. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to delete all class definitions. |
||||||||||||||||||||||||||||||||||||||
M_CLASS_DELETE_BY_KEY |
Deletes a class definition from a dataset context, according to the specified key (UUID). If an entry in a dataset context references this deleted class definition, that reference is also deleted. Dataset entries without class definitions will cause an error when you call MclassTrain(). (summarize)Deletes a class definition from a dataset context, according to the specified key (UUID). (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_UUID Value |
Specifies the key of the class definition to delete. The key is defined as a MIL universal unique identifier (UUID). To specify a MIL_UUID value when using a C compiler, you must call the MIL_UUID version of this function (MclassControlMilUuid). When using a C++ or other compiler, MclassControl() internally calls the MIL_UUID version of this function.
Specifies the key of the class definition to delete. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ENTRY_ADD |
Adds a new entry to a dataset context. MIL adds a new entry after the last one. For every entry you add, MIL generates a key (MIL_UUID) to uniquely identify that entry. For an images dataset, this automatically adds a full frame region that you can refer to using index 0. You can import data, such as entries, from a CSV file to a dataset context, using MclassImport(). You can also use MIL CoPilot to interactively create, modify, and export datasets and their entries. (summarize)Adds a new entry to a dataset context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_ENTRY_DELETE |
Deletes an entry from a dataset context, according to the specified index. (summarize)Deletes an entry from a dataset context, according to the specified index. (more details...) |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= M_NUMBER_OF_ENTRIES |
Specifies the index of the entry to delete. The default value is 0. (summarize)Specifies the index of the entry to delete. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ENTRY_DELETE_ALL |
Deletes all entries in a dataset context. (summarize)Deletes all entries in a dataset context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_ENTRY_DELETE_BY_KEY |
Deletes an entry from a dataset context, according to the specified key (UUID). (summarize)Deletes an entry from a dataset context, according to the specified key (UUID). (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_UUID Value |
Specifies the key of the entry to delete. The key is defined as a MIL universal unique identifier (UUID). To specify a MIL_UUID value when using a C compiler, you must call the MIL_UUID version of this function (MclassControlMilUuid). When using a C++ or other compiler, MclassControl() internally calls the MIL_UUID version of this function.
Specifies the key of the entry to delete. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MAKE_FILE_PATHS_ABSOLUTE |
Makes the file path of every entry in a dataset context into an absolute path. This is done by concatenating the current root path (M_ROOT_PATH value) to the relative path of all entries. This results in every entry having a complete path, and the root path (M_ROOT_PATH) being replaced with an empty string (MIL_TEXT("")). This value only applies to an images dataset context. (summarize)Makes the file path of every entry in a dataset context into an absolute path. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_MAKE_FILE_PATHS_RELATIVE |
Makes the file path of every entry in a dataset context into a relative path. This is done by parsing the absolute file path (M_FILE_PATH_ABS) of all entries to find a common root path. If a common root path is found, the file paths of all entries are modified to use relative paths, and the root path (M_ROOT_PATH) is set to the newly found common root path. Note, if MobjInquire() with M_OBJECT_FILE_FOLDER returns a non-empty string value, and the common path has a part that is the same as the object's file folder, MIL will substitute this value with "///DATASET/". If M_OBJECT_FILE_FOLDER returns an empty string, MIL uses the common root path that was found. For example, if the file paths of two dataset entries are A:\work\examples\ProcessingRocks\Classification\Image1.mim and A:\work\examples\ProcessingRocks\Classification\Image2.mim, MIL would establish the common path as A:\work\examples\ProcessingRocks\Classification. In this case, if M_OBJECT_FILE_FOLDER returns A:\work\examples\ProcessingRocks\Classification, MIL would set the root path (M_ROOT_PATH) to ///DATASET///. However, if M_OBJECT_FILE_FOLDER returns an empty string, MIL would set the root path to A:\work\examples\ProcessingRocks\Classification. This value only applies to an images dataset context. (summarize)Makes the file path of every entry in a dataset context into a relative path. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_MOVE_ENTRIES |
Copies and reorganizes dataset entries according to the dataset classes and the specified destination folder. Within this folder, subfolders are created for each class and the files referenced in your entries are copied into them according to their ground truth class label. The source path and root path information for all entries are updated to the new copied location. The original source files are not deleted and remain unaffected. It is recommended that you specify an empty destination folder each time you use M_MOVE_ENTRIES. Class folders that already exist in the destination are not recreated. Existing files within that folder that have conflicting names are overwritten. Existing files without conflicting names remain unaffected. Entries without a ground truth are placed in a subfolder called 'UnlabeledImages'. Characters that are illegal in Windows file paths are replaced by the underscore character regardless of the operating system used. The maximum size of the file path is 259 characters. If this maximum is exceeded, MIL attempts to shorten the folder class names. This value only applies to an images dataset context. (summarize)Copies and reorganizes dataset entries according to the dataset classes and the specified destination folder. (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the directory path, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the directory path, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_ROOT_PATH |
Sets the root path that is used for the file path of a dataset's entries. The full path of the entries is the root path and the file path. The file path is set, using MclassControlEntry() with M_FILE_PATH. This value only applies to an images dataset context. INQ (summarize)Sets the root path that is used for the file path of a dataset's entries. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the specified root file path, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the specified root file path, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
To control a class definition, the ControlType and corresponding ControlValue parameter settings can be set to the following values. Unless otherwise specified, set the ContextOrResultClassId parameter to the identifier of a classifier context (predefined CNN or tree ensemble) or a dataset context (images or features), and set the LabelOrIndex parameter to M_CLASS_INDEX().
Note, class definitions are added to a dataset context, using M_CLASS_ADD.
For a class definition in a classifier or dataset
context (any)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_CLASS_DRAW_COLOR |
Sets the color assigned to a class definition. This color is used as a visual label and helps to identify class definitions. Draw operations use the class definition color. INQ (summarize)Sets the color assigned to a class definition. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Specifies an RGB value to draw in an 8-bit, 3-band buffer. The red, green, and blue values must be values between 0 and 255, inclusive. (summarize)Specifies an RGB value to draw in an 8-bit, 3-band buffer. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the red component, as a value between 0 and 255. |
|||||||||||||||||||||||||||||||||||||||
Specifies the green component, as a value between 0 and 255. |
|||||||||||||||||||||||||||||||||||||||
Specifies the blue component, as a value between 0 and 255. |
|||||||||||||||||||||||||||||||||||||||
M_COLOR_BLACK |
Specifies the color black. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_BLUE |
Specifies the color blue. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_BRIGHT_GRAY |
Specifies the color bright gray. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_CYAN |
Specifies the color cyan. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_DARK_BLUE |
Specifies the color dark blue. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_DARK_CYAN |
Specifies the color dark cyan. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_DARK_GREEN |
Specifies the color dark green. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_DARK_MAGENTA |
Specifies the color dark magenta. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_DARK_RED |
Specifies the color dark red. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_DARK_YELLOW |
Specifies the color dark yellow. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_GRAY |
Specifies the color gray. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_GREEN |
Specifies the color green. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_LIGHT_BLUE |
Specifies the color light blue. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_LIGHT_GRAY |
Specifies the color light gray. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_LIGHT_GREEN |
Specifies the color light green. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_LIGHT_WHITE |
Specifies the color light white. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_MAGENTA |
Specifies the color magenta. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_RED |
Specifies the color red. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_WHITE |
Specifies the color white. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_YELLOW |
Specifies the color yellow. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies a grayscale value. When drawing in a multi-band buffer, the grayscale value is cast to the type of the destination buffer's bands. This value will be replicated in each band. Note that a grayscale value can be any integer or floating-point number. If the given value exceeds the range of the possible values that can be stored in each band of the destination buffer, the least significant bits of the value are used. (summarize)Specifies a grayscale value. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CLASS_ICON_ID |
Sets the class definition's sample image. This image helps visually identify the class definition. This does not affect calculations. When you call MclassControl() with M_CLASS_ICON_ID, MIL copies the image to the context and assigns it a new identifier. MIL returns this new identifier, if you inquire M_CLASS_ICON_ID. INQ (summarize)Sets the class definition's sample image. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that the image associated with the class definition is freed. Note that if the specified class definition does not have an associated image, this setting has no effect. (summarize)Specifies that the image associated with the class definition is freed. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL image identifier |
Specifies the identifier of the image buffer to use for the class definition's sample image. |
||||||||||||||||||||||||||||||||||||||
M_CLASS_NAME |
Sets the name of a class definition that is currently in the dataset context. INQ (summarize)Sets the name of a class definition that is currently in the dataset context. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the name of the class definition, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the name of the class definition, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_CLASS_WEIGHT |
Sets the class definition's weight. In this case, you must set the ContextOrResultClassId parameter to the identifier of a features dataset context or a tree ensemble classifier context. The specified weight can only have an effect if M_CLASS_WEIGHT_MODE is set to M_USER_DEFINED. INQ (summarize)Sets the class definition's weight. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
Value >= 0.0 |
Specifies the weight. |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
To control a global setting of a CNN training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a CNN training context, and set the LabelOrIndex parameter to M_CONTEXT.
For a training context (CNN)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_CNN_TRAIN_ENGINE |
Sets the engine (processing unit) that MIL uses to perform the training process. INQ (summarize)Sets the engine (processing unit) that MIL uses to perform the training process. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_AUTO. |
||||||||||||||||||||||||||||||||||||||
M_AUTO |
Specifies the engine automatically. Typically, MIL uses the best available GPU. (summarize)Specifies the engine automatically. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CPU |
Specifies the CPU. |
||||||||||||||||||||||||||||||||||||||
M_GPU |
Specifies the GPU. |
||||||||||||||||||||||||||||||||||||||
M_INITIAL_LEARNING_RATE |
Sets the initial learning rate for training. The learning rate determines the degree to which the classifier's weights are modified at each mini-batch during training. You can automatically modify this setting, if you modify M_RESET_TRAINING_VALUES. INQ (summarize)Sets the initial learning rate for training. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0.005. |
||||||||||||||||||||||||||||||||||||||
Value > 0.0 |
Specifies the learning rate. |
||||||||||||||||||||||||||||||||||||||
M_LEARNING_RATE_DECAY |
Sets the learning rate decay for training. The learning rate decay determines how fast the learning rate decreases during training. This can help prevent excessive weights. You can automatically modify this setting, if you modify M_RESET_TRAINING_VALUES. INQ (summarize)Sets the learning rate decay for training. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0.1. |
||||||||||||||||||||||||||||||||||||||
Value > 0.0 |
Specifies the learning rate decay. |
||||||||||||||||||||||||||||||||||||||
M_MAX_EPOCH |
Sets the maximum number of epochs. An epoch refers to one complete cycle through the data that the classifier must learn during training. You can automatically modify this setting, if you modify M_RESET_TRAINING_VALUES. INQ (summarize)Sets the maximum number of epochs. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 60. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the maximum number. |
||||||||||||||||||||||||||||||||||||||
M_MINI_BATCH_SIZE |
Sets the size of each mini-batch. MIL uses mini-batches to split the training dataset to help make the training process more efficient. You can automatically modify this setting, if you modify M_RESET_TRAINING_VALUES. INQ (summarize)Sets the size of each mini-batch. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 32. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the size. |
||||||||||||||||||||||||||||||||||||||
M_RESET_TRAINING_VALUES |
Sets the value of all training mode controls (hyperparameters) automatically, according to the specified training mode. INQ (summarize)Sets the value of all training mode controls (hyperparameters) automatically, according to the specified training mode. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_COMPLETE. |
||||||||||||||||||||||||||||||||||||||
M_COMPLETE |
Specifies a complete training mode. Typically, this is for completely restarting the training of a CNN classifier context, or for training a CNN classifier context that is not trained. The training mode controls, and what M_COMPLETE automatically sets them to, are as follows:
When using M_COMPLETE, the classifier architecture adapts to certain qualities of the training dataset (image X- and Y-size, image bands, and the number of classes). All of the classifier's weights (learnable parameters) are randomly initialized prior to a complete training. (summarize)Specifies a complete training mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FINE_TUNING |
Specifies a fine tuning training mode. Typically, this is for a CNN classifier context that was already trained on a specific classification problem, and that you must fine tune with new data. If you specify M_FINE_TUNING with a classifier context that was not sufficiently trained, you will get an error. The training mode controls, and what M_FINE_TUNING automatically sets them to, are as follows:
When using M_FINE_TUNING, the classifier architecture is unchangeable. Therefore, the classifier's weights must be complete, and all the related qualities of the training dataset (image X- and Y-size, image bands, and the number of classes) must comply to the classifier's architecture. A fine-tuning training starts by using the classifier's current weights (learnable parameters). (summarize)Specifies a fine tuning training mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TRANSFER_LEARNING |
Specifies a transfer learning mode. Typically, this is for a CNN classifier context that was already trained on a specific classification problem, and that you must train on a similar (but new) problem. If you specify M_TRANSFER_LEARNING with a context that was not sufficiently trained, you will get an error. The training mode controls, and what M_TRANSFER_LEARNING automatically sets them to, are as follows:
When using M_TRANSFER_LEARNING, the classifier architecture adapts to certain qualities of the training dataset (image X- and Y-size, and the number of classes). During training, some of the classifier's weights (learnable parameters) are randomly initialized and affected by the training (those related to classifying features), while others remain unaffected by the training (those related to extracting features). (summarize)Specifies a transfer learning mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SCHEDULER_TYPE |
Sets the schedule with which to adjust the learning rate. You can automatically modify this setting, if you modify M_RESET_TRAINING_VALUES. INQ (summarize)Sets the schedule with which to adjust the learning rate. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_CYCLICAL_DECAY. |
||||||||||||||||||||||||||||||||||||||
M_CYCLICAL_DECAY |
Specifies to decay the learning rate at an internally established cyclical schedule. |
||||||||||||||||||||||||||||||||||||||
M_DECAY |
Specifies to decay the learning rate, as weights are updated. |
To control a global setting of a tree ensemble training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a tree ensemble training context, and set the LabelOrIndex parameter to M_CONTEXT.
For a training context (tree ensemble)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_BOOTSTRAP |
Sets whether to use bootstrap aggregation for the training dataset entries to produce multiple and separate training sets when building trees. INQ (summarize)Sets whether to use bootstrap aggregation for the training dataset entries to produce multiple and separate training sets when building trees. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_WITH_REPLACEMENT. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies not to use bootstrap aggregation. |
||||||||||||||||||||||||||||||||||||||
M_WITH_REPLACEMENT |
Specifies to use bootstrap aggregation, and allow replacement (chosen entries in a training set can be chosen again). |
||||||||||||||||||||||||||||||||||||||
M_WITHOUT_REPLACEMENT |
Specifies to use bootstrap aggregation, and not allow replacement (chosen entries in a training set cannot be chosen again). |
||||||||||||||||||||||||||||||||||||||
M_CLASS_WEIGHT_MODE |
Sets how to establish the weight of a class definition. INQ (summarize)Sets how to establish the weight of a class definition. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_BALANCE |
Specifies a balanced weight. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no weight. |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED |
Specifies to use the weight defined with M_CLASS_WEIGHT. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_OUT_OF_BAG_RESULTS |
Sets whether to use out-of-bag dataset entries to estimate the generalization accuracy during training. Note, bagging information is typically unreliable if your training dataset has augmented entries. INQ (summarize)Sets whether to use out-of-bag dataset entries to estimate the generalization accuracy during training. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ENABLE. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies not to use out-of-bag entries. |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies to use out-of-bag entries. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_PROXIMITY_MATRIX |
Sets whether to calculate the proximity measure matrix when building trees. This is an N x N matrix, where N is the number of entries. The intersection value between pairs of entries in the matrix defines their proximity, which refers to the average number of trees that occupy the same terminal node for those entries. For example, if entries i and j are in the same terminal node, their proximity increases by one. INQ (summarize)Sets whether to calculate the proximity measure matrix when building trees. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_DISABLE. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies not to calculate the proximity measure matrix when building trees. |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies to calculate the proximity measure matrix when building trees. |
||||||||||||||||||||||||||||||||||||||
M_FEATURE_IMPORTANCE_MODE |
Sets how to establish the importance of the features. Every entry in a features dataset refers to a set of features. For example, every entry can refer to a set of blob features, such as area, perimeter, and Feret diameter. Specific values for these features are specified, for each entry, using MclassControlEntry() with M_RAW_DATA. By enabling a feature importance mode, MIL establishes, during training, whether certain features are more important than others in determining the class to which the input data belongs. For example, the perimeter feature can end up being very important to establishing a successful classification, while the area feature can end up being almost irrelevant. To retrieve the resulting importance of features after training, call MclassGetResult() with M_FEATURE_IMPORTANCE. You can then modify your set of features and retrain, which can help improve the tree ensemble classifier's performance and accuracy. Note, M_FEATURE_IMPORTANCE_MODE does not directly affect training. It allows you to retrieve which features are more important; you can then use this information to modify your dataset (for example, you can specify only the important features) and retrain. In general, the fastest modes with which to establish the feature importance are M_MEAN_DECREASE_IMPURITY, M_PERMUTATION, and M_DROP_COLUMN, while the modes with which to most accurately establish the feature importance are M_DROP_COLUMN, M_PERMUTATION, and M_MEAN_DECREASE_IMPURITY. INQ (summarize)Sets how to establish the importance of the features. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_MEAN_DECREASE_IMPURITY. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies to disable the feature importance mode. In this case, you cannot retrieve any information about the feature importance. (summarize)Specifies to disable the feature importance mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DROP_COLUMN |
Specifies that the feature importance is based on the drop column of features. In this case, the more the elimination of a feature affects accuracy, the more importance that feature is given. To specify the set with which to calculate this type of feature importance, use M_FEATURE_IMPORTANCE_SET. To use M_DROP_COLUMN, you must train with a development dataset or compute out-of-bag results (that is, enable M_COMPUTE_OUT_OF_BAG_RESULTS). (summarize)Specifies that the feature importance is based on the drop column of features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MEAN_DECREASE_IMPURITY |
Specifies that the feature importance is based on a decreasing impurity process. In this case, the more a feature affects a proper node splitting, the more important it is. Proper splitting means that the two sets resulting from splitting the node are significantly purer (better) than the set that was input to the node. (summarize)Specifies that the feature importance is based on a decreasing impurity process. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PERMUTATION |
Specifies that the feature importance is based on feature permutation. In this case, the more the shuffling of a feature affects accuracy, the more importance that feature is given. To specify the set with which to calculate this type of feature importance, use M_FEATURE_IMPORTANCE_SET. To use M_PERMUTATION, you must train with a development dataset or compute out-of-bag results (that is, enable M_COMPUTE_OUT_OF_BAG_RESULTS). (summarize)Specifies that the feature importance is based on feature permutation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FEATURE_IMPORTANCE_SET |
Sets how to establish the group of features with which to determine feature importance when using drop column or permutation. M_FEATURE_IMPORTANCE_SET only has an effect if M_FEATURE_IMPORTANCE_MODE is set to M_DROP_COLUMN or M_PERMUTATION. INQ (summarize)Sets how to establish the group of features with which to determine feature importance when using drop column or permutation. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_AUTO. |
||||||||||||||||||||||||||||||||||||||
M_AUTO |
Specifies to automatically establish the feature set to use. If available, MIL uses M_DEV_DATASET; otherwise, MIL uses M_OUT_OF_BAG. (summarize)Specifies to automatically establish the feature set to use. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEV_DATASET |
Specifies to use the development dataset. |
||||||||||||||||||||||||||||||||||||||
M_OUT_OF_BAG |
Specifies to use the out-of-bag set. In this case, you must not disable M_BOOTSTRAP. Note, bagging information is typically unreliable if your data is augmented. (summarize)Specifies to use the out-of-bag set. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MIN_IMPURITY_DECREASE |
Sets a decrease of impurity requirement for splitting a node. That is, MIL will split a node if it induces a decrease of impurity greater than or equal to the specified value. The weighted impurity decrease equation is as follows: N_t / N * (impurity - N_t_R / N_t * right_impurity - N_t_L / N_t * left_impurity), where N is the total number of dataset entries, N_t is the number of dataset entries related to the current node, N_t_L is the number of dataset entries related to the left child, and N_t_R is the number of dataset entries related to the right child. N, N_t, N_t_R, and N_t_L all refer to the weighted sum, if weights (entry weights and class weights) are used. INQ (summarize)Sets a decrease of impurity requirement for splitting a node. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0.0. |
||||||||||||||||||||||||||||||||||||||
Value >= 0.0 |
Specifies the impurity value. |
||||||||||||||||||||||||||||||||||||||
M_MIN_NUMBER_OF_ENTRIES_LEAF |
Sets the minimum number of training dataset entries, or a percentage of the minimum number of related dataset entries, that MIL uses to identify a leaf node. MIL uses this value to establish M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE. INQ (summarize)Sets the minimum number of training dataset entries, or a percentage of the minimum number of related dataset entries, that MIL uses to identify a leaf node. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 1. |
||||||||||||||||||||||||||||||||||||||
0.0 < MinNumPercent <= 100.0 |
Specifies the minimum number of entries, as a percentage. You should only use a percentage when M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE is set to M_USER_DEFINED_PERCENTAGE. If you specify a percentage value that results in the minimum number of entries equaling 0, MIL uses 1 as the minimum number; that is, if Round((Value/100) * NumberEntriesInTrainDataset) == 0, then MinNumberEntriesLeaf = 1. (summarize)Specifies the minimum number of entries, as a percentage. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 1 |
Specifies the minimum number of entries. You should only use this value when M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE is set to M_USER_DEFINED_VALUE. (summarize)Specifies the minimum number of entries. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE |
Sets how to establish the minimum number of related dataset entries required to be at a leaf node. A split point at any depth will only be considered if it leaves at least the minimum number of entries (leaf training entries) in each of the left and right branches. INQ (summarize)Sets how to establish the minimum number of related dataset entries required to be at a leaf node. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_USER_DEFINED_VALUE. |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED_PERCENTAGE |
Specifies to use a percentage, determined from the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_LEAF. |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED_VALUE |
Specifies to use the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_LEAF. |
||||||||||||||||||||||||||||||||||||||
M_MIN_NUMBER_OF_ENTRIES_SPLIT |
Sets the minimum number of training dataset entries, or a percentage of the minimum number of related dataset entries, that MIL uses to determine how to best split the internal nodes of the trees. MIL uses this value to establish M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE. INQ (summarize)Sets the minimum number of training dataset entries, or a percentage of the minimum number of related dataset entries, that MIL uses to determine how to best split the internal nodes of the trees. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 2. |
||||||||||||||||||||||||||||||||||||||
0.0 < MinNumPercent <= 100.0 |
Specifies the minimum number of entries, as a percentage. This only has an effect if M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE is set to M_USER_DEFINED_PERCENTAGE. If you specify a percentage value that results in the minimum number of entries equaling 0, MIL uses 2 as the minimum number; that is, if Round((Value/100) * NumberEntriesInTrainDataset) == 0, then MinNumberEntriesSplit = 2. (summarize)Specifies the minimum number of entries, as a percentage. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 1 |
Specifies the minimum number of entries. This only has an effect if M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE is set to M_USER_DEFINED_VALUE. (summarize)Specifies the minimum number of entries. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE |
Sets how to establish the minimum number of related dataset entries required to split an internal node. INQ (summarize)Sets how to establish the minimum number of related dataset entries required to split an internal node. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_USER_DEFINED_VALUE. |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED_PERCENTAGE |
Specifies to use a percentage, determined from the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_SPLIT. |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED_VALUE |
Specifies to use the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_SPLIT. |
||||||||||||||||||||||||||||||||||||||
M_MIN_WEIGHT_FRACTION_LEAF |
Sets the minimum weighted fraction of the sum total of weights (of all the dataset entries) required to be at a leaf node. Entries have equal weight when M_CLASS_WEIGHT_MODE is set to M_NONE. INQ (summarize)Sets the minimum weighted fraction of the sum total of weights (of all the dataset entries) required to be at a leaf node. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0.0. |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 0.5 |
Specifies the minimum weighted fraction. |
||||||||||||||||||||||||||||||||||||||
M_NODE_MAX_NUMBER_OF_FEATURES |
Sets the maximum number of features in the training dataset, or a percentage of the maximum number of features, that MIL can use to determine how to best split the nodes of the trees. M_NODE_MAX_NUMBER_OF_FEATURES only has an effect if M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_USER_DEFINED_VALUE or M_USER_DEFINED_PERCENTAGE. If M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_LOG2, and the number of features in the dataset is 1, MIL trains with 1 feature, even though the calculation results in 0; that is, log(1) = 0. If M_NODE_MAX_NUMBER_OF_FEATURES_MODE is equal to M_USER_DEFINED_VALUE, and M_NODE_MAX_NUMBER_OF_FEATURES is higher than the actual number of features in the training dataset, MIL uses all the features in the dataset. INQ (summarize)Sets the maximum number of features in the training dataset, or a percentage of the maximum number of features, that MIL can use to determine how to best split the nodes of the trees. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ALL. |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies no maximum. |
||||||||||||||||||||||||||||||||||||||
0.0 <= MaxNumPercent <= 100.0 |
Specifies the percentage with which to determine the maximum number of features. This only has an effect if M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_USER_DEFINED_PERCENTAGE. If you specify a percentage value that results in the maximum number of features equaling 0, MIL uses 1 feature as the maximum number; that is, if Round((Value/100)*NumberOfFeaturesInTrainDataset) == 0, then MaxNumberOfFeatures = 1 (see M_NODE_MAX_NUMBER_OF_FEATURES_MODE). (summarize)Specifies the percentage with which to determine the maximum number of features. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 1 |
Specifies the value with which to determine the maximum number of features. This only has an effect if M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_USER_DEFINED_VALUE. If you specify a maximum value that is greater than the total number of features available, MIL uses the total number of features available. (summarize)Specifies the value with which to determine the maximum number of features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NODE_MAX_NUMBER_OF_FEATURES_MODE |
Sets how to establish the maximum number of features that MIL uses to determine how to best split the nodes of the trees. INQ (summarize)Sets how to establish the maximum number of features that MIL uses to determine how to best split the nodes of the trees. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_SQUARE_ROOT. |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies that all available features are used. |
||||||||||||||||||||||||||||||||||||||
M_LOG2 |
Specifies to use a base 2 logarithm, determined from the total number of features. This can be described as: M_LOG2 = Round(Log2(NumberOfFeatures)). (summarize)Specifies to use a base 2 logarithm, determined from the total number of features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SQUARE_ROOT |
Specifies to use a square root, determined from the total number of features. This can be described as: M_SQUARE_ROOT = Round(Log2(NumberOfFeatures)). (summarize)Specifies to use a square root, determined from the total number of features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED_PERCENTAGE |
Specifies to use a percentage, determined from the total number of features, where the percentage is set by M_NODE_MAX_NUMBER_OF_FEATURES. This can be described as: M_USER_DEFINED_PERCENTAGE = Round(NumberOfFeatures* MaxNumberOfFeatures/100). (summarize)Specifies to use a percentage, determined from the total number of features, where the percentage is set by M_NODE_MAX_NUMBER_OF_FEATURES. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED_VALUE |
Specifies to use the maximum number of features defined with M_NODE_MAX_NUMBER_OF_FEATURES. |
||||||||||||||||||||||||||||||||||||||
M_NUMBER_OF_TREES |
Sets the number of trees in the tree ensemble train context. (summarize)Sets the number of trees in the tree ensemble train context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 10. |
||||||||||||||||||||||||||||||||||||||
Value >= 1 |
Specifies the amount of trees in the tree ensemble. |
||||||||||||||||||||||||||||||||||||||
M_SEED_MODE |
Sets the mode with which to initialize the seed used for training. MIL uses the seed value to generate the random numbers needed to train a tree ensemble. Specifically, MIL uses randomness to: INQ
Sets the mode with which to initialize the seed used for training. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_USER_DEFINED. |
||||||||||||||||||||||||||||||||||||||
M_AUTO |
Specifies that the seed is chosen at random, and that MIL generates and uses a new seed each time you call MclassTrain(). To retrieve the used seed, call MclassGetResult() with M_GENERAL and M_SEED_VALUE. If you retrain with the same seed, you can reproduce the same training (MIL uses the same random values). (summarize)Specifies that the seed is chosen at random, and that MIL generates and uses a new seed each time you call MclassTrain(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_USER_DEFINED |
Specifies the user-defined seed set with M_SEED_VALUE. |
||||||||||||||||||||||||||||||||||||||
M_SEED_VALUE |
Sets the seed value that MIL uses to generate the random numbers needed to train a tree ensemble. MIL ignores this explicitly specified seed value if M_SEED_MODE is set to M_AUTO. INQ (summarize)Sets the seed value that MIL uses to generate the random numbers needed to train a tree ensemble. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 1. |
||||||||||||||||||||||||||||||||||||||
Value >= 1 |
Specifies the seed value. |
||||||||||||||||||||||||||||||||||||||
M_SPLIT_QUALITY_TYPE |
Sets how to measure the quality of a node split. INQ (summarize)Sets how to measure the quality of a node split. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_GINI. |
||||||||||||||||||||||||||||||||||||||
M_ENTROPY |
Specifies that MIL uses an Entropy based function to measure the quality of a node split. |
||||||||||||||||||||||||||||||||||||||
M_GINI |
Specifies that MIL uses a Gini based function to measure the quality of a node split. |
||||||||||||||||||||||||||||||||||||||
M_TREE_MAX_DEPTH |
Sets the maximum depth of the trees in the tree ensemble. The depth of a tree (M_TREE_MAX_DEPTH) is the depth of its deepest node. The depth of a node is the number of edges (connectors) from that node to the tree's root node. A root node has a depth of 0. To retrieve the actual depth achieved after training, call MclassGetResult() with M_TREE_DEPTHS_ACHIEVED. The depth achieved is always less than or equal to the maximum tree depth (M_TREE_MAX_DEPTH). INQ (summarize)Sets the maximum depth of the trees in the tree ensemble. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no maximum depth. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the maximum depth. |
||||||||||||||||||||||||||||||||||||||
M_TREE_MAX_NUMBER_OF_LEAF_NODES |
Sets the maximum number of terminal nodes in the tree. INQ (summarize)Sets the maximum number of terminal nodes in the tree. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no maximum. |
||||||||||||||||||||||||||||||||||||||
Value >= 1 |
Specifies the maximum number of terminal nodes in the tree. |
To control a global setting of a training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a CNN or tree ensemble training context, and set the LabelOrIndex parameter to M_CONTEXT.
For a training context (CNN or tree
ensemble)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_SUPPORT_MISSING_GROUND_TRUTH |
Sets whether the training process allows the training and development datasets to contain entries that do not have a ground truth. Note, an entry's ground truth is specified using MclassControlEntry() with M_CLASS_INDEX_GROUND_TRUTH. INQ (summarize)Sets whether the training process allows the training and development datasets to contain entries that do not have a ground truth. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_DISABLE. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies that entries without a ground truth are not allowed. In this case, if you call MclassTrain(), and one or more entries in the training or development datasets do not have a ground truth, you will get an error. (summarize)Specifies that entries without a ground truth are not allowed. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies that entries without a ground truth are allowed. In this case, if you call MclassTrain(), and one or more entries in the training or development datasets do not have a ground truth, MIL ignores them. (summarize)Specifies that entries without a ground truth are allowed. (more details...) |
To control a global setting of a classifier context or a training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a predefined CNN or tree ensemble training or classifier context, and set the LabelOrIndex parameter to M_CONTEXT.
For a classifier or training context (CNN or tree
ensemble)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_TIMEOUT |
Sets the maximum calculation time, in msec. If you specify a training context, the timeout applies to MclassTrain(). If you specify a classifier context, the timeout applies to MclassPredict(). INQ (summarize)Sets the maximum calculation time, in msec. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_DISABLE. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies an infinite amount of time. |
||||||||||||||||||||||||||||||||||||||
Value > 0.0 |
Specifies the maximum time, in msec. |
To control a general setting of a training result buffer, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of either a CNN or tree ensemble training result buffer, unless otherwise specified, and set the LabelOrIndex parameter to M_GENERAL.
For a training result buffer (CNN or tree
ensemble)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_STOP_TRAIN |
Stops the current execution of MclassTrain(). This can only be done from another thread of higher priority, or from a user-defined classification hook function. If you stop training a CNN classifier context, and 1 or more epochs are completed, results are typically available, except those related to development accuracy, training accuracy, development error rate, and training error rate. If you stop training a tree ensemble classifier context, and 1 or more trees are completed, all results are available. If 1 or more epochs are completed, MIL saves the trained classifier results that MclassTrain() produces up to the point that you stop training. You can copy these results into a classifier context, using MclassCopyResult(). (summarize)Stops the current execution of MclassTrain(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_UPDATE_TRAINED_CNN_PARAMS |
Updates the internal and hidden parameters (weights) of the classifier. This only applies when training a CNN classifier, which you must specify with the ContextOrResultClassId parameter. (summarize)Updates the internal and hidden parameters (weights) of the classifier. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NOW. |
||||||||||||||||||||||||||||||||||||||
M_NOW |
Specifies to immediately update the training parameters network. |
To control a general setting of a prediction result buffer, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. Unless otherwise specified, set the ContextOrResultClassId parameter to the identifier of either a CNN or tree ensemble prediction result buffer, and set the LabelOrIndex parameter to M_GENERAL. Note, it is possible to specify M_STOP_PREDICT when calling MclassPredict() with a target dataset; this requires setting the ContextOrResultClassId parameter to the identifier of the output dataset (images or features), and setting the LabelOrIndex parameter to M_CONTEXT.
For a prediction result buffer (CNN or tree
ensemble)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_RESET |
Removes all results from the classification result buffer. Note that this does not delete the result buffer identifier, as is the case with MclassFree(). (summarize)Removes all results from the classification result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_STOP_PREDICT |
Stops the current execution of MclassPredict(). This can only be done from another thread of higher priority, or from a user-defined classification hook function. If you stop the prediction, MIL does not return any results. Note, to stop the prediction of a target dataset, you must set the ContextOrResultClassId parameter to the identifier of the output dataset (produced by MclassPredict()), and set the LabelOrIndex parameter to M_CONTEXT. (summarize)Stops the current execution of MclassPredict(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default behavior. |
void MclassControlInt64
(MIL_ID
ContextOrResultClassId, MIL_INT64 LabelOrIndex,
MIL_INT64 ControlType,
MIL_INT64 ControlValue)
Parameters
ContextOrResultClassId See ContextOrResultClassId of the main function for a description. LabelOrIndex See LabelOrIndex of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. |
void MclassControlDouble
(MIL_ID
ContextOrResultClassId, MIL_INT64 LabelOrIndex,
MIL_INT64 ControlType,
MIL_DOUBLE ControlValue)
Parameters
ContextOrResultClassId See ContextOrResultClassId of the main function for a description. LabelOrIndex See LabelOrIndex of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib; milclass.lib. |
DLL | Requires mil.dll; milclass.dll. |