I'm trying to understand the magnitude of change a certain event had on the performance of a button.
I have a data frame like so: Date, Image Renders, and Image Clicks.
I calculate a year over year percent of renders and clicks to understand the annual growth. I know that renders and clicks are correlated because render is the previous step to a click. I track these two values on a daily level and my final table looks like the following:
Day, render, click
1, -10%, 3%
2, 3%, 7%
3, -2%, 5%
...
How do I find the % growth of click per day if the render was adjusted to 0. One day I tried was find the correlation between render and click, and scale each day. Render to click correlation is 50%; therefore, on day 1 if you increase render by 10% the click percent will end up being 8% because
10% * .5 + 3% = 8%
I have a feeling there is a better way to do this so I'm asking for help. I do my calculation in R so would be helpful if someone knew how to do this in R. Thank you!
You need to run a model, in which you then plug your values of render to get the predicted click
m <- lm(click ~ render)
summary(m)
coef(m) # gets the coefs so you can plug values in
Related
I want to know when a time series stabilizes after its peak.
This time series shows a peak, and then it goes down (see images below (1); (2)).
I would like to calculate the moment at which this time-series stabilizes (becomes flatter) after its peak.
In an ideal world, the data should go down to 0 and stay there. But as you see, it does not reach 0, nor stay 100% stable.
I thought of various different ways/possibilities:
-Calculate a tangent point to see the slope change. But the data has many small ups & downs even after smoothing it.
-Calculate the average at the tail (end of the series /e.g. if time = 8000; calculate last 2000 values mean average), then calculate an interval (margin +- this value), then calculate the time at which the first value appears in this interval.
-Calculate pronounced changes in the trend or slope.
*Maybe you have a better idea I did not consider. Feel free to share it if you've already dealt with this in the past.
I need to know the time at which this stabilization happened.
Ideally, you could mute/ignore all values before the peak value, but without deleting these rows (time should stay). Calculating the peak is easy (max value).
I also standardized the data so it starts at y=0 (I have various time series, I make them all start at y=0 to compare them later*).
I do not know how to provide the data because it is about 8k values.
I would really appreciate your help.
Thank you very much.
I am building a cycleGAN with a u-net structure to improve the image quality of Cone Beam Computer Tomography (CBCT), with the Fan Beam Computer Tomography FBCT) being the target images. Because I want to mainly enhance the quality in the lung region, I crop the lung volumes out of the original images and assign value 0 to the remaining regions other than the lung (given that the lung pixel value ranges from -1000 to 0). Scaling and normalization are done to the array with the range of -1000 to 0. Please see the following images as an example for my dataset:
In the example above, the left most image is the CBCT and the right most image is the FBCT. The middle one is the generated image from the CBCT by the cycleGAN model. This is actually an example from the very early epoch of the training.
But when the model goes on training, it somehow gradually loses its ability to capture the anatomy of the images, and eventually generate a blank image with all value 0. (see image below)
The loss along the training is climbing back up after several epoch and it starts to lose the anatomy information:
What makes me curious is that such loss of anatomy does not occur when I simply input the whole CBCT and FBCT images as the dataset, without doing lung segmentation nor value assignment to the regions outside the lung. If un-segmented images are given, the model actually successfully translate the CBCT into mimicking the FBCT quality. I do the segmentation since I want the model to only concentrate in the lung region to see if it performs better.
I wonder if this is the consequences with that the background has extremely high value than the region of interest (i.e. background value: 0; lung value: -1000 to 0). Is there any work published on cycleGAN training with images containing blank background? If yes, is there any special measure when assigning value to the background, or when doing normalization and scaling? I can’t really find any so far.
Any insight is appreciated. Thank you.
I am new to Google Earth Engine and have started playing with mathematically combining different bands to define new index. The problem I am having is the visualisation of the new index - I need to define the max and min parameter when adding it to the map, and I am having troubles understanding what these two end points should be. So here come my two questions:
Is it possible to get the matrix of my image in terms of pixel values? Then I could easily see from what values they range and hence could define min and max!
What values are taken in different bands? Is it from 0 to 1 and measures intensity at given wavelength, or is it something else?
Any help would be much appreciated, many thanks in advance!
Is it possible to get the matrix of my image in terms of pixel values? Then I could easily see from what values they range and hence could define min and max!
If this is what you want to do, there's a built in way to do it. Go to the layer list, click on the gear for the layer, and in the “Range” section, pick one of the “Stretch:” options from the menu, then click “Apply”. You can choose a range in standard deviations, or 100% (min and max).
You can then use the “Import” button to save these parameters as a value you can use in your script.
(All of this applies to the region of the image that's currently visible on screen — not the entire image.)
What values are taken in different bands? Is it from 0 to 1 and measures intensity at given wavelength, or is it something else?
This is entirely up to the individual dataset you are using; Earth Engine only knows about numbers stored in bands and not units of measure or spectra. There may be sufficient information in the dataset's description in the data catalog, or you may need to consult the original provider's documentation.
I'm trying to get some information out of a couple of waveforms, which I currently have in the format of a CSV table with the columns: Time, Volume, Pressure, Flow. (The data is the flow/pressure/volume data obtained from a healthcare ventilator.)
I want to get excel / R / another-programme-that-I've-not-yet-thought-of to do the following with the waveform:
Break it up into individual breaths - starting with when the pressure starts to rise above a baseline (shortly followed by the flow rising above 0)
For each breath, extract:The highest pressure that occurs, the pressure just before the start of the next breath, the lowest pressure that occurs
Does anyone know how to do that, without doing it manually? (It'd mean trawling through a few hours-worth of ventilator data for the project I'm trying to do)
I've attached a copy of the shapes of the waves I'm dealing with, to try to help make more sense.Pressure & Volume against time
My intention is to work out the breath-to-breath variability in maximum, minimum, and baseline pressures.
Ultimately, I've come up with my own fix using excel.
For each pressure value, I've taken the mean of that value and the two either side of it. I've then compared this to the previous mean. For my data, a change of this mean of more than 1% in either direction identifies the beginning and end of the up- and down-stroke of the pressure curve, and I can identify where in the curve I am based on the absolute value for pressure (the peak should never be lower than the highest baseline for the data I've collected), and for the slopes, the first direction of change of the mean (this smooths out occasionally inconsistent slopes).
I'm then graphing the data, along with the transition points, the calculated phase of the breath, and the breath count, so I can sense-check it visually.
Ged
Say I want to display a graph of today's stock market. I gather all my data, and I go to display the graph...is there a well known formula to set the upper and lower bounds to?
Do I need to factor in all the data on the stock market from the last year to get some context?
In some ways this is a design/math question, but essentially, I want to know, is there a well known formula for making graphs for things like network traffic and visitor counts intuitive to read?
Maybe I'm underestimating your problem, but if you just want to show absolute movement, why not do something like
factor = 0.1 # e.g.
todays_span = todays_max - todays_min
lower_bound = todays_min - factor * todays_span
upper_bound = todays_max + factor * todays_span
to fit the curve and leave some space above and below? If you need the user to see relative changes, you have to set the lower bound to zero.