Hot answers tagged

2

This is more of a programming question than a data science question and would therefore be better suited to the stackoverflow stackexchange. To change the y-axis from a linear scale to a logarithmic scale you can use matplotlib.pyplot.yscale function using "log" as the argument: import matplotlib.pyplot as plt plt.yscale("log")


1

You might want to have a look at several ways of scheduling your learning rate decay, instead of manually trying to optimize it. Check this source from Tensorflow documentation. If you for instance use an exponential learning rate decay schedule, the definition for the learning rate decay would be: $$learning rate_0 * (decay rate)^\frac{step}{decay steps}$$ ...


1

To answer your last question - think of the model as your brain trying to give a maths test. Training data is what you encountered during homework/exercise and validating/testing data is what you encounter in the final examinations(most likely unseen data). To think of yourself as proficient in mathematics, you'd want your brain to be able to perform best on ...


1

First, the term "loss" does not define a specific computation, but just the measure you are trying to optimize. Depending on the loss you choose, it may or may not be appropriate for the problem you are addressing. About accuracy, you do not need a scientific work to understand why it may not be appropriate: imagine a binary classification problem ...


1

Discriminator consist of two loss parts (1st: detect real image as real; 2nd detect fake image as fake). 'Full discriminator loss' is sum of these two parts. The loss should be as small as possible for both the generator and the discriminator. But there is a catch: the smaller the discriminator loss becomes, the more the generator loss increases and vice ...


1

Apart from the correct answers which you find in the comment section, you mention "the square [..] prevent any negative loss". In principle you can also have a negative loss. The point is without the square, you have $(x-y) \neq (y-x)$ for $x \neq y$. In particular, the loss would not be symmetric and for $x = 0$, you have $(x-y) = -y$. So by ...


1

The ability of the model to predict negative value for the housing price depends on the data. On the large amount of data, where there are no negative pricing, the model does not predict a negative number. However, in rare case, where the model is not trained well or has not seen such samples, then it is still possible. The models prediction on the positive ...


1

Calculation of loss and the calculation of metrics on the test set are two different entities. Usually, the weighted loss function is used to weight one of the class (you can use higher weights to the important class in balance or unbalanced class distribution). For metrics like F1, its always safer to use multiple measures in unbalance class distribution. ...


Only top voted, non community-wiki answers of a minimum length are eligible