110 questions
1 vote
1 answer
149 views
Find the vertices of all the sub-simplexes following Barycentric subdivision
I have a set of K dimension standard basis vectors and the (K-1)-simplex defined over these vectors. I want to divide this simplex into sub-simplexes which partition the original simplex using ...
0 votes
1 answer
100 views
What data structure can I used for N-dimensional data with category names instead of integer indices?
After iterating through multiple nested loops to train multiple DL models, I want to poke around in the results to compare how different changes to hyperparameters, different datasets, and different ...
0 votes
0 answers
34 views
ValueError: No gradients provided for any variable error when using gru unit and data with ndim = 3 with diffrent batch size
Code : from pandas import DataFrame from pandas import concat from keras.models import Sequential from keras.layers import Dense from keras.layers import GRU # y.shape : (2325, 2, 13) # X.shape : (...
0 votes
0 answers
90 views
i want to calculate euclidean distance to generate the seedmaps for watershed of neural cells but got ValueError: XA must be a 2-dimensional array
while finding the euclidean distance to generate the seeds for watershed, I got an error XA must be a two dimensional array. I applied many things suggested on stack overflow but couldn't solved this ...
0 votes
1 answer
221 views
How to create a function that accepts as an argument an n- dimensional vector and will return the vector (x1,x2^2,..xn^n) in R
How can I create a function that accepts as an argument an n- dimensional vector that will return (x1, x2^2, ..., xn^n) in R.
1 vote
0 answers
352 views
xarray .where() function is too slow over datasets
I am using .where() function to select time and certain criteria in xarray dataset. import numpy as np import xarray as xr ds1 = xr.open_dataset('COD.nc') ds2 = xr.open_dataset('CDNC.nc') ds3 = xr....
-1 votes
2 answers
195 views
Choose a point maximizing the distance to its nearest neighbor
Consider a set of points in an n-dimensional space. Each dimension is bounded in the range [0, 1] inclusive. Add a new point to the space as far away as possible from its nearest neighbor. Where ...
2 votes
2 answers
696 views
How to find the center and radius of an any-dimensional sphere given dims+1 points
Given a vector of N-dimensional points. The vector will be of size N+1. Is there a generalized algorithm to find the center and radius of the ND sphere using those points where the sphere intersects ...
2 votes
3 answers
99 views
Optimally selecting n datapoints from k
Problem statement: I have 32k strings that consist of 13 characters. Each character can take 3 values (a, b or c). I need to select n strings from the 32k that satisfy the following: select minimal ...
0 votes
1 answer
194 views
Sliding Window over stacked np.array (Python)
I am trying to create a multi-dimensional window across a stack np array and find the max of each of the windows. Below res is a stacked array with shape (3, 4, 4). I would like to have a window with ...
4 votes
1 answer
316 views
Algorithm to dynamically generate m-face list for n-dimensional hypercube
I'm attempting to design an algorithm that, given n, m, and vertices (where n = the dimension of a hypercube, m = the dimension of the faces we're trying to generate, and vertices is an ordered list ...
1 vote
1 answer
258 views
Construct n-dimensional boost point
Problem: boost/geometry/geometries/point.hpp point template does not provide a way to construct an n-dimensional point type with non-zero values. For example: #include <boost/geometry/geometries/...
1 vote
0 answers
165 views
Find optimal paramters for target value in pandas dataframe
I have some code that takes parameters x1, x2... xn and outputs the value y. I want to find the parameters that maximize y. I picked randomly the parameters 1000 times, calculated the target value and ...
1 vote
1 answer
863 views
How to generate non-overlapping random points uniformly and evenly within N-dimensional spaces or dataset between low and high range
I have tried to find random points on the NxM dataset based on the lowest value of each M as low range and the highest value of each M on as high range. Here is the code: def generate_random_points(...
2 votes
2 answers
326 views
Iterate throught n-dimensional vector c++
I wanted to write my own code to iterate over an n dimensional vector (where the dimension is known). Here is the code: void printing(const auto& i, const int dimension){ int k= dimension; ...