Parameters — miml documentation

Skip to main content
`Ctrl`+`K`

# Parameters

class miml.classifier.miml_classifier.MIMLClassifier

  Bases: `ABC`

  Class to represent a MIMLClassifier

  abstract evaluate(dataset_test: MIMLDataset) → ndarray

    Evaluate the model on a test dataset

    # Parameters

    dataset_testMIMLDataset

      Test dataset to evaluate the model on.

    # Returns

    resultsndarray of shape (n_bags, n_labels)

      Predicted labels of dataset_test

  fit(dataset_train: MIMLDataset) → None

    Training the classifier

    # Parameters

    dataset_trainMIMLDataset

      Dataset to train the classifier

  abstract fit_internal(dataset_train: MIMLDataset) → None

    Internal method to train the classifier

    # Parameters

    dataset_trainMIMLDataset

      Dataset to train the classifier

  abstract predict(x: ndarray) → ndarray

    > Predict labels of given data

    > xndarray of shape (n, n_labels)

    >   Data to predict their labels

    # Returns

    resultsndarray of shape (n_bags, n_labels)

      Predicted labels of data

  abstract predict_bag(bag: Bag) → ndarray

    Predict labels of a given bag

    # Parameters

    bagBag

      Bag to predict their labels

    # Returns

    resultsndarray of shape (n_bags, n_labels)

      Predicted labels of the bag

  abstract predict_proba(dataset_test: MIMLDataset) → ndarray

    Predict probabilities of given dataset of having a positive label

    # Parameters

    dataset_testMIMLDataset

      Dataset to predict probabilities

    # Returns

    results: np.ndarray of shape (n_instances, n_features)

      Predicted probabilities for given dataset