144 questions
-2
votes
0
answers
34
views
How to visualize interactions from a scaled, log-transformed GLMM with Gamma response in R? [closed]
I’m working with a fictional dataset to practice plotting a generalized linear mixed model (GLMM) and would like advice on good visualization strategies.
Here’s the model I fit using glmer from the ...
1
vote
0
answers
323
views
Is it possible to find whether the monitor supports HDR content from it's EDID information
I have the EDID hex string of Display (or Monitor) I want to check whether the monitor supports HDR, HLG or SDR content. Is it possible to find out this information from EDID string ?
I have gone ...
2
votes
0
answers
214
views
OpenGL sRGB experiment [closed]
I have made a simple demo in OpenGL to better understand gamma correction. I have realized that it breaks some of my assumptions, so I was hopping someone can help me understand.
For reference, I have ...
0
votes
1
answer
972
views
The colors in my THREE.JS project are messed up after the update
The colors in my project (which use fbx models) are messed up, after updating to version 136. The colors are much darker now. The migration guide stated:
WebGLRenderer.gammaFactor and THREE....
0
votes
0
answers
69
views
generalise the brightness of images to a set of images
Hello I'm using opencv on python and I was wondering if there was a way to generalise the value of the parameter gamma on a set on images that have diffrents luminance( dark , bright and normal images)...
2
votes
1
answer
2k
views
OpenCV Gamma Correction exr
How can I gamma correct a 32bit .exr file to look like the desired result in the image of this question? Basically converting from liner to sRGB somehow?
I got this code(and modified it a bit) from ...
3
votes
1
answer
2k
views
THREE.js: Textures become grayish with renderer.OutputEncoding = sRGBEncoding
I'm playing a bit with the Three.js cloth example but instead of the alphaMap, I kept the cloth-plane fully opaque and changed its color map.
The result is quite disappointing as the texture now ...
-1
votes
1
answer
317
views
How do I stop my Printscreen screengrabs from being washed out?
I am using a PowerShell command to screengrab a window by using a bat file as follows:
powershell -c "Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait('%%{...
1
vote
1
answer
358
views
Getting persistent error when trying to predict new data from a GLM in R
I'm getting a persistent error "Error: variables ‘x1’, ‘x2’, ‘x3’ were specified with different types from the fit" while trying to predict the outcome of new data using predict in R. I've ...
0
votes
0
answers
184
views
how to decompose a gamma distribution into two gamma distribution in R
Is there an algorithm available in R that can decompose a gamma distribution into two (or more) gamma distributions? If so, can you give me an example with it? Basically, I have a data set that looks ...
-2
votes
1
answer
65
views
Histogram on R studio
I am trying to create a histogram of a variable with superimposed the lines of the 2 gammas distribution and the mixture of those two.
But when I insert the following code:
hist(age, breaks = ...
2
votes
2
answers
2k
views
Control brightness in Windows at software Level
It might be possible for a similar question to be already present on the site, but I have searched a lot and didn't find any relevant solution, so I'm posting it here.
I'm making a Night Light ...
1
vote
2
answers
1k
views
Monte Carlo to Estimate Theta using Gamma Distribution
I would like to run a monte carlo simulation in r to estimate theta. Could someone please recommend some resources and suggests for how I could do this?
I have started with creating a sample with the ...
0
votes
0
answers
427
views
Gamma process simulation in R
I want to write a function in R for simulating 3 numbers of gamma procees that each process represent degradation process of a defect in a system
we assume 3 gamma process {X_k(t);t>=0}, k=1,2,3 ,...
0
votes
1
answer
19k
views
Matlab Error: Index in Position 1 exceeds array bounds
I am attempting to create a gamma distribution in MATLAB; however, I keep receiving the error:
Index in Position 1 exceeds array bounds (must not exceed 100).
Assuming I am reading this correctly, ...
0
votes
0
answers
158
views
How can I build a simple gamma distribution model in R?
I'm currently trying to build a model with one predictor variable. I have insurance data: loss dollars and their policy limits.
I'm able to plot a histogram with the loss amounts and fit a gamma ...
2
votes
2
answers
626
views
sRGB constant luminance stripe
I want to create a color spectrum of constant perceived luminance.
This is my attempt so far (here's the codesandbox):
The code
goes through 8-bit RGB values of increasing hue and constant (and ...
2
votes
1
answer
797
views
C# Windows 10, SetDeviceGammaRamp doesn't work with multiple monitors and/or an Nvidia card? Too many posts made to a semaphore
Trying to control monitor gamma using C# using DLLImport to run SetDeviceGammaRamp in gdi32.dll. Similar to the answer on this question which controls brightness similarly: SetDeviceGammaRamp just ...
1
vote
1
answer
421
views
Why is scipy.stats.gamma.pdf returning an array of 0s?
I am trying to plot a load of data and identify how it is distributed, I have easily plotted a normal distribution and Beta distribution against my histogram.
Histogram and density plot. With normal ...
1
vote
0
answers
152
views
C++ implementation of convolution of 2 independent gamma distributions
I need to combine 2 gamma variates with different shape/scale params, which boils down to calculating new shape/scale params.
I am using boost/std facilities for dealing with statistical problems, ...
3
votes
1
answer
3k
views
Linear gamma v.s. sRGB texture workflow in Godot?
Should my texture assets be linear or sRGB? In either case, what's the proper way to import them?
(There's a similar question on r/godot but I don't see any thorough answers.)
Godot seems to assume ...
0
votes
0
answers
109
views
Bayesian parametric survival analysis
Hello Stackoverflowers,
I have been working on the equation found in the book: Bayesian survival analysis by Joseph Ibrahim 2001 (Chapter parametric models p40-42).
I manage to get a model going ...
0
votes
0
answers
1k
views
Why do I get an error with Gamma distribution with GLMM?
I asked this question in more detail on Stack Exchange. Here I will give a shorter version. The code below does not work for the Gamma distribution, why?
df <- data.frame(month=sample(1:12, 3000, ...
1
vote
1
answer
562
views
Why specifiy "exp()" when using log-link in STAN?
I am using STAN to use a gamma-poisson regression to account for over-dispersion in a dataset, in an assignment. I have looked at the solutions to how to make the model in STAN, which is shown below:
...
1
vote
0
answers
108
views
Generalized linear models with Gamma
I am running a glm in R with Gamma distributed error. I usually use the Anova() type II function to get the p-value for my explanatory variable. This Anova() type II returns (by default) for Gamma a ...
0
votes
1
answer
110
views
How do I use GammaAdjust in QML?
QML GammaAdjust doesn't work for me.
I wanna change gamma factor of my picture, but my code does not work.
Qt Version:
Qt 5.11.2 (MSVC 2015, 32 bit)
Platform:
Windows 10
I try to run a simple ...
1
vote
2
answers
6k
views
Gamma correction implementation in MATLAB
I'm trying to do a gamma correction function in MATLAB, and to say the least, I'm getting some mixed results. Where using a gamma constant below 1 (such as 0.5) gives me a brighter image, and using a ...
2
votes
1
answer
4k
views
In R, what is the default link function using the glm function with the gamma family
I have implemented a model using the glm() function and specifiy the family distribution as gamma:
glmer(FirstSteeringTime ~ error_rate + (1 + error_rate | pNum), family = Gamma, data = modellingdata)...
0
votes
1
answer
256
views
How to take a more balanced sample data Python
I have a dataframe with nomalized percentage info.
Eg.
wordCount number Percent
2.0 1282 0.267345
1.0 888 0.185213
3.0 1124 0.170791
4.0 1250 0.152877
5.0 ...
1
vote
1
answer
548
views
Calculate KL Divergence between two gamma distribution list
I have two list. Both include normalized percent:
actual_population_distribution = [0.2,0.3,0.3,0.2]
sample_population_distribution = [0.1,0.4,0.2,0.3]
I wish to fit these two list in to gamma ...
0
votes
0
answers
92
views
Hdr photo for overlaying other photos
I wanted to know if it is possible starting from some photos by appropriately modifying the gamma values to perform an overlap and tone mapping and extract a hdr photo, I found some code on the ...
0
votes
0
answers
690
views
How to plot gamma distribution for a dataframe in python
I have a population dataframe. How to plot a gamma distribution diagram?
I am using python and I can plot a diagram using seaborn or plot bar. But I need a gamma distribution diagram. I dont know how ...
0
votes
1
answer
955
views
How to write the symbol gamma in greek leeter in the csv file
I want to plot in the csv file the symbol gamma in greek letter. I tried Unicode and the CSS code but I got errors or not the desired result.
For instance, the CSS-code for gamma is the following one:...
1
vote
1
answer
440
views
How do I input color values in sRGB space?
I am learning about the sRGB color space in OpenGL.
One thing is colors from textures, but other - direct color values, let's say from graphics editor.
A color component of 0.5 means that the output ...
3
votes
1
answer
2k
views
How to use the Gamma function from Tensorflow probability as log likelihood loss in a regression model
I am attempting to use the Gamma function from tfp in a custom Keras loss function using the log_prob method, but the function always returns nan when training starts.
I have tested the loss function ...
1
vote
0
answers
79
views
NetLogo: Find detailed information on "random-gamma" calculation error and its range in NetLogo
I want to look for detailed information such as random-gamma calculation error and its range. But at the moment I have not found yet. If anyone knows it and the risk with somewhat range caused by the ...
1
vote
2
answers
5k
views
Fitting Gamma distribution in Python
I'm finding the parameters of Gamma distribution for a small sample. Later, I need to use the parameters to predict future data. However, the result shown incorrect answer.
This is the result I got ...
0
votes
1
answer
2k
views
Why is the p-value from the analysis of deviance table different from the estimated with pchisq()?
I'm studying GLM models from the Lane (2002) paper and I am a bit confused with the analysis of deviance for the Gamma-GLM model.
In the paper, the p-value is lower than P < 0.001 but if we used ...
1
vote
0
answers
673
views
Gamma distribution parameters Python
I am trying to find the shape and scale parameters for the gamma distribution of some data, but I was not able to find a method to work this out.
How do you commonly do it? I am analyzing response ...
1
vote
1
answer
269
views
sRGB gamma curve implement in tensorflow
I need to implement sRGB gamma curve in tensorflow. But I can not compute the element wise condition in tensorflow.
In sRGB curve, if the value is less or equal than 0.0031308, it is a linear ...
2
votes
0
answers
320
views
Left-Truncated Gamma Fitting
I am trying to fit a left-truncated gamma distribution in R. I have large claims above $25,000. Claims below $25,000 are unknown. I am trying to fit the gamma parameters through the MLE procedure in R....
7
votes
2
answers
2k
views
iOS Metal. Why does simply changing colorPixelFormat result in brighter imagery?
In Metal on iOS the default colorPixelFormat is bgra8Unorm. When I change format to rgba16Float all imagery brightens. Why?
An example:
Artwork
MTKView with format bgra8Unorm.
Texture-mapped quad. ...
0
votes
1
answer
104
views
Solving a simply non linear system
For example i have this data:
x-c(73,6,77,81,91,120,150,61,65,68,18,20,23,12,14,18,23,26
+26,27,2,3,3,40,41,41,6,10,11,12,37,38,38,6,73,6,51)
and i want to calculate the a=shape and b=scale ...
-1
votes
2
answers
4k
views
Invert gamma correction in python
I would like to use
import cv2
def adjust_gamma(image, gamma=1.0):
# build a lookup table mapping the pixel values [0, 255] to
# their adjusted gamma values
invGamma = 1.0 / gamma
...
4
votes
0
answers
938
views
OpenGL gamma correction with GL_FRAMEBUFFER_SRGB
I am writing a Blinn Phong (LearnOpenGL tutorial) lighting and trying to get gamma corrected colors as final result.
Before i start digging about gamma correction, my lighting looks like this:
Then i ...
1
vote
0
answers
307
views
How to gamma correct all visual elements in Swift
I want to present visual stimuli in the screen with lineal values for the luminance. A value of 0.5 must have half the luminance than a value of 1.0.
First I have measured the value gamma of the ...
2
votes
1
answer
631
views
Gamma random numbers, MATLAB and Python
I have this line of code in a MATLAB program:
x(:,i) = gamrnd(a(i),1,dim,1)
I was wondering in what way I could write this same line in Python. I think the equivalent statement is:
gamma.rvs(a, size=...
2
votes
1
answer
1k
views
Metal: How to attach image to shader without color/gamma conversion?
Is it possible to send an image to a metal shader (from scenekit) without any color/gamma correction?
I have a data texture where each channel corresponds to specific values that I want to be able to ...
11
votes
1
answer
20k
views
Formula to increase brightness of RGB?
Quick question!
I have an R G B value and I want to convert to convert it to be 50% brighter.
I found a gamma formula but I'm unsure if gamma is the correct way to go.
So far, I'm using:
r =...
2
votes
1
answer
2k
views
Gamma Distribution in R (qgamma)
This may be a very stupid question but
Does anyone know why i am not getting the second bit equals to the mean (100)?
#beta=4, alpha=5, mean=20
qgamma(0.5, 5, 1/4)
# 18.68364
#beta=2500, alpha=0.04, ...