| Customize Help
| Save Settings

MclassSplitDataset



Function Map
Synopsis
Split the source dataset context into two destination dataset contexts.
Syntax
void MclassSplitDataset(
MIL_ID SplitContextClassId, //in
MIL_ID SrcDatasetContextClassId, //in
MIL_ID DstFirstDatasetContextClassId, //in
MIL_ID DstSecondDatasetContextClassId, //in
MIL_DOUBLE Percentage, //in
MIL_ID SplitResultClassId, //in
MIL_INT64 ControlFlag //in
)
Description

This function splits the source dataset context into the first and second destination dataset contexts, according to a percentage. This is typically done to split all of your data (source dataset context) into the training dataset context (first destination) and the development dataset context (second destination) for MclassTrain(). All datasets (source and destinations) must be for the same type of classifier; that is, you must have allocated all of them with either M_DATASET_IMAGES or M_DATASET_FEATURES.

You can consider the split a type of copy of dataset entries from the source to the first or second destination (all source dataset entries are copied). This function does not alter the source dataset context. Any entries currently in the destination dataset contexts are overwritten. Source entries are only copied to one destination.

MclassSplitDataset() ensures that the proper portion of entries for each class in the source dataset context are in both the first and second destination dataset contexts.

To establish the first and second destination dataset contexts, source entries are randomly selected (split). By default, a different random selection of entries is chosen each time you call this function. To select the same random entries, use M_SPLIT_CONTEXT_FIXED_SEED.

If the source dataset context contains augmented entries, they can end up in both the first and second destination dataset contexts. In this case, you must not use one of these destinations as your development dataset context or testing dataset context, since only the training dataset context can contain augmented entries. To inquire whether the source dataset context has augmented entries, use M_NUMBER_OF_AUGMENTED_ENTRIES.

An augmented entry is never split from the source entry with which it was augmented. This can cause the percentage of entries in the first and second destination dataset contexts to differ from the specified percentage.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SplitContextClassId

Specifies the predefined split classification context. This predefined context establishes whether to use a different random selection of entries to split the source dataset context (default), or to use the random selection of entries associated to a fixed seed.

Set this parameter to one of the following values:

function map For specifying the predefined split classification context
Click to summarizeValue Description
Click to summarize M_SPLIT_CONTEXT_DEFAULT

Specifies to use a different random selection of entries from the source dataset context to establish the first and second destination dataset contexts.

Click to summarize M_SPLIT_CONTEXT_FIXED_SEED

Specifies to use the random selection of entries that is associated to a fixed seed. In this case, the first and second destination dataset contexts are established using the same random selection of entries from the source dataset context. This allows you to repeat the same split operation, provided that you make an identical call to MclassSplitDataset() (that is, you specify the same dataset contexts and split percentage).

(summarize)
SrcDatasetContextClassId

Specifies the identifier of the source dataset context.

DstFirstDatasetContextClassId

Specifies the identifier of the first destination dataset context.

DstSecondDatasetContextClassId

Specifies the identifier of the second destination dataset context.

Percentage

Specifies the percentage of entries in the source dataset context that should be in the first destination dataset context. The remaining entries in the source dataset context will be in the second destination dataset context. The percentage value can range between 0.0 to 100.0, inclusive.

SplitResultClassId

Reserved for future expansion and must be set to M_NULL.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milclass.lib.
DLL Requires mil.dll; milclass.dll.
SPLIT CONTEXT DEFAULT SPLIT CONTEXT FIXED SEED