Skip to content

09. Feature Crosses

Antonio Erdeljac edited this page Feb 26, 2019 · 1 revision

Feature Crosses


Topic: Feature Crosses

Course: GMLC

Date: 20 February 2019 

Professor: Not specified


Resources


Key Points


  • Feature cross

    • Synthetic feature (Feature that is created by combining 2 features) that multiplies two or more input features thus encoding nonlinearity in feature space

    • X3 = x1 * x2

    • Y = w1x1 + w2x2 + w3x3

    • Linear algorithm learns weight for w3 normally as for others

  • Types of feature crosses

    • Two features [A x B]

    • Multiple features [A x B x C x D x E]

    • Squaring a single feature [A x A]

  • Crossing one-hot vectors

    • One hot vector - Feature vector created using a single categorical feature [1,0,0,0…]

    • Example using binned longitudes & latitudes

      • Binned_longitude = [0, 0, 0, 1]

      • Binned_latitude = [0, 1, 0, 0]

      • binned_longitude x binned_longitude - crossed one hot vector

      • Creating a crossed one hot vector we can vastly improve predicting ability of a model

    • Example using dog owner satisfaction:

      • [behaviour_type x time_of_day]

Check your understanding


  • Explain feature crossing & its purpose

Summary of Notes


  • Feature cross Is a synthetic feature used to improve model’s learning by combining 2 or more features and solve non-linear problems by encoding (binning) them