Skip to content

Tag: python

keras apply threshold for loss function

I am developing a Keras model. My dataset is badly unbalanced, so I want to set a threshold for training and testing. If I’m not mistaken, when doing a backward propagation, neural network checks the predicted values with the original ones and calculate the error and based on the error, set new weights …

Compiling and executing simple user defined code in Python

I want to allow my users a way to run very simple Python functions for a project. Of course, eval() comes to mind, but it is a huge risk. After thinking about it for a time, I realized that most of the functions that a user might need are very rudimentary, similar to the most common excel functions. So I