create_predict_fun {FACT}R Documentation

Create a generic prediction function

Description

Create the algorithms prediction function.

Usage

create_predict_fun(model, task, predict.fun = NULL, type = NULL)

## S3 method for class 'Learner'
create_predict_fun(model, task, predict.fun = NULL, type = NULL)

Arguments

model

any
An arbitrary trained clustering algorithm.

task

character(1)
Should be clustering in this case. To be extended...

predict.fun

function
The function to assign newdata. Only needed if model is not a model from mlr3cluster. The first argument of predict.fun has to be the model, the second the newdata:

function(model, newdata)

To be extended for more methods.

type

character(1)
For soft label predictions, type="prob". For hard label predictions, type="partition". Consult the documentation or definition of the clustering algorithm you use to find which type options you have.

Value

A unified cluster assignment function for either hard or soft labels.

Methods (by class)


[Package FACT version 0.1.1 Index]