Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
1 answer
113 views

PCA with arpack returns different values when the order of observations change, but why?

I have recently noticed that when I change the order of the observations in a sparse array, scikit-learn PCA with svd_solver="arpack" returns different floating point numbers. Is this an ...
0 votes
3 answers
126 views

Database Rows to static columns [closed]

I have a single column DB file that is rigidly formatted. It doesn't have a header or field names in the export that I've imported into a Goggle Sheet. I need help with how to approach this task of ...
1 vote
2 answers
81 views

Confused about how tf.keras.Sequential works in TensorFlow – especially activation and input_shape

I'm learning TensorFlow to build machine learning models in Python. I tried following the official documentation on creating a simple classification model, but I couldn't clearly understand the tf....
6 votes
1 answer
111 views

Efficient filtering of sparse matrix from full

I have a large, full, dense, symmetric matrix (eg 30k2 or 60k2 positive elements, ~100% density). I want to extract either (i) the top (eg) 1% highest values; or (2) the values above a user-specified ...
1 vote
0 answers
147 views

Solving a linear system with Eigen with a (almost) diagonal matrix [closed]

I need to solve a system of type Ax = b Which is usually done in Eigen with x = A.householderQr().solve( b ). Now in my case, the matrix A is mostly a block-diagonal matrix with a few off-diagonal ...
0 votes
0 answers
49 views

MICCG(0) for a fluid simulation fails at Neumann boundaries

I am trying to follow Robert Bridson's Fluid Simulation Notes (https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf) to implement my own eulerian fluid simulator for the first time. I was ...
0 votes
1 answer
48 views

how to use mkl_dcsrgemv or other functions in OneAPI to cal. scalar prodoct between mass dim sparse matrix and vector?

I program in fortran with Intel OneAPI compiler ifx and MKL packages. I want to cal. the scalar product between a mass dim sparse matrix and a vector. When the dim of the sparse matrix could be ...
0 votes
1 answer
124 views

It is possible to compute both the size and values for a std array in a constexpr function?

I am trying to express the structure of a sparse matrix (and the structure resulting from sparse matrix operations) at compile time with template parameters and constexpr functions. I've defined this ...
1 vote
2 answers
90 views

How to exploit sparsity with lists in a Cython function

I have a function I need to implement which does not vectorize well, and so I am implementing it in Cython to make the nested for-loops workable. My problem is of a similar complexity as naive matrix-...
2 votes
0 answers
173 views

How to reuse cuDSS factors when solving a system of linear equations Ax=b

I am using cuDSS to solve a set of Ax=b equations as follows cudssMatrixType_t mtype = CUDSS_MTYPE_SPD; cudssMatrixViewType_t mview = CUDSS_MVIEW_UPPER; cudssIndexBase_t base = CUDSS_BASE_ZERO; ...
1 vote
1 answer
71 views

scipy.sparse: one subarray at many locations in a larger array

Say I have a sparse subarray whose contents and shape are known: import scipy.sparse as sp sub = sp.coo_array([[a, b], [c, d]]) I'd like to place this subarray at many locations, according to some ...
2 votes
1 answer
108 views

How to convert Eigen Sparse Matrix to Cuda CuSparse Matrix

I am trying to convert an Eigen Sparse Matrix of size NxN to CuSparse matrix so that I can use CUDA to solver the matrix Ax=B. Came across this thread which is pretty old (Convert Eigen::SparseMatrix ...
1 vote
1 answer
103 views

How to efficiently multiply a vector by a transposed sparse matrix in Eigen?

I have with a sparse matrix A and a vector x in Eigen, and I need to perform the following transposed matrix ×ばつ matrix ×ばつ vector operation: ATAx. This can be decomposed into two matrix-vector ...
1 vote
1 answer
51 views

How to produce tensor of first occurrencies of another tensor using PyTorch

Let's say we have an ordered 1D tensor of ints/longs t. I want to produce a new tensor a with size max(t) where each term a[i] contains the first occurrence of the value i in the tensor t. We could ...
4 votes
2 answers
127 views

Identifying and removing duplicate columns/rows in sparse binary matrix in PyTorch

Let's suppose we have a binary matrix A with shape n x m, I want to identify rows that have duplicates in the matrix, i.e. there is another index on the same dimension with the same elements in the ...

15 30 50 per page
1
2 3 4 5
...
297

AltStyle によって変換されたページ (->オリジナル) /