code: def to_dense(self):
          
          if hasattr(self._X_train, 'todense'):
              self._X_train = self._X_train.todense()
              self._X_test = self._X_test.todense()
docs: Convert sparse Dataset to dense matrix.