Skip to content

🧪 BaselineClassifier

Baseline Classifier.

Get a baseline by fitting data on multiple different models and comparing the best metrics.

Parameters:

Name Type Description Default
extendedSearch Boolean If set to true, an extended set of models will be used to fit the classifier. This might result in significantly higher runtime. false
Stub code in BaselineClassifier.sdsstub

@Experimental
class BaselineClassifier(
    @PythonName("extended_search") extendedSearch: Boolean = false
) {
    /**
     * Whether the model is fitted.
     */
    @PythonName("is_fitted") attr isFitted: Boolean

    /**
     * Train the Classifier with given training data.
     *
     * The original model is not modified.
     *
     * @param trainData The data the network should be trained on.
     *
     * @result trainedClassifier The trained Classifier
     */
    @Pure
    fun fit(
        @PythonName("train_data") trainData: TabularDataset
    ) -> trainedClassifier: BaselineClassifier

    /**
     * Make a prediction for the given test data and calculate the best metrics.
     *
     * The original Model is not modified.
     *
     * @param testData The data the Classifier should predict.
     *
     * @result bestMetrics A dictionary with the best metrics that were achieved.
     */
    @Pure
    fun predict(
        @PythonName("test_data") testData: TabularDataset
    ) -> bestMetrics: Map<String, Float>
}

isFitted

Whether the model is fitted.

Type: Boolean

fit

Train the Classifier with given training data.

The original model is not modified.

Parameters:

Name Type Description Default
trainData TabularDataset The data the network should be trained on. -

Results:

Name Type Description
trainedClassifier BaselineClassifier The trained Classifier
Stub code in BaselineClassifier.sdsstub

@Pure
fun fit(
    @PythonName("train_data") trainData: TabularDataset
) -> trainedClassifier: BaselineClassifier

predict

Make a prediction for the given test data and calculate the best metrics.

The original Model is not modified.

Parameters:

Name Type Description Default
testData TabularDataset The data the Classifier should predict. -

Results:

Name Type Description
bestMetrics Map<String, Float> A dictionary with the best metrics that were achieved.
Stub code in BaselineClassifier.sdsstub

@Pure
fun predict(
    @PythonName("test_data") testData: TabularDataset
) -> bestMetrics: Map<String, Float>