How to prevent negative values using logarithmic function

23 Views Asked by At

I have a question on one optimal problem with objective of non-negative constraints.

The results for this problem contains two solution sets: G and F. While these two solutions should not be negative.

Therefore, the statistical model PMF (Positive Matrix Factorization) add two penalty functions to the original optimal function, which can be denoted as:

-$\alpha \sum log(g)$, -$\beta \sum log(f)$.

Then, the problem was solved to minimizing the enhanced optimal objective.

In its offical guideline, it says that

In practice, the log functions are approximated by a Taylor series expansion up to quadratic terms. The algorithm can obtain transient negative values, but it immediately adjusts the Taylor expansion so that the user never sees the negative values. Only nonnegative values are stored in factor matrices.

I have little understanding on the process of calculating logarithmic function with Taylor series, and how the algorithm remove the negative solutions. In my opinion, positive g or f close to 0 may lead to very large -$\alpha \sum log(g)$ or -$\beta \sum log(f)$ (then to be removed), while negative g or f could lead to NaN values.

link-Page 6