distribution

Small Linux distro for demo systems that still runs Java

烈酒焚心 提交于 2019-12-12 08:10:17
问题 I'm looking for advice on a really small linux distro that I can run inside VirtualBox without killing the host system and that can also run the latest Sun/Oracle-Java. I don't need anything else on it with the exception of Postgres and a text editor. I lost track of the millions of different distros, but maybe some of you guys are already deploying stuff like that to your sales droids? 回答1: http://susestudio.com/ seems like a good fit- Java, Postgres, and nothing else is a fairly uncommon

Function to transform empirical distribution to a uniform distribution in Matlab?

坚强是说给别人听的谎言 提交于 2019-12-12 06:01:02
问题 I know the procedure of transforming one distribution to another by the use of CDF. However, I would like to know if there is existing function in Matlab which can perform this task? My another related question is that I computed CDF of my empirical using ecdf() function in Matlab for a distribution with 10,000 values. However, the output that I get from it contains only 9967 values. How can I get total 10,000 values for my CDF? Thanks. 回答1: As you say, all you need is the CDF. The CDF of a

Inverse of the lognormal distribution

大憨熊 提交于 2019-12-12 04:58:18
问题 I need to find the inverse of a given lognormal distribution. Since there is no inbuilt function in R for inverse lognormal, I need to design my own. I have this lognormal distribution for a random variable 'x' f_lambda <- function(x,mu,sig) {dlnorm(x, meanlog = mu, sdlog = sig,log=FALSE)} On wikipedia it says G(y) = 1- F(1/y) where G(Y)n is the inverse distribution to F(X) and X= 1/Y. But, I am confused as to how to encode F(1/y) in r and what to use to define that distribution - mu or 1/mu.

chi-square - two sample test in r

本秂侑毒 提交于 2019-12-12 04:33:54
问题 There is in R a function to perform a chi-square two sample test ?http://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/chi2samp.htm For example I whant to prove if x = rnorm(100) and y = rnorm(100) come from the same distribution. I tried to use the chisq.test function, but I think it is not correct because it gives me a very large p-value > chisq.test(rnorm(100),runif(100)) Pearson's Chi-squared test data: rnorm(100) and runif(100) X-squared = 9900, df = 9801, p-value = 0.239

How do I create a vectorized version of randsample in Matlab

大憨熊 提交于 2019-12-12 03:24:32
问题 I have a support ( supp_epsilon ) and a probability mass function ( pr_mass_epsilon ) in Matlab, constructed as follows. supp_epsilon=[0.005 0.01; 0.01 0.015; 0.015 0.02; 0.02 0.025]; suppsize_epsilon=size(supp_epsilon,1); pr_mass_epsilon=zeros(suppsize_epsilon,1); mu_epsilon=[0; 0]; sigma_epsilon=[1 0.5; 0.5 1]; pr_mass_epsilon=zeros(suppsize_epsilon,1); for j=1:suppsize_epsilon pr_mass_epsilon(j)=mvnpdf(supp_epsilon(j,:),mu_epsilon.',sigma_epsilon)/sum(mvnpdf(supp_epsilon,mu_epsilon.',sigma

Avoiding empty and small groups when using pretty_breaks with cut2

为君一笑 提交于 2019-12-12 03:07:46
问题 I'm working with variables resembling the data val values created below: # data -------------------------------------------------------------------- data("mtcars") val <- c(mtcars$wt, 10.55) I'm cutting this variable in the following manner: # Cuts -------------------------------------------------------------------- cut_breaks <- pretty_breaks(n = 10, eps.correct = 0)(val) res <- cut2(x = val, cuts = cut_breaks) which produces the following results: > table(res) res [ 1, 2) [ 2, 3) [ 3, 4) [

Random distribution of items in list up to a maximum count

大兔子大兔子 提交于 2019-12-12 03:07:12
问题 I have a List of items containing x items. I want to distribute these items randomly in other Lists with the conditions : Each List has a maximum size of y item (with y = 4) Each Item must be used a maximum of z times (with z = 5) If x isn't divisible by both y and z, it's okay to have Lists containing less than y items. I'm looking for a Java (from 1.6 to 1.8) implementation of such a method. Thanks! EDIT Here's what I tried so far : List<Item> myItems; // Initialized in an other part int y,

How to get probability of new data point from probability object (fitdist)?

你离开我真会死。 提交于 2019-12-12 02:49:22
问题 I have fitted several probability distribution to my dataset by using the Matlab fitdist function in the following way: pd = fitdist(myDataset,distname) From this function I got a probability distribution object pd . I now that I can calculate mean(pd) , std(pd) , median(pd) etc. But how can I calculate the probability of a new data point according to the fitted distribution? 回答1: You can evaluate the probability value thanks to the pdf() function. First of all you can create your probability

Python: edge length distribution of a regular network

落花浮王杯 提交于 2019-12-12 02:37:13
问题 I am working with an NxN regular network and I want to plot its edge length distribution . This is how I generate the network: import networkx as nx import matplotlib.pyplot as plt N=30 #This can be changed G=nx.grid_2d_graph(N,N) pos = dict( (n, n) for n in G.nodes() ) labels = dict( ((i, j), i + (N-1-j) * N ) for i, j in G.nodes() ) nx.relabel_nodes(G,labels,False) inds=labels.keys() vals=labels.values() inds.sort() vals.sort() pos2=dict(zip(vals,inds)) nx.draw_networkx(G, pos=pos2, with

Enumerating distibutions

时光总嘲笑我的痴心妄想 提交于 2019-12-12 02:02:54
问题 I'm trying to create a text file with every possible distribution of 100% into n containers? So that for 4 containers, it would look something like this: 0.97, 0.01, 0.01, 0.01 0.96, 0.01, 0.01, 0.02 0.96, 0.01, 0.02, 0.01 0.96, 0.02, 0.01, 0.01 ... Any ideas on a good way to accomplish this? 回答1: Based on your response in the comments above, here's a recursive solution in Ruby: $resolution = 100 $res_f = $resolution.to_f def allocate(remainder, bin_number, all_bin_values, number_of_bins) if