1,067 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
2
answers
308
views
In REDCap: is there a function to extract to a minimum or maximum of several different dates?
I am looking for a possibility to extract the minimum or maximum date in REDCap.
I have multiple dates (each from a different event) for a patient and need to find the most recent date.
Assuming I ...
1
vote
3
answers
151
views
How to find position of running minimum (runMin) in a vector in R?
As an example I have a vector v of length 300 with stock price data for 300 days:
v = c(seq(20,30,length.out=60), seq(29.8,12.8, length.out=45),
seq(13,18.4, length.out=40),seq(18.6,5.04, length.out=...
1
vote
2
answers
106
views
Why am I getting an empty stack error on line return Minstack.peek();
class MinStack {
Stack<Integer> stack;
Stack<Integer> Minstack;
public MinStack() {
stack = new Stack();
Minstack = new Stack();
}
public void push(...
1
vote
2
answers
110
views
Initialize a integral variable to +/- infty for a running min/max in Haskell
In running minimum/maximum problems, the e.g. minimum-so-far is often initialized to \infty in order to guarantee we "capture" every minimum, no matter where it is located.
In Haskell, we ...
3
votes
1
answer
147
views
Excel Formula: Filter Group based on Smallest Values
Excel Formula
With the use of an Excel (Not VBA) array formula or similar preferably, due to the size and amount of data, I need to reduce the least amount of resources necessary to optimize ...
1
vote
1
answer
72
views
Multiprocessing Pool: return the minimum element
I want to run a task with a multiprocessing.Pool and return only the minimum element, without taking the memory to store every output.
My code so far:
with Pool() as pool:
programs = pool.map(task, ...
-1
votes
2
answers
161
views
Why does my if syntax not work in these conditions?
my method
public void Add(Car car)
{
if (car.DailyPrice > 10 && car.BrandName.Length > 2)
{
_cars.Add(car);
}
else {
...
1
vote
0
answers
80
views
Minimize sum of array sample from columns in 2D array with limitation on number of used row
TLDR; It seems to be a top k problem with dependency. Or a Knapsack Problem but the order matters.
If I have a 2D array with (N, M) shape.
I need to select L rows from it to be a (L, M) shape array ...
0
votes
1
answer
505
views
PowerBI DAX Min Measure - error message "A single value for column 'PerformanceValue' in the table 'National KPI Upload 13' cannot be determined
I'm trying to get the minimum value against specific measures in a column in a table, using the DAX as below, but getting an error ""A single value for column 'PerformanceValue' in the table ...
-3
votes
1
answer
24
views
How can I print the model name that has lowest RMSE with this code?
X = dataset[['bmi', 's5', 'bp']]
model4 = LinearRegression()
model4.fit(X,Y)
res4 = model4.fit(X,Y)
rmse4 = np.sqrt(mean_squared_error(res4.predict(X),Y))
print("RMSE for Linear Regression: &...
0
votes
1
answer
47
views
How to find x's (more than one) that minimize a function in r
hx <- function(x){
abs(16*x*exp(1)^(-4*x) - 0.55)
}
roots_gx <- optimize(hx, lower = 0, upper = 2)$minimum
roots_gx
One of the roots of g(x) is 0.78, struggling to find the other one
tried ...
0
votes
0
answers
31
views
R - Nearest non-zero neighbours from a matrix
I have a table of how closely areas are related on given variables. I would now like to extract the names of the neighbouring area.
matrix <- data.frame(Area =c("A","B","C&...
0
votes
0
answers
62
views
Execute loop calculation between two snowflake tables in SAS environment
My goal is to calculate the final end dollar amt, the math logic is
the new end dollar amt = minimum(beginning_balance_amt,net_dollar_balance), beginning balance amount = previous end balance amount
...
0
votes
1
answer
255
views
Set Local pick up cost to zero when Free shipping is available in WooCommerce
I offer free shipping for 45ドル. I have hidden the other shipping methods, except local pick-up, when free is available using the code below.
add_filter( 'woocommerce_package_rates', '...
0
votes
2
answers
2k
views
pytorch min by columns with nan
I have a 2D torch tensor with nan values, I would like to get column minimum values and ignore cells with nan values.
import torch
data = torch.tensor([[ 0., 1., float('nan'), 3.],[ 4., 5., 6., ...