Hello everyone

I have a regression problem. The sigmoid of weighted sum of input features generates the output.

Since I could not apply EP with sigmoid, I tried to simulated it with a linear approximation (if weighted sum is in range [0,1] then the output is equal to weighted sum. If weightedSum > 1, then the output is 1 and if <0 the output is 0).

That is because my output feature values is between 0 and 1.

This is a feature selection problem in which I like to learn the weight vector for my input vector. The value of each input feature and output is observed.

Does it make sense to write it like this?

Variable<double> linearEffect =
Variable.Sum(weightSumArray).Named("sum_weightSumArray");
Variable<double> sigmoidEffect = Variable.New<double>();
Variable<bool> sigmoidCondition = (Variable.IsBetween(linearEffect,0,1)).Named("isNodePerturbed?");
using (Variable.If(sigmoidCondition))
{
outputData[experimentRange].SetTo(Variable<double>.GaussianFromMeanAndPrecision(linearEffect, timeDependentNoise).Named("timeSeries_noPert"));
}
using (Variable.IfNot(sigmoidCondition))
{
Variable<bool> isGreaterThanOne = (linearEffect > 1).Named("isGreaterThanOne");
using (Variable.If(isGreaterThanOne)) {
outputData[experimentRange].SetTo(Variable<double>.GaussianFromMeanAndPrecision(1, timeDependentNoise));
}
using (Variable.IfNot(isGreaterThanOne)) {
outputData[experimentRange].SetTo(Variable<double>.GaussianFromMeanAndPrecision(0, timeDependentNoise));
}
}