# Feature vector of linear model

I read this paper that applies logistic regression to a dataset generated from a simulation they created. The dataset contains a set of binary vectors (called challenges) that looks like this:

[[1,0,0,1,0,1,1,1],
[0,1,1,1,0,0,0,1],
[0,0,0,1,1,1,1,1],
.
.
.]


Now, before fitting the logistic regression model, they performed a preprocessing step on the dataset following this formula (equation 4):

$$\prod_{i=l}^k (1-2b_i), \quad \text{for } l = 1 ... k$$

where $$b_i$$ is the vector's bit at position $$i$$ (This is clearly just a cumulative product)

As stated in the paper, this type of "transformation" via the cumulative product is what makes the classification task robust. In fact, I don't understand this type of preprocessing, i.e., performing cumulative product on a dataset. I learned other techniques for preprocessing such as feature selections, features extraction, dimensionality reductions, ... etc. Kindly, can someone explain what does this transformation do? Is there a resource to read more about this type of preprocessing?

Thank you.

• If we look carefully, the engineered feature is -1 for odd number of 1s in the bit sequence, and it's +1 for even number of 1s in the sequence. The same correlation exists in the functionality of the XOR-gate (discussed in the context of the paper you referenced in your question), because XOR gives a 1 for odd number of Truths in the input, and 0 for even number of Truths in the input. It's quite possible that this extra feature is somewhat a substitution of the XOR operator on the input itself. – Syed Ali Hamza Jun 17 '19 at 23:28
• @SyedAliHamza Thank you very much – steve Jun 18 '19 at 7:37