Whenever I train a FeedForward neural network on a binary classification problem, the net returns float values. What's the theory behind this? Can this be interpreted as a probability? For instance, if the net returns 0.7 is that equivalent of saying that there's a 70% probability that the value is 1 and not 0? So should I just scale the float values and define a threshold to be either 0 or 1?
FF Neural network and binary classification
1k Views Asked by Luis Cruz At
2
There are 2 best solutions below
1
FiReTiTi
On
When you train a NN on a binary problem, if you don't use a binary activation function, the answer is going to be a probability (if you use a sigmoid): the instance probability to belong to a class.
I never use a threshold or binary activation function, because it is always interesting to study the probabilities. For example, you can have a misclassified instance, but you observe that its probability is around 0.5. Therefore the NN is not sure about the class to pin on the instance. At the opposite, if an instance is misclassified and has a strong probability (close to 0 or 1), then it is a strong error and you should seriously understand why it is misclassified.
Related Questions in NEURAL-NETWORK
- Influence of Unused FFN on Model Accuracy in PyTorch
- How to train a model with CSV files of multiple patients?
- Does tensorflow have a way of calculating input importance for simple neural networks
- My ICNN doesn't seem to work for any n_hidden
- a problem for save and load a pytorch model
- config QConfig in pytorch QAT
- How can I convert a flax.linen.Module to a torch.nn.Module?
- Spiking neural network on FPGA
- Error while loading .keras model: Layer node index out of bounds
- Matrix multiplication issue in a Bidirectional LSTM Model
- Recommended way to use Gymnasium with neural networks to avoid overheads in model.fit and model.predict
- Loss is not changing. Its remaining constant
- Relationship Between Neural Network Distances and Performance
- Mapping a higher dimension tensor into a lower one: (B, F, D) -> (B, F-n, D) in PyTorch
- jax: How do we solve the error: pmap was requested to map its argument along axis 0, which implies that its rank should be at least 1, but is only 0?
Related Questions in CLASSIFICATION
- While working on binary image classification, the class mode set to binary incorrectly labels the images, but does it correct on categorical
- Decision tree using rpart for factor returns only the first node
- Can someone interpret my Binary Cross Entropy Loss Curve?
- The KNN model I am using is always coming back at 100% accuracy but it shouldn't be
- Normal Bayes Classification
- Outlier removing based on spectral signal in Google Earth Engine (GEE)
- Questions of handling imbalance dataset classification
- How to quantify the consistency of a sequence of predictions, incl. prediction confidence, using standard function from sklearn or a similar library
- Audio data preprocessing in Machine Learning
- Why is my validation accuracy not as smooth as my validation loss?
- sklearn ComplementNB: only class 0 predictions for perfectly seperable data
- Stacking Ensamble Learning for MultilabelClassification
- How to convert frame features and frame mask as a single variable data?
- Input size and sequence length of lstm pytorch
- Classification techniques for continuous arrays as inputs and scalar categorical variable as output
Related Questions in REGRESSION
- My MSE and MAE are low, but my R2 is not good, how to improve it?
- The regression problem of predicting multiple outputs from two-dimensional inputs
- "wrong model type for regression" when attempting multinomial model with caret
- Regression equation of a stacked difference-in-difference analysis in R
- Plotting multiple grouped scatter graphs with regression lines on the same axes
- Calculate RMSE for RF regression hyperparameter tuning in GEE encountering issue with error "(...)List<FeatureCollection>."
- Error in eval(predvars, data, env) : object 'Juice_practice' not found when running binary logistic regression in r
- GMMAT model fit and AIC
- Fitting a curve using Linear regression - CLS and NMF
- Specific Dataset causes the glm.nb fucntion to crash for no apparent reason when attempting to perform regression
- names of data do not match with tip labels Error in R phylolm with Missing Data
- Fixed effect panel regression gives coefficients for each year
- Time series model specification
- Inlier subset is incoherent with is_data_valid in RANSAC
- ANN Loss not reducing for Boston house price Data Set
Related Questions in FEED-FORWARD
- neural networks average the output
- Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 784), found shape=(None, 28, 28)
- Batch size for Feed-Forward Neural Network
- Error with FNN model: RuntimeError: The size of tensor a (N) must match the size of tensor b (M) at non-singleton dimension 0
- Is this implementation of a feedforward comb filter (FFCF) correct?
- how to use neat's feed forward network by itself?
- Machine Translation FFN : Dimension problem due to window size
- Could this function be sped up using some Numpy trick?
- After training, is the prediction of the neural network achieved by just forward propagating from input to output layer?
- Feed Forward Neural Network Always outputs Random but Similar Values
- Feed forward ANN stuck at testing accuracy 42% for MNIST images
- Multioutput Neural network models
- Neural Networks: exact high level training algorithm
- Tensorflow NN implementation not converging
- Tensorflow 2.0: ValueError: slice index 0 of dimension 0 out of bounds
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I'm assuming you're using a sigmoid function as your activation function?
It will return values in that range. When u was playing around with mine, I treated it as a percentage of some arbitrary range. It can be a binary result though if you can tolerate a little bit of error. When I was training logic gates, after a fairly successful training session, 1 AND 1 resulted in something like 0.9999999; which is pretty much 1. You can round it at point that.
I made a post about this a month or two ago. I'll link to it if I can find it.
My question