Class FeatureTransformPLDyadRanker
- java.lang.Object
-
- ai.libs.jaicore.ml.dyadranking.algorithm.featuretransform.FeatureTransformPLDyadRanker
-
- All Implemented Interfaces:
IBatchLearner<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>,IPredictiveModel<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>,IDyadRanker,IPLDyadRanker
public class FeatureTransformPLDyadRanker extends java.lang.Object implements IPLDyadRanker
A feature transformation Placket-Luce dyad ranker. By default uses bilinear feature transformation. All the provided algorithms are implementations of the PLModel introduced in [1]. [1] Schäfer, D. & Hüllermeier, Dyad ranking using Plackett-Luce models based on joint feature representations, https://link.springer.com/article/10.1007%2Fs10994-017-5694-9
-
-
Constructor Summary
Constructors Constructor Description FeatureTransformPLDyadRanker()Constructs a new feature transform Placket-Luce dyad ranker with bilinear feature transformation.FeatureTransformPLDyadRanker(IDyadFeatureTransform featureTransform)Constructs a new feature transform Placket-Luce dyad ranker with the given feature transformation method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPredictiveModelConfigurationgetConfiguration()Returns theIPredictiveModelConfigurationof this model.java.util.List<IDyadRankingInstance>predict(DyadRankingDataset dataset)Performs multiple predictions based on theIInstances contained in the givenAILabeledAttributeArrayDatasets and returns the result.IDyadRankingInstancepredict(IDyadRankingInstance instance)Performs a prediction based on the givenIInstanceand returns the result.voidsetConfiguration(IPredictiveModelConfiguration configuration)Sets theIPredictiveModelConfigurationof this model to the given one.voidtrain(DyadRankingDataset dataset)Trains thisIBatchLearnerusing the givenAILabeledAttributeArrayDataset.
-
-
-
Constructor Detail
-
FeatureTransformPLDyadRanker
public FeatureTransformPLDyadRanker()
Constructs a new feature transform Placket-Luce dyad ranker with bilinear feature transformation.
-
FeatureTransformPLDyadRanker
public FeatureTransformPLDyadRanker(IDyadFeatureTransform featureTransform)
Constructs a new feature transform Placket-Luce dyad ranker with the given feature transformation method.- Parameters:
featureTransform- the feature transformation method to use
-
-
Method Detail
-
predict
public IDyadRankingInstance predict(IDyadRankingInstance instance) throws PredictionException
Description copied from interface:IPredictiveModelPerforms a prediction based on the givenIInstanceand returns the result.- Specified by:
predictin interfaceIPredictiveModel<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>- Parameters:
instance- TheIInstancefor which a prediction should be made.- Returns:
- The result of the prediction.
- Throws:
PredictionException- If something fails during the prediction process.
-
predict
public java.util.List<IDyadRankingInstance> predict(DyadRankingDataset dataset) throws PredictionException
Description copied from interface:IPredictiveModelPerforms multiple predictions based on theIInstances contained in the givenAILabeledAttributeArrayDatasets and returns the result.- Specified by:
predictin interfaceIPredictiveModel<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>- Parameters:
dataset- TheAILabeledAttributeArrayDatasetfor which predictions should be made.- Returns:
- The result of the predictions.
- Throws:
PredictionException- If something fails during the prediction process.
-
train
public void train(DyadRankingDataset dataset) throws TrainingException
Description copied from interface:IBatchLearnerTrains thisIBatchLearnerusing the givenAILabeledAttributeArrayDataset.- Specified by:
trainin interfaceIBatchLearner<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>- Parameters:
dataset- TheAILabeledAttributeArrayDatasetwhich should be used for the training.- Throws:
TrainingException- If something fails during the training process.
-
getConfiguration
public IPredictiveModelConfiguration getConfiguration()
Description copied from interface:IPredictiveModelReturns theIPredictiveModelConfigurationof this model.- Specified by:
getConfigurationin interfaceIPredictiveModel<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>- Returns:
- The
IPredictiveModelConfigurationof this model.
-
setConfiguration
public void setConfiguration(IPredictiveModelConfiguration configuration) throws ConfigurationException
Description copied from interface:IPredictiveModelSets theIPredictiveModelConfigurationof this model to the given one.- Specified by:
setConfigurationin interfaceIPredictiveModel<IDyadRankingInstance,IDyadRankingInstance,DyadRankingDataset>- Throws:
ConfigurationException- If something fails during the configuration process.
-
-