code: def test_score_samples():
      iris = datasets.load_iris()
      x = iris.data
      y = iris.target
  
      supervision_metric = "sparse_categorical_crossentropy"
      ivis_iris = Ivis(
          k=15,
          batch_size=16,
          epochs=2,
          supervision_metric=supervision_metric,
      )
  
      embeddings = ivis_iris.fit_transform(x, y)
      y_pred = ivis_iris.score_samples(x)
  
      # Softmax probabilities add to one, correct shape
      assert np.sum(y_pred, axis=-1) == pytest.approx(1, 0.01)
      assert y_pred.shape[0] == x.shape[0]
      assert y_pred.shape[1] == len(np.unique(y))
  
      # Check that loss function and activation are correct
      loss_name = ivis_iris.model_.loss["supervised"].__name__
      assert (
          losses.get(loss_name).__name__
          == losses.get(supervision_metric).__name__
      )
      assert (
          ivis_iris.model_.layers[-1].activation.__name__ == "softmax"
      )
  
file_path: ivis/tests/integration/test_supervised.py
imports: import pytest
  from tensorflow.keras.datasets import boston_housing
  from tensorflow.keras.utils import to_categorical
  from tensorflow.keras import losses
  from sklearn import datasets
  import numpy
  from ivis import Ivis
label_desc: Use image node_id 3 for calling a global function with example usage: test_score_samples() without return types