I am trying to calibrate a Bayesian neural network. I have already approximated the posterior density for its weights. In order to make predictions the Bayesian way, I am taking samples from the approximated density, getting the corresponding probability for each sample (with softmax), and then averaging the probabilities to get a final output (since in Bayesian learning we want to get the expectation of the predicted probability with regard to the posterior weights distribution). This works well in terms of classification error, but my network is overconfident (as expected and observed with complex networks). I want to calibrate it. I read from multiple sources that temperature scaling is the go-to calibration method for neural networks, in which the softmax inputs are divided by a temperature parameter T, which is optimized to minimize the cross-entropy loss. In other words - instead of sending logits x_1...x_n into the softmax, send x_1/T...x_n/T. However, my model does not output raw logits which go into a softmax once, but it rather averages the softmax of multiple logits. So I am not sure how to implement temperature scaling in this scenario. Do I still fix a single temperature parameter and use it for all logits before averaging them? If so, how do I optimize it? If not - how else would one go about this? Thanks!
Temperature scaling a bayesian neural network?
70 views Asked by Randomdude At
0
There are 0 answers
Related Questions in MACHINE-LEARNING
- Trained ML model with the camera module is not giving predictions
- Keras similarity calculation. Enumerating distance between two tensors, which indicates as lists
- How to get content of BLOCK types LAYOUT_TITLE, LAYOUT_SECTION_HEADER and LAYOUT_xx in Textract
- How to predict input parameters from target parameter in a machine learning model?
- The training accuracy and the validation accuracy curves are almost parallel to each other. Is the model overfitting?
- ImportError: cannot import name 'HuggingFaceInferenceAPI' from 'llama_index.llms' (unknown location)
- Which library can replace causal_conv1d in machine learning programming?
- Fine-Tuning Large Language Model on PDFs containing Text and Images
- Sketch Guided Text to Image Generation
- My ICNN doesn't seem to work for any n_hidden
- Optuna Hyperband Algorithm Not Following Expected Model Training Scheme
- How can I resolve this error and work smoothly in deep learning?
- ModuleNotFoundError: No module named 'llama_index.node_parser'
- Difference between model.evaluate and metrics.accuracy_score
- Give Bert an input and ask him to predict. In this input, can Bert apply the first word prediction result to all subsequent predictions?
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 CALIBRATION
- Keras TensorFlow Probability model not learning distribution spread
- Start a program from System32 in C++ Builder 11
- CalibrationCurves::val.prob.ci.2 - Getting Integer Overflow and Error with Vector Size on full dataset but works perfectly on half the dataset. Why?
- Difference between XYZ rotation and Theta_Phi_Psi rotation
- Adafruit BNO055 calibration gives different results every time
- Get normal vector of floor by camera calibration
- Different representation orders in Transformation matrix (4x4) extrinsic calibration of two sensors
- Using MATLAB Data Acquisition toolbox and trying to calibrate a signal in a while loop
- Hand-Eye Calibration Discrepancy: Seeking Guidance on Aligning Results with Expected Values
- Calculating IMU random walk using allan variance
- How to Recenter Base Calibration for OpenVR Headset Using C++ and OpenVR API?
- How to change the line type in the calibration.plot of the GBM package?
- Stm8l mcu RTC calibration problem using RTC_SmoothCalibConfig()
- cv2.error: OpenCV(4.8.1) error: (-215:Assertion failed) nimages > 0 in function 'cv::calibrateCameraRO'
- Is there any way to plot a calibration curve and calculate a Brier score from a XGBoost model in R?
Related Questions in BAYESIAN-NETWORKS
- how to set a custom prior for Convolution2DReparameterization?
- Output node not included in the Bayesian Network
- model.evaluate() loss metric calculation in Bayesian Neural Net
- Bayesian Network [Variable Elimination]: merge and groupby memory crash using pandas
- Moving nodes around using PyAgrum for a bayesian network
- Which of the right 3 Bayesian networks is equivalent to the left one?
- Bayesian Dense Layer Scaling Issues
- Error in abs(c(deltas, deltas2)) : non-numeric argument to mathematical function - RStudio
- Why does my 1D Bayesian CNN, made by replacing the convolution and dense layers with Convolution1DFlipout and DenseFlipout of a working CNN not train?
- Temperature scaling a bayesian neural network?
- DenseVariational layer produces deterministic predictions even though it should be random
- Is there a way to plot a Bayesian network with its marginal distributions using BNLearn in Python?
- Bayesian Neural Network Using Iris Data
- Enforce constraints in bayesian network such that all nodes have at least 1 outgoing arc
- Saving pgmpy CPDs to PDF or excel file
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?
Popular Tags
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)