Skip to main content
15 votes
Accepted

Can supervised learning be recast as reinforcement learning problem?

Any supervised learning (SL) problem can be cast as an equivalent reinforcement learning (RL) one. Suppose you have the training dataset $\mathcal{D} = \{ (x_i, y_i \}_{i=1}^N$, where $x_i$ is an ...
nbro's user avatar
  • 41.4k
9 votes

How to classify data which is spiral in shape?

Ideally neural networks should be able to find out the function out on it's own without us providing the spherical features. After some experimentation I was able to reach a configuration where we do ...
Dheeraj Pb's user avatar
6 votes

Do I need classification or regression to predict the availability of a user given some features?

Yes. For instance, the popular softmax regression gives you probability distribution for each class. Yes. Softmax is a regression over a set of discrete classes. We can use regression for ...
SmallChess's user avatar
  • 1,421
5 votes

How to classify data which is spiral in shape?

By cheating... theta is $\arctan(y,x)$, $r$ is $\sqrt{(x^2 + y^2)}$. In theory, $x^2$ and $y^2$ should work, but, in practice, they somehow failed, even though, ...
anonisnotanon's user avatar
4 votes

Finding the optimal combination of inputs which return maximal output

If your model is gradient-based, such as a neural network, then may also be able to use gradient methods to drive virtual inputs: Freeze all network weights to the trained version Define a loss ...
Neil Slater's user avatar
  • 33.3k
4 votes
Accepted

How do I interpret this loss function?

This is the sum of squared residuals, and it uses notation from the mathematical subfield of linear algebra (arguably functional analysis). The double vertical bars indicate that we use the ...
Dave's user avatar
  • 733
3 votes
Accepted

Should the prediction of the body temperature given a camera image be modelled as classification or regression?

I think it depends on you application and what data you have available. If the prediction of body temperature itself doesn't have to be accurate and classes like COLD, NORMAL, and HOT will suffice, ...
Jaden Travnik's user avatar
3 votes

How is regression machine learning?

So in a sense you are correct. Using your jargon: linear regression will only "work" if the true function is approximately $y=h(x)=\beta^{T}x+\beta_0$. Advantages to using this is that its light, its ...
mshlis's user avatar
  • 2,387
3 votes
Accepted

How would I go about creating a neural network that outputs a non-binary number?

First of all, sigmoid does not output 0 or 1, it outputs any real number in the range between 0 and 1. Furthermore, neural networks don't usually output binary values, unless the output layer uses the ...
Mr. Eivind's user avatar
3 votes

Have GANs been used to solve regression problems?

In reality GANs are not made for image classification, but for data generation, and they have gained popularity on image generation. They are also used for tabular data generation, see for example ...
hola's user avatar
  • 381
3 votes
Accepted

Is there a possibility that there is no relationship between some inputs and outputs?

Of course, it's possible to define a problem where there is no relationship between input $x$ and output $y$. In general, if the mutual information between $x$ and $y$ is zero (i.e. $x$ and $y$ are ...
Chris Cundy's user avatar
3 votes
Accepted

What is the type of problem requiring to rate images on a scale?

The main distinction between tasks is 'classification' vs 'regression'. In classification you would try to identify the presence of a cloud or not in an image, if you want to predict the level of '...
Edoardo Guerriero's user avatar
3 votes

How to define machine learning to cover clustering, classification, and regression?

I report three definitions of machine learning (ML) and I also explain that ML can be divided into multiple sub-tasks or sub-categories in this answer. However, it may not always be clear why ...
nbro's user avatar
  • 41.4k
3 votes
Accepted

Why is no activation function needed for the output layer of a neural network for regression?

In regression, the goal is to approximate a function $f: \mathcal{I} \rightarrow \mathbb{R}$, so $f(x) \in \mathbb{R}$. In other words, in regression, you want to learn a function whose outputs can be ...
nbro's user avatar
  • 41.4k
3 votes
Accepted

Can predictions of a neural network using ReLU activation be non-linear (i.e. follow the pattern) outside of the scope of trained data?

It isn't too surprising to see behaviour like this, since you're using $\mathrm{ReLU}$ activation. Here is a simple result which explains the phenomenon for a single-layer neural network. I don't have ...
htl's user avatar
  • 1,010
3 votes
Accepted

Entirely linear neural network learning non-linear function

You can even predict a sinusoid with much less than 20 samples: two previous samples suffice. The reason is that sinusoids appear as solutions of second-order linear difference equations. In other ...
Jaume Oliver Lafont's user avatar
3 votes

Why is a simple regression problem so hard for an MLP to learn?

An interesting problem. This network has only 933 trainable parameters, and obtains MeanAbsolutePercentageError of 0.01 - 0.04. It is based on a softmax activation, ...
NikoNyrh's user avatar
  • 842
3 votes
Accepted

Is it possible to use LLMs for regression tasks?

Regression with LLMs is definitely possible. Assuming you use a GPT-like model, you can either train the transformer from scratch on the regression task, or first pre-train the transformer on a ...
Robin van Hoorn's user avatar
3 votes
Accepted

Regression loss conditioned by the ground-truth values

Your suggestion should work to focus the ML more on larger angle examples. You may want to try a slightly simpler approach of weighting the loss (or the resulting gradient) by a factor depending on ...
Neil Slater's user avatar
  • 33.3k
2 votes
Accepted

Which algorithm can I use to minimise the number of wins of 2 weapons that fight each other in a game?

I'm going to start by trying to restate your problem as I understand it. You have a game which contains weapons. Weapons are characterized by 5 different numbers, which can range over different ...
John Doucette's user avatar
2 votes
Accepted

Why is the hyperbolic tangent with MSE better than the sigmoid with cross-entropy?

See the blog post Why You Should Use Cross-Entropy Error Instead Of Classification Error Or Mean Squared Error For Neural Network Classifier Training (2013) by James D. McCaffrey. It should give you ...
user2674414's user avatar
2 votes
Accepted

Which models accept numerical parameters and produce a numerical output?

You're probably looking for regression, either linear or non-linear, which usually refers to a set of methods that can be used to predict a continuous (or numerical) value (the value of the so-called ...
nbro's user avatar
  • 41.4k
2 votes

Decide Number of input Parameters and Output Parameters - ANN

This should be possible given the fact that ANNs have the ability to do the feature engineering and feature selection tasks by themselves. This means that given a lesser number of input parameters, ...
skillsmuggler's user avatar
2 votes

Should the prediction of the body temperature given a camera image be modelled as classification or regression?

Since you're termed the problem you're trying to solve is to "measure the body temperature of a person", the output should be a continuous valued number. If the problem statement had been to rank or ...
Sandeep S. Sandhu's user avatar
2 votes

How to express accuracy of a regression ANN that uses MSE loss function?

You can not use error to reliably measure accuracy. Error is best used as a measure of how fast the model is currently learning. As an example, using different loss functions (cross entorpy vs MSE) ...
Recessive's user avatar
  • 1,406
2 votes
Accepted

How many hidden layers are needed for this training data set

You need to perform Hyperparameter Tuning to identify - Number of hidden layers. Number of neurons in each of the hidden layers. Dropout The activation function you use in each of your hidden layers. ...
Dishant Sheth's user avatar
2 votes

Imposing physical constraints (previous knowledge) in a neural network for regression

Some ideas out the top of my head: In the case of $dy/dx_2>0$ you could compute the gradient using the chain rule and limit the weights so that the constrain holds In the case of $y + x_5 + x_7 &...
Javier-Acuna's user avatar
2 votes

Regression using neural network

The quick answer is that you want to use an activation function on the output layer that does not compress values to $(0,1)$. Depending on your software, this might be called "linear" or "identity". ...
Dave's user avatar
  • 733
2 votes

Regression using neural network

Lets mock some data up. "100 numbers, each one is a parameter, they together define a number X(also given)" ...
alvas's user avatar
  • 136

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