Questions tagged [objective-functions]

For questions related to the concept of loss (or cost) function in the context of machine learning.

Filter by
Sorted by
Tagged with
3
votes
1answer
38 views

What are the necessary mathematical properties to be a loss function in gradient based optimizations?

Loss functions are used in training neural networks. I am interested in knowing the mathematical properties that are necessary for a loss function to participate in gradient descent optimization. I ...
0
votes
1answer
27 views

Why is the exponential loss used in this case?

I am reading a paper "Tracking-by-Segmentation With Online Gradient Boosting Decision Tree". In Section 2.1, the paper says I cannot understand the exponential loss function. In my opinion, ...
2
votes
0answers
24 views

Is optimizing weighted sum multi objective tasks considered a multi-task learning?

I have two sequence prediction tasks, finding $\vec{\pi} \in \Pi$ and $\vec{\psi} \in \Psi$. Each sequence has its own objective function, i.e. $f_1(\vec{\pi})$ and $f_2(\vec{\psi})$. The input for ...
0
votes
0answers
22 views

Can people set loss function of neural network by themselves instead of choosing cross entropy or mean square error?

I found people used deep neural network to get optimal policy by solving a nonconvex optimization problem. Moreover, they didn't use any set of training data and claimed that it's the difference ...
0
votes
0answers
35 views

An explanation involving the sign activation, its affect on the loss function, and the perceptron and perceptron criterion: what is this saying? (#2)

I recently asked a very similar question here, but the answer only seems to address the first part of the quote, rather than the second part that contains the perceptron criterion example. Therefore, ...
1
vote
0answers
28 views

Is the formula $\frac {1}{s}\sum _{j=1}^{s}|d_{j}-y_{j}(t)|$ the correct form of 0-1 loss function, in the context of Perceptron?

Per page 7 of this MIT lecture notes, the original single-layer Perceptron uses 0-1 loss function. Wikipedia uses $${\displaystyle {\frac {1}{s}}\sum _{j=1}^{s}|d_{j}-y_{j}(t)|} \tag{1}$$ to denote ...
0
votes
0answers
9 views

Loss function to Push response value towards extremes

I have a feature map whose values are in the range of [0,1]. I want to push these values either towards extreme 0 or 1 using some loss function. Since I don't have any target value so it had to be in ...
0
votes
1answer
51 views

An explanation involving the sign activation, its affect on the loss function, and the perceptron and perceptron criterion: what is this saying?

I am currently studying the textbook Neural Networks and Deep Learning by Charu C. Aggarwal. Chapter 1.2.1.3 Choice of Activation and Loss Functions says the following: The classical activation ...
1
vote
1answer
64 views

In logistic regression, why is the binary cross-entropy loss function convex?

I am studying logistic regression for binary classification. The loss function used is cross-entropy. For a given input $x$, if our model outputs $\hat{y}$ instead of $y$, the loss is given by $$\text{...
2
votes
3answers
234 views

Where does the so-called 'loss' / 'loss function' fit into the idea of a perceptron / artificial neuron (as presented in the figure)?

I am currently studying the textbook Neural Networks and Deep Learning by Charu C. Aggarwal. Chapter 1.2.1.3 Choice of Activation and Loss Functions presents the following figure: $\overline{X}$ is ...
0
votes
0answers
17 views

Good metrics and losses to use for Sequence-to-Sequence model for time-series prediction/forecasting

I am developing a sequence-to-sequence LSTM model for multi-step time series forecasting. I have the basic model working, so now I need to drill down on which loss function and evaluation metrics to ...
0
votes
0answers
19 views

Maximize delayed rewards

Given a Neural Network with a Dense(3) output and three actions: 'B' is [0, 0, 1] (= 1, for the sake of our example) 'N' is ...
1
vote
0answers
27 views

Loss function to minimize the distance between sets

Are there references or links to examples about loss functions "Distance Metrics" which could be used to minimize the distance between two sets for a neural network. More precisely, this ...
0
votes
0answers
20 views

Problems while transforming a 2D Variational Autoencoder into a 1D Version

I am trying to addapt the Keras variational autoencoder (VAE) here from a 2-D input/output (matrix of a picture) to a 1-D input/output (just a vector). I thought this would be a fearly easy task, but ...
0
votes
1answer
37 views

Which loss function could I use to solve a regression problem as a classification problem (where we discretize the labels into buckets)?

I am considering a rather typical regression problem, but, for practice, I am trying to implement this as a classification problem. The setup is as follows. I have $\mathbb{R}$-valued labels $y_i \in [...
0
votes
0answers
25 views

How to improve the Loss and Learning curves and smoothen them

I am fairly new to deep learning and I have been testing out several architectures for the segmentation task of clouds in satellite imagery. I am using a simple Unet as my benchmark, Unet++, Efficient ...
0
votes
0answers
19 views

Defining optimal false-positives and false-negatives balance with a cost function

My attempt to solve the problem below: $$\text{cost function} = C = (TP \cdot CTP) + (FN \cdot CFN) + (FP \cdot CFP) + (TN \cdot CTN) = ((1 - (1 - FP)^2) \cdot 1000) + (FN \cdot CFN) + (FP \cdot ...
0
votes
0answers
38 views

How is it possible that the softmax combined with the MSE in a molecule classification task performs than than the cross-entropy?

I'm working on a GNN project associated with molecule classification. The project is to classify if the atom in the molecule will initiate a certain reaction. For example, a molecule can be ...
0
votes
0answers
18 views

Training labels: integers or vectors?

I'm trying to implement Deep Q Learning using Tensorflow. The input is a vectorized representation of the state, and the output is a vector whose length is the number of possible actions. I've already ...
0
votes
1answer
73 views

Why is loss displayed as a parabola in mean squared error with gradient descent?

I'm looking at the loss function: mean squared error with gradient descent in machine learning. I'm building a single-neuron network (perceptron) that outputs a linear number. For example: Input * ...
1
vote
0answers
33 views

Could the inputs of the mean squared-error loss function be transformed to allow larger learning rates?

In the context of a neural network $\hat{y} = f_\theta(\mathbf{x})$ with parameters $\theta$ that is trained to perform regression such that the prediction $\hat{\mathbf{y}} = [\hat{y}_1,\hat{y}_2,...,...
0
votes
2answers
77 views

In variational autoencoders, why do people use MSE for the loss?

In VAEs, we try to maximize the ELBO $\mathbb(E_q log\ p(x|z) + D_{KL}(q(z|x), p(z))$), but I see that many implement the first term as MSE of the image and it's reconstruction. Is this mathematically ...
2
votes
1answer
54 views

Is it possible to use an internal layer's outputs in a loss function?

For a network of the form: Input(10) Dense(200) Dense(100+10) Dense(20) Output() Those +10 outputs are what I want to add to ...
1
vote
1answer
48 views

Is the policy gradient expression in Fundamentals of Deep Learning wrong?

I don't understand the policy gradient as explained in Chapter-9 (Deep Reinforcement Learning) of the book Fundamentals of deep learning. Here is the whole paragraph: Policy Learning via Policy ...
1
vote
1answer
90 views

Why does the implementation of REINFORCE algorithm minimize the gradient term but not the loss?

I read the book "Foundation of Deep Reinforcement Learning, Laura Graesser and Wah Loon Keng", and when I go through the REINFORCE algorithm, they show the objective function: $$ J\left(\...
1
vote
0answers
16 views

Is it normal getting noise values in the error history along training iteration?

I'm giving my first steps in really learning machine learning. As an exercise in my online course, it was asked for me to code the Cost function of some neural network that should resolve the ...
0
votes
0answers
14 views

Do dataset sizes matter in a Style GAN?

When working with classifiers, a class imbalance is a huge issue for our models. If we have too many images of class 1 and too few images from ...
2
votes
0answers
37 views

How to deal with losses on different scales in multi-task learning?

Say I'm training a model for multiple tasks by trying to minimize sum of losses $L_1 + L_2$ via gradient descent. If these losses are on a different scale, the one whose range is greater will dominate ...
0
votes
0answers
11 views

How to update all the weights in case only one data out of n signals is observable

If we have cost function as $$E_i = (D_i -Y_i)^T Q (D_i -Y_i)$$, where $$Q=\begin{bmatrix} 1 & 0 & 0\\ 0 & 0 & 0\\ 0 & 0 & 0 \end{bmatrix}$$( in case only one data signal can ...
0
votes
0answers
19 views

Gradient of CTC Loss?

I am having a hard time figuring out how the gradient of the CTC loss function looks like. Could anyone explain that to me?
0
votes
1answer
25 views

setting up last layer in tensoflow for class type of label [closed]

I am creating a NN in tensorflow keras. the inputs are all float and the output is a class. The output currently encoded as a float, but only has 4 values (0,1,2,3). My model is similar to this: ...
1
vote
0answers
52 views

BlackOut - ICLR 2016: need help understanding the cost function derivative

In the ICLR 2016 paper BlackOut: Speeding up Recurrent Neural Network Language Models with very Large Vocabularies, on page 3, for eq. 4: $$ J_{ml}^s(\theta) = log \ p_{\theta}(w_i | s) $$ They have ...
0
votes
1answer
51 views

What error should I use for RNN?

I'm relatively new to machine learning, and I don't know what error I should use for an RNN. I want to use a simple Elman RNN to predict the cases of Covid-19 there will be in a hospital for the next ...
2
votes
0answers
32 views

Single-value loss/training in a CNN with a tensor output

I am playing around with an idea of using using Q-learning with a DQN (Deep Q-Network), to determine the optimal position of a number of 'units' on a grid of allowed locations, according to some ...
3
votes
1answer
74 views

How to incorporate a symmetry constraint in the loss function to train a CNN?

I have a task of extremely sparse binary segmentation, i.e. the segmentation mask contains either 0 or 1, and there are ~95% zeros and only ~5% ones. I use the focal loss to address the sparseness (...
1
vote
0answers
20 views
1
vote
0answers
41 views

How to make SAC (Soft-Actor-Critic) learn a policy?

I cannot make SAC learn a task in a certain environment. The point is that it actually sometimes finds a very good policy, but it never learns the policy in the end. I am using the SAC implementation ...
2
votes
1answer
188 views

What is the difference between a fitness function and a reward function?

In reinforcement learning (RL), the reward function (RF), which can be denoted as $r(s)$, $r(s, a)$, $r(s, a, s')$, $r(s, s')$ depending on its specific definition, provides the learning signal, which ...
1
vote
1answer
83 views

In this implementation of pix2pix, why are the weights for the discriminator and generator losses set to 1 and 100 respectively?

I am working on a pix2pix GAN model that was inspired by the code in this Github repository. The original code is working and I have already customized most of the code for my needs. However, there is ...
0
votes
1answer
96 views

When calculating the cost in deep Q-learning, do we use both the input and target states?

I just finished Andrew Ngs's deep learning specialization, but RL was not covered, so I don't know the basics of RL. So, I have been having trouble understanding the cost function in deep Q-learning. ...
0
votes
0answers
18 views

Which loss function should I use to train DDGP with multiple q values, one for each of the output dimensions?

I'm trying to come up with a loss function for the case, in DDPG, where we have as many outputs from the critic as there are from the actor. So, there will be one Q value for each dimension in the ...
1
vote
2answers
126 views

If the training data are linearly separable, which of the following $L(w)$ has less optimum answer for $w$, when $y = w^Tx$?

I'm studying machine learning and I came into a challenging question. The answer is 2. But based on my ML notes, all of them are true. Where are the wrong points?
1
vote
1answer
899 views

How to understand 'losses' in Spacy's custom NER training engine?

From the tid-bits, I understand of neural networks (NN), the Loss function is the difference between predicted output and expected output of the NN. I am following this tutorial, the losses are ...
1
vote
1answer
56 views

Have I understood the loss function from the original U-Net paper correctly?

In the original U-Net paper, it is written The energy function is computed by a pixel-wise soft-max over the final feature map combined with the cross entropy loss function. ... $$ E=\sum_{\mathbf{x} ...
0
votes
0answers
25 views

Correct way to work with both categorical and continuous features together

I have a time series with both continuous and categorical features, and I want to do a prediction task. I will elaborate: The data is composed of 100Hz sampling of some voltages, kind of like an ecg ...
0
votes
1answer
75 views

Why is the derivative of the softmax layer shaped differently than the derivative of other neurons?

If the derivative is supposed to give the rate of change of a function at that point, then why is the derivative of the softmax layer (a vector) the Jacobian matrix, which has a different shape than ...
0
votes
1answer
40 views

Loss randomly changing, incorrect output (even for low loss) when trying to overfit on a single set of input and output

I am trying to make a neural network framework from scratch in C++ just for fun, and to test my backpropagation, I thought it would be an easy way to test the functionality if I give it one input - a ...
0
votes
0answers
30 views

What is the effect of too harsh regularization?

While training a CNN model, I used an l1_l2 regularization (i.e. I applied both $L_1$ and $L_2$ regularization) on the final layers. While training, I saw the ...
2
votes
1answer
44 views

Which NN would you choose to estimate a continuous function $f:\mathbb R^2 \rightarrow \mathbb R$?

Suppose we want to estimate a continuous function $f:\mathbb R^2 \rightarrow \mathbb R$ based on a sample using a NN (around 1000 examples). This function is not bounded. Which architecture would you ...
6
votes
1answer
164 views

How is the DQN loss derived from (or theoretically motivated by) the Bellman equation, and how is it related to the Q-learning update?

I'm doing a project on Reinforcement Learning. I programmed an agent that uses DDQN. There are a lot of tutorials on that, so the code implementation was not that hard. However, I have problems ...

1
2 3 4 5