429 questions
0
votes
0
answers
14
views
Ternary plot with values large axis values
is it possible to create a ternary plot with values larger than 100? I'm trying to plot the relationship between annual minimum temperature, maximum temperature, rainfall and tree height (as heat ...
1
vote
1
answer
1k
views
wes_palettes: How to obtain color hex codes from a wesanderson palette when it set to continuous with more than the predefined colors
Folks,
I try to obtain color hex codes from a wesanderson palette when it is set to continuous with more colors than the predefined numbers of colors.
library('wesanderson')
To obtain all the hex ...
3
votes
0
answers
227
views
Continuous Binary Search over Metric Space
I am studying the binary search problem on continuous intervals using a non-linear distance metric D. In this interval search, I'm restricting myself to binary queries, meaning the only information ...
0
votes
0
answers
310
views
Error: Discrete value supplied to a continuous scale
I am writing a code to make custom bland-altman plots. I saw that in one of my plots there was some proportional bias. Therefore I needed to transform my data. I used a transformation of difference/...
1
vote
1
answer
404
views
R ggplot: Size breaks for continuous variable
I am trying to create a scatterplot with different point sizes for a continuous variable R95p_e. However, I'd like to bin or create breaks for the continuous variable according to:
iris <- iris %&...
0
votes
1
answer
624
views
Gymnasium. Actions in continuous spaces
I am introduced to Gymnasium (gym) and RL and there is a point that I do not understand, relative to how gym manages actions.
I've read that actions in a gym environment are integer numbers, meaning ...
2
votes
2
answers
900
views
How to calculate mean (Expected Value) of a custom continuous distribution from the probability density in R
The probability density and the calculation for the mean "by hand" are given below:
I have coded the probability density function as:
myfunc <- function(x){
ifelse(x >= 0 & x &...
0
votes
0
answers
70
views
How can I input data automatically in a continuous data?
enter image description here
How can I input data in column F with 4 consecutive data for each data like column E using the data in column D2:D?
Is it possible?
How should I modify the formula in F2?
=...
0
votes
0
answers
39
views
Plotting multivariate continuous data
I have a dataset that collected temperature on 10 different sensors each minute per three months.
I have cleaned the dataframe omitting the 'NA's and excluding other variables like air temperature, ...
1
vote
0
answers
42
views
How to fix an error in a moderation model in R with continuous variables?
I am trying to run a moderation model in R but I don't have a lot of experience working with R and I struggle. I will appreciate any help and advise you can give me! I really want to learn.
I am using ...
0
votes
1
answer
2k
views
How to change data from discrete to continuous in R?
I have two columns of my "Review" dataset that are causing me issues - one "Year" has years formatted like "2001/02". The other "Hour" has the hour of the day ...
0
votes
0
answers
23
views
Categorical exposure (genetic predisposition of a SNP) and continuous repeated measures outcome (depressive symptoms)
I am looking for some help on the following matter.
I have to analyse the association between SNPs and depressive symptoms. Genetic predisposition of the SNP will be categorised in either 0,1 or 2 ...
0
votes
1
answer
113
views
Colour geom_text by a continue variable
I'm using geom_text to add text to a ggplot. I'd like the colour of that text to relate to the value it contains. This is a continuous scale, so ideally >0 get increasingly red, and <0 get ...
1
vote
0
answers
56
views
Contour line not meeting together
I have written the following code for a Gaussian copula contour. However, at the bottom left the it is discontinuous. What could be the reason and how can I get a continuous contour?
contour(xgrid,...
0
votes
1
answer
140
views
Continuous functions in Isabelle
I want to define a continuous function on an interval of the real line -- [a,b), [a,b], (a,b), or (a,b] (where a < b and either could possibly be infinite) -- in Isabelle, or state that a function ...
0
votes
1
answer
111
views
Continuous contour plot
This is my code to find outliers. I would like to plot a continuous contour line over no outliers. What I'm getting is two isolated contour lines. So, I want to get only one contour (connected contour)...
0
votes
0
answers
165
views
What is the difference between continuous ans discrete variables in an optimization problem? Natural and real numbers?
It is a rather theoretical question to better understand some definitions.
Can descision variables in descrete optimization problems be only integers?
If I have a set of real numbers which are not ...
1
vote
1
answer
374
views
How do I call a function "x" amount of times in python? Using a for loop?
I have a cap.read() function where I am reading in frames from a video. The first call of the function is the zeroth frame, the second call is the 1st frame, etc... I am trying to call the function ...
0
votes
1
answer
202
views
Continuous data with R
I am trying to import a matrice of two columns and 100 lines from excel to R. the first column is composed from continuous data in the form of interval ([100,150[, [150,200[,...) and the second is the ...
0
votes
1
answer
71
views
Which branch to traverse next in a cyclic directed graph?
I have a cyclic directed graph that let's assume water flows between the vertices back to the starting node in a continues loop, if I have a node with 3 branches going out of that node and meeting at ...
2
votes
1
answer
79
views
Why does my continuous graph suddenly change if I change from >= to > on the piecewise function (ggplot2)?
I'm going to depict a continuous graph on R using ggplot2 library, which is based on piecewise function.
fun1 <- function(x){
ifelse(x<=-2, -1.5*(-x)^2, NA)
}
fun2 <- function(x){
ifelse(...
0
votes
2
answers
980
views
Bar plot using continuous variable and factor to color bars
I have a a dataset that looks like this but much bigger:
County <- rep(c("Alameda", "Clallam", "Clatsop", "Contra Costa", "Coos", "Curry")...
0
votes
2
answers
589
views
Continuous function in R Programming
I'm trying to code the following continuous function in R Programming.
I was trying to create a function called fun1 that takes a single argument vecA. I want the function to return the values of f(x)...
1
vote
1
answer
107
views
Finding ranges of continuous values
I have the following Mongo collection:
[
{
"key": 1,
"user": "A",
"comment": "commentA1"
},
{
"key": 2,
"user&...
0
votes
1
answer
64
views
How to write a loop random selected data and where the output is continuous data in python?
I am trying to run the following code multiple times. Each time I run it I get different results because of the df.sample function. The output is a dataframe with 2 rows by 750 columns of continuous ...
1
vote
1
answer
175
views
How to fix overlapping tick labels for svg legend using D3
I have an color legend created using linear gradient and D3 concept. The issue currently I am facing is that the ticks labels of the legend gets overlapped.
I have to show the Min and Max values all ...
2
votes
1
answer
698
views
python implementation of matlab "d2c" function
I'm trying to convert a discrete transfer function to a continuous one (z to s) in python. It works perfectly fine in Matlab:
>> H = tf([0.0, 0.00011109058274028799, 0.0, 0.0, 0.0, 0.0],[1.0, -4....
0
votes
0
answers
103
views
Issue with creating legend if min and max value supplied are not in between 0 and 1
I have created continuous legend using scale Linear in d3js and it works fine. But I also have scenario where min and max value are not in between 0 and 1 but have value [2315, 4516].
So I am passing ...
0
votes
0
answers
141
views
glm model fits Poisson distribution although values are continuous and contain NA and 0
I have a dataset consisting of continuous values and some NA. I need to do a glm with this data and tried with the family = poison. It works, although I get an error message, and when I check the ...
-1
votes
1
answer
540
views
Autohotkey function 'reload' starts an infinite loop that only Taskkill will stop
I'm a relative newbie with Autohotkey but I'm fairly certain this is not supposed to happen. When I use the 'reload' command, an infinite loop begins. As far as I can tell, it is a loop of whatever ...
2
votes
1
answer
67
views
Is the image of a `hcomp` the `hcomp` of images?
I am trying to fill the remaining one hole in the following program:
{-# OPTIONS --cubical #-}
module _ where
open import Cubical.Core.Everything
open import Cubical.Foundations.Everything
data S1 : ...
1
vote
2
answers
522
views
Can I include continuous variable when optimising with CPMpy?
I need to run a model, where I optimise a diet within a set of constraints and call all integer solutions in the end. I have found a diet example matching almost what I need here: hakank.org. However, ...
0
votes
0
answers
70
views
Dataframe treat data with different decimal houses
I have this column in my dataset where the values are not consistent.
You can either find values with just one decimal house or four decimal values.
I need this columns to calculate some means.
How ...
0
votes
1
answer
450
views
Feature Selection with Ordinal, Categorical Nominal, and Continuous variables as predictor
I am looking to classify loan defaulters i.e. 0 for non defaulter and 1 for defaulter from a dataset containing 13000+ rows and 162 predictor variables. The predictor variable consists of categorical ...
3
votes
2
answers
2k
views
Why is output of R mediation package showing control/treat groups when the predictor is continuous?
I am running a mediation model using the R mediation package, but I am not getting the correct output for my variable types. I have a continuous predictor, but the output is treating my predictor as a ...
1
vote
1
answer
846
views
How to tell R to use wider range of colors for my geom point chart?
I am using geom_point to create R Chart. Below is the snippet of code I am using.
geom_point(aes(color=MyColumnHeading))
It all works. So far so good. The problem I am having is the following. The ...
0
votes
1
answer
457
views
Plotting NMDS A continuous variable can not be mapped to shape ggplot2 but group variable seems to be character
I am trying to plot NMDS results using an example I found online. When I plot my group variable (which are 'S' and 'E') I get "Error in 'scale_f()': A continuous variable can not be mapped to ...
1
vote
1
answer
98
views
Smooth continuous movement
I made a little game with pygame and allthough it looks fine to me, there's one thing I would like to improve: I want the little white square to keep moving when a key is pressed an stops moving when ...
-1
votes
1
answer
114
views
R: Continuous return for panel data
I have the following data:
structure(list(`Product Name` = c("A", "A", "A", "B", "B", "B",
"C", "C", "C"), ...
0
votes
1
answer
400
views
How to create vertical continuous legend without rotating the legend
I have created the horizontal continous legend using linear gradient. But my legend can be either horizonatl or vertical based on the flag. How can i make same legend vertical but i do not want to ...
1
vote
1
answer
541
views
Plotting group proportions with continuous variable
I would like to plot the proportion of levels of a group alongside a continuous variable. Since the x-axis is continuous, it is not really possible to compute proportions at each point (since there is ...
1
vote
0
answers
38
views
Is there a dataset that contains two or more doctors prescribing two or more medicine doses in continuous value to patients and report their condition
I'm currently working on the problem of evaluating a contextual bandit (target) policy given a dataset that is generated by another policy (which is off-policy policy evaluation for contextual bandits)...
2
votes
1
answer
891
views
What is meant by a "Relative Comparison" and an "Absolute Comparison"?
Quoting from this article:
REAL NUMBERS
Binary search can also be used on monotonic functions whose domain is
the set of real numbers. Implementing binary search on reals is
usually easier than on ...
0
votes
2
answers
634
views
python time series plot problem (discontinuous datetime, plot weird for some files)
Hi I am trying to plot some timeseries data but there are two problems.
Before describing the problems, there are many stations and data files that I use are for each station.
I mean, the files are ...
0
votes
1
answer
42
views
Continuous Form populate textbox to another form
so I have made a form with two combo boxes which are filtering a query for a match.
This works great. But now i want to add a search engine. Since there are different matches depending on the release ...
0
votes
7
answers
271
views
c# Find the Longest Continuous Subarrays first and last elements Indexes
In the inputs first row, there are two numbers the first one is the amount of rows N and the second one is a limit K. I have to find the first and last element's indexes of the longest continuous ...
0
votes
1
answer
104
views
Correlation between continuous y variable and 3 categoriy x variable, R
I have the company rating on the x-axis (1=sussessful, 2=not sure yet, 3=not successful) and a diversity index on the y-axis which is between 0 and 1. I want to find out if the company rating is ...
0
votes
0
answers
250
views
continuous Colormap over Surface Plot
I'd like to create a continuous colormap with matplotlib on a 3D Surface Plot, where the color depends on the z-value of the surface. But with the "normal" plt functions the colormap fills ...
0
votes
0
answers
82
views
I can´t add the data label to my plot, occurs this Error: Discrete value supplied to continuous scale
Hi I have this code which is working ok, but when I try show the data label I have an error that I don't know how to solve.
Error: Discrete value supplied to continuous scale
This code is ok.
ggplot(...
2
votes
2
answers
597
views
I have 3 time periods in excel - I need to know the duration of the longest continuous period
Please help!
Ideally, I would really like to solve this using formulas only - not VBA or anything I consider 'fancy'.
I work for a program that awards bonuses for continuous engagement. We have three (...