# Tag Info

Accepted

### How to classify data which is spiral in shape?

There are many approaches to this kind of problem. The most obvious one is to create new features. The best features I can come up with is to transform the coordinates to spherical coordinates. I ...
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 ...

### 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 ...

### 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 ...

### 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, ...

### 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 ...
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 ...

### 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 ...
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 ...
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, ...

### 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 ...
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 ...
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 '...

### 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 ...
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 ...
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 ...
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 ...

### 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, ...
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 ...
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 ...

### 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 ...
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 ...
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 ...

### 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) ...
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. ...
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 ...

### 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, ...
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 &...