0
votes
1answer
15 views

Scipy optimize: Set maximum error

I'm trying to optimize a 4 dimensional function with scipy. Everything works so far, except that I'm not satisfied with the quality of the solution. Right now I have ground truth data, which I use to ...
-1
votes
1answer
24 views

How to Find the index of Min value of a label in a GrayScale Image using Python?

I have a labeled Grayscale Image.I can find the individual labels from the image using the function scipy.ndimage.measurements.find_objects() . I want to find the 'Min value pixel' of each labeled ...
1
vote
1answer
71 views

Get the closest point to a plane defined by four vertices in python

I need to write a python script which will find the closest point to a plane defined by 4 vertices (given sequentially using the right hand rule). As a bonus it would be great to get the UV ...
2
votes
3answers
74 views

Test for Poisson process

I would like to run some tests for the null hypothesis that the times of events I have was created from a homogeneous Poisson process (see e.g. http://en.wikipedia.org/wiki/Poisson_process ). For a ...
0
votes
1answer
35 views

AttributeError in python/numpy when constructing function for certain values

I'm writing Python code to generate and plot 'super-Gaussian' functions, as: def supergaussian(x, A, mu, sigma, offset, N=8): """Supergaussian function, amplitude A, centroid mu, st dev sigma, ...
0
votes
1answer
34 views

stacking unequal matrices in python

Can someone tell me how to join two unequal numpy arrays(one sparse and one dense). I tried using hstack/vstack but keep getting the dimensionality error. from scipy import sparse from scipy.sparse ...
5
votes
2answers
90 views

Nearest neighbor 1 dimensional data with a specified range

I have two nested lists A and B: A = [[50,140],[51,180],[54,500],......] B = [[50.1, 170], [51,200],[55,510].....] The 1st element in each inner list runs from 0 to around 1e5, the 0th element runs ...
1
vote
2answers
69 views

sparse hstack and weird dtype conversion error

In working with some text data, I'm trying to join an np array(from a pandas series) to a csr matrix. I've done the below. #create a compatible sparse matrix from my np.array. ...
1
vote
1answer
26 views

Python Scipy Anneal finding solutions out of range

I'm using Scipy in Python to do a simulated anneal. I give the anneal an upper and lower limit with the following commands: optimize.anneal(f, input_vector0, lower = 0, upper = 2*np.pi) The anneal ...
0
votes
0answers
17 views

Ndimage or skimage functions for returning pixel neighborhoods

Does anyone know of any efficient ways of computing a pixel's neighborhood and returning it in array form based on an input image and pixel coordinates? I would like to compute a number of pixel level ...
0
votes
2answers
38 views

Scipy erfcinv unexpectedly blows up near 1e-16

I've been using scipy.special.erfcinv to calculate Z scores from pvalues. However, when the pvalues become very small, erfcinv gets unexpectedly large. Any ideas? Example: In [1]: import numpy as np ...
3
votes
3answers
50 views

Subset of a matrix multiplication, fast, and sparse

Converting a collaborative filtering code to use sparse matrices I'm puzzling on the following problem: given two full matrices X (m by l) and Theta (n by l), and a sparse matrix R (m by n), is there ...
1
vote
0answers
16 views

When trying to build a Python executable with Pyinstaller, fails to find an existing scipy module

I have a build script for one of my established Python applications that uses Pyinstaller. This script has been working fine for over a year. Then today, I added to one of the source files for this ...
0
votes
0answers
11 views

Incorporating real data when solving a system of ODE's using scipy.integrate.odeint

I am trying to construct a simple model of a heating system represented by a system of ODEs and solved using scipy's odeint function. I would like to incorporate 'real' data in this model, for ...
1
vote
0answers
28 views

Python SciPy: optimization issue fmin_cobyla : one constraint is not respected

I have the below optimisation problem: The objective function is quite simple: given a vector SPREAD, I try to find the vector W to maximize sum(W.SPREAD). As an example, in dimension 3, this mean I ...

15 30 50 per page