class_docstr: Test class for preprocessing tests.
code: def check_scaling_features(
      self, use_feature_hashing=False, use_scaling=False
  ):
      train_fs, test_fs = self.make_scaling_data(
          use_feature_hashing=use_feature_hashing
      )
  
      # create a Linear SVM with the value of scaling as specified
      feature_scaling = "both" if use_scaling else "none"
      learner = Learner(
          "SGDClassifier",
          feature_scaling=feature_scaling,
          pos_label="1",
      )
  
      # train the learner on the training set and test on the testing set
      learner.train(
          train_fs,
          grid_search=True,
          grid_objective="f1_score_micro",
          grid_search_folds=3,
      )
      test_output = learner.evaluate(test_fs)
      fmeasures = [
          test_output[2][0]["F-measure"],
          test_output[2][1]["F-measure"],
      ]
  
      # these are the expected values of the f-measures, sorted
      if not use_feature_hashing:
          expected_fmeasures = (
              [0.5333333333333333, 0.4842105263157895]
              if not use_scaling
              else [0.7219512195121951, 0.7076923076923077]
          )
      else:
          expected_fmeasures = (
              [0.5288461538461539, 0.4895833333333333]
              if not use_scaling
              else [0.663157894736842, 0.6952380952380952]
          )
  
      assert_almost_equal(expected_fmeasures, fmeasures)
  
imports: import json
  import os
  import re
  import unittest
  import numpy
  import scipy.sparse
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sklearn.datasets import make_classification
  from sklearn.feature_extraction import FeatureHasher
  from skll.data import FeatureSet, NDJWriter
  from skll.experiments import run_configuration
  from skll.learner import Learner
  from skll.learner.utils import SelectByMinCount
  from skll.utils.testing import config_dir, fill_in_config_paths, output_dir, test_dir, train_dir, unlink
label_desc: Use image node_id 8 for calling the TestPreprocessing obj's underlying member method code with example usage: obj.check_scaling_features(use_feature_hashing, use_scaling) without return types