Class HintAddUntrainedInTable
- java.lang.Object
-
- com.tibco.patterns.learn.api.hint.HintAddPairs
-
- com.tibco.patterns.learn.api.hint.HintAddUntrainedInTable
-
- All Implemented Interfaces:
Hint
public final class HintAddUntrainedInTable extends HintAddPairs
Hint to add pairs to subsets that are not found in either training or validation datasets, but are found in the data table. The model was never trained with any actual training examples that belong to this subset. (It may have been trained with generated examples from that subset). However, records from these subsets were found in the data table, which may mean that the model ought to be trained with examples from these subsets. Note that if there are very few records in the data table that belong to one of these subsets, it may be very difficult of impossible to select enough pairs from the filtered list of records in order to reliably train the model with this subset.
-
-
Field Summary
-
Fields inherited from class com.tibco.patterns.learn.api.hint.HintAddPairs
subsets
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SubsetFamilycalcTableSubsets(FeatureQuery fq, ModelTrainer mTrainer)Determines the Rlink subset of each table record (for the given feature query) and adds subset to family.static HintAddUntrainedInTablecreate(java.util.Map<DataPartition,SubsetFamily> datasetSubsets, SubsetFamily tableSubsets)Creates a hint object with all subsets that are not in any dataset, but are found in the data table.-
Methods inherited from class com.tibco.patterns.learn.api.hint.HintAddPairs
getCount, getSubsets, size, suitableRecord, toString
-
-
-
-
Method Detail
-
calcTableSubsets
public static SubsetFamily calcTableSubsets(FeatureQuery fq, ModelTrainer mTrainer) throws java.io.IOException, com.netrics.likeit.NetricsException
Determines the Rlink subset of each table record (for the given feature query) and adds subset to family. Empty subset is not added.- Returns:
- the family of all subsets in data table. May contain 0 subsets if all table records belong to an empty subset.
- Throws:
java.io.IOExceptioncom.netrics.likeit.NetricsException
-
create
public static HintAddUntrainedInTable create(java.util.Map<DataPartition,SubsetFamily> datasetSubsets, SubsetFamily tableSubsets)
Creates a hint object with all subsets that are not in any dataset, but are found in the data table.- Parameters:
datasetSubsets- - all non-empty subsets in training and validation datasets.tableSubsets- - all non-empty data table subsets (use calcTableSubsets())- Returns:
- the new hint object. Returns null if no such subsets can be found: all subsets in the table were trained with actual examples, or model was never trained, or no non-empty table subsets are provided.
- Throws:
java.lang.IllegalStateException- if no data table is assigned to mTrainer.
-
-