Usage of polynomial evaluation with different degrees #535
-
Hello, I'm currently working on logistic regression for my thesis.
I'm having trouble adjusting the parameter Nodes. While the code does execute with the parameter 63, I'm running out of levels during the process. From my understanding, 63 Nodes correspond to a polynomial degree of 6 ((2^6)-1 = 63). I only need a polynomial degree of 2 and 3, which are sufficient for my algorithm and save levels. I've tried setting the parameter to 3 ((2^2)-1) and 7 ((2^3)-1) but I'm getting the runtime error "1 levels < 2 log(d) -> cannot evaluate poly". I would be glad about help on how to properly use this function. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! Thanks for the question. Could you please provide a full self-contained code snippet that don't behave as you expect? |
Beta Was this translation helpful? Give feedback.
The input values should be between
[-K, K]
. Here your values innumbers
are too large. I guess you clamp the values insigmoidTest
but not insigmoid
.Also, the approximation polynomial is given in the Chebyshev basis, thus you need to perform some kind of rescaling (or change of basis) on your input before evaluating the polynomial.
To do it in an encrypted form you can do:
before the polynomial evaluation. This seems to give corr…