class_docstr: Base class for testing frequent pattern mining on a small example.
class_docstr_tok: ["Base","class","for","testing","frequent","pattern","mining","on","a","small","example","."]
code: def test_frozenset_selection(self):
      res_df = self.fpalgo(self.df, use_colnames=True)
      assert res_df.values.shape == self.fpalgo(self.df).values.shape
      assert res_df[res_df["itemsets"] == "nothing"].values.shape == (
          0,
          2,
      )
      assert res_df[
          res_df["itemsets"] == {"Milk", "Kidney Beans"}
      ].values.shape == (
          1,
          2,
      )
      assert res_df[
          res_df["itemsets"] == frozenset(("Milk", "Kidney Beans"))
      ].values.shape == (1, 2)
      assert res_df[
          res_df["itemsets"] == frozenset(("Kidney Beans", "Milk"))
      ].values.shape == (1, 2)
  
imports: import sys
  from contextlib import contextmanager
  from io import StringIO
  import numpy
  import pandas
  from numpy.testing import assert_array_equal
  from packaging.version import Version
  from pandas import __version__
  from scipy.sparse import csr_matrix
  from mlxtend.preprocessing import TransactionEncoder
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 2 for calling the FPTestEx1 obj's underlying member method code with example usage: obj.test_frozenset_selection() without return types