distribution

To scale values from Wigner-Ville Distribution to real range in Matlab

放肆的年华 提交于 2019-12-30 14:21:10
问题 I run by using the function tfrwv.m in Time-Frequency Toolbox [B,T,F] = tfrwv(data, 1:length(data), length(data), 1); B(1:130, :) = 0; % remove the duplicate part of the distribution imagesc(T, F, abs(B)); colormap(hot); xlabel('t [s]'); ylabel('f [Hz]'); I get The frequency should be within [0,180] Hz and time [0,2.5s]. How can you scale time and frequency to the real values? The manuals says %TFRWV Wigner-Ville time-frequency distribution. % [TFR,T,F]=TFRWV(X,T,N,TRACE) computes the Wigner

Different probability for ranges of random numbers

对着背影说爱祢 提交于 2019-12-30 05:12:12
问题 I'm looking for the best way of implementing random number generator, that will allow me to have control over probability from what range the generated number will be returned. To visualize what I'm trying to achieve I have a picture : So to summarize : Let's say that my range is 400. At the beginning I'd like to have 5% probability of getting number 0-20. But at some moment in time I'd like to have this probability increased up to 50%. Hope you get the idea. 回答1: Hmm, working on your

Different probability for ranges of random numbers

倖福魔咒の 提交于 2019-12-30 05:12:05
问题 I'm looking for the best way of implementing random number generator, that will allow me to have control over probability from what range the generated number will be returned. To visualize what I'm trying to achieve I have a picture : So to summarize : Let's say that my range is 400. At the beginning I'd like to have 5% probability of getting number 0-20. But at some moment in time I'd like to have this probability increased up to 50%. Hope you get the idea. 回答1: Hmm, working on your

Distributing a Perl Application

随声附和 提交于 2019-12-30 05:09:08
问题 I recently created a little Perl application that utilizes a few non-core modules that will need to be installed via CPAN. Is there a way to distribute the application with the ability to check to see if the required modules are installed and pull them from CPAN if they aren't? I suppose I am looking for something similar to the CPAN auto-dependency-install feature. I thought about using module-starter and Module::Install to create a module-like directory structure and then tailor the Build

Using MLE function to estimate the parameters of a custom distribution

房东的猫 提交于 2019-12-29 09:05:25
问题 I am trying to use mle() function in MATLAB to estimate the parameters of a 6-parameter custom distribution. The PDF of the custom distribution is and the CDF is where Γ (x,y) and Γ (x) are the upper incomplete gamma function and the gamma function , respectively. α , θ , β , a , b , and c are the parameters of the custom distribution. K is given by Given a data vector ' data ', I want to estimate the parameters α , θ , β , a, b, and c. So, far I have come up with this code: data = rand(20000

Distribute/distutils specify Python version

元气小坏坏 提交于 2019-12-28 18:08:34
问题 Kinda followup to this... :) My project is Python 3-only and my question is basically how I tell distutils/distribute/whoever that this package is Python 3-only? 回答1: Not sure if there's some special setting, but this in the beginning of setup.py might help: import sys if sys.version_info.major < 3: print("I'm only for 3, please upgrade") sys.exit(1) 来源: https://stackoverflow.com/questions/13385337/distribute-distutils-specify-python-version

random unit vector in multi-dimensional space

左心房为你撑大大i 提交于 2019-12-28 05:59:27
问题 I'm working on a data mining algorithm where i want to pick a random direction from a particular point in the feature space. If I pick a random number for each of the n dimensions from [-1,1] and then normalize the vector to a length of 1 will I get an even distribution across all possible directions? I'm speaking only theoretically here since computer generated random numbers are not actually random. 回答1: One simple trick is to select each dimension from a gaussian distribution, then

Generate random numbers according to distributions

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-28 05:38:08
问题 I want to generate random numbers according some distributions. How can I do this? 回答1: The standard random number generator you've got ( rand() in C after a simple transformation, equivalents in many languages) is a fairly good approximation to a uniform distribution over the range [0,1]. If that's what you need, you're done. It's also trivial to convert that to a random number generated over a somewhat larger integer range. Conversion of a Uniform distribution to a Normal distribution has

Probability distribution in Python

僤鯓⒐⒋嵵緔 提交于 2019-12-28 03:23:10
问题 I have a bunch of keys that each have an unlikeliness variable. I want to randomly choose one of these keys, yet I want it to be more unlikely for unlikely (key, values) to be chosen than a less unlikely (a more likely) object. I am wondering if you would have any suggestions, preferably an existing python module that I could use, else I will need to make it myself. I have checked out the random module; it does not seem to provide this. I have to make such choices many millions of times for

Most “thorough” distribution of points around a circle

随声附和 提交于 2019-12-25 18:48:38
问题 This question is intended to both abstract and focus one approach to my problem expressed at "Find the most colourful image in a collection of images". Imagine we have a set of circles, each has a number of points around its circumference. We want to find a metric that gives a higher rating to a circle with points distributed evenly around the circle. Circles with some points scattered through the full 360° are better but circles with far greater numbers of points in one area compared to a