text: import math
  from typing import Tuple
  import numpy as np
  import pandas
  import pandas as pd
  
  
  def split_train_test(X: pd.DataFrame, y: pd.Series, train_proportion: float = .75) \
          -> Tuple[pd.DataFrame, pd.Series, pd.DataFrame, pd.Series]:
      """
      Randomly split given sample to a training- and testing sample
  
      Parameters
      ----------
      X : DataFrame of shape (n_samples, n_features)
          Data frame of samples and feature values.
  
      y : Series of shape (n_samples, )
          Responses corresponding samples in data frame.
  
      train_proportion: Fraction of samples to be split as training set
  
      Returns
      -------
      train_X : DataFrame of shape (ceil(train_proportion * n_samples), n_features)
          Design matrix of train set
  
      train_y : Series of shape (ceil(train_proportion * n_samples), )
          Responses of training samples
  
      test_X : DataFrame of shape (floor((1-train_proportion) * n_samples), n_features)
          Design matrix of test set
  
      test_y : Series of shape (floor((1-train_proportion) * n_samples), )
          Responses of test samples
  
      """
      no_of_train_rows = math.ceil(train_proportion * X.shape[0])
      X : pd.DataFrame = pd.DataFrame.join(X,y)
      train_data = X.sample(n=no_of_train_rows, axis=0)
      test_data = X.loc[X.index.difference(train_data.index), ]
      train_y = train_data[y.name]
      test_y = test_data[y.name]
      train_data.drop(columns=y.name,inplace=True)
      test_data.drop(columns=y.name,inplace=True)
      # print(train_data.shape)
      # print(test_data.shape)
      # print(train_y.shape)
      # print(test_y.shape)
      return train_data, train_y, test_data, test_y
  
  
  def confusion_matrix(a: np.ndarray, b: np.ndarray) -> np.ndarray:
      """
      Compute a confusion matrix between two sets of integer vectors
  
      Parameters
      ----------
      a: ndarray of shape (n_samples,)
          First vector of integers
  
      b: ndarray of shape (n_samples,)
          Second vector of integers
  
      Returns
      -------
      confusion_matrix: ndarray of shape (a_unique_values, b_unique_values)
          A confusion matrix where the value of the i,j index shows the number of times value `i` was found in vector `a`
          while value `j` vas found in vector `b`
      """
      raise NotImplementedError()
  