Questions tagged [mean]

The arithmetic mean (or simply the mean or average when the context is clear) is the central tendency of a collection of numbers. The mean is calculated as the sum of the numbers divided by the size of the collection.

The arithmetic mean, or simply the mean or when the context is clear, is the central tendency of a collection of numbers. The mean is calculated as the sum of the numbers divided by the size of the collection. Besides the arithmetic mean, the geometric mean and the harmonic mean can be calculated as well.

Means apply an equal weight to every member of a collection of numbers. This feature makes means not robust to outlier members. cf.

Source: Wikipedia

3925 questions
1
vote
1 answer

can not retrieve property of object from an objectID passed by html form

I am using the mean stack (mongo/mongoose, ember, angular, node). The database includes 2 schemas var ChildSchema = new Schema({ childName: { type: String, required: true, trim: true } }); var ParentSchema = new…
john Beast
  • 13
  • 2
1
vote
1 answer

How to delete some of the mean weekly values calculated by pandas (.resample)?

I have a data set and needs to calculate daily average and weekly average. I know this can be done by Pandas. Below is the data and code that I have till now; date T1 T2 T3 12/17/13 00:28:38 19 23.1 7.3 12/17/13…
Muhammad
  • 305
  • 2
  • 6
  • 20
1
vote
2 answers

trying to display name angular

I'm still trying to learn angular JS and I am having trouble displaying the user I've just entered into the database to display on the next partial. I am able to display the other users but the data returned to me just after the user added just…
1
vote
0 answers

Mongoose retrieve key value pairs

I'm using the MEAN stack to write a web app for an existing project. The project has several MongoDB collections including one that looks like this: { "_id" : ObjectId("553a75a7e4b092e5edad4bce"), "currentMessage" :…
1
vote
1 answer

calculation performance for mean2 in MATLAB

Why the straight implementation of the mean function is faster? Ig = rgb2gray(imread('test.png')); n = 100000; tic; for ii=1:n M1 = sum(sum(Ig))/numel(Ig); end toc tic; for ii=1:n M2 = mean2(Ig); end toc around n = 1000, still mean2 is…
NKN
  • 6,482
  • 6
  • 36
  • 55
1
vote
2 answers

Conditional cumulative mean for each group in R

I have a data set that looks like this: id a b 1 AA 2 1 AB 5 1 AA 1 2 AB 2 2 AB 4 3 AB 4 3 AB 3 3 AA 1 I need to calculate the cumulative mean for each record within each group and excluding the case where a ==…
Dheeraj Singh
  • 715
  • 1
  • 12
  • 24
1
vote
2 answers

Data mean by intervals in IDL

I did the following script to integrate (average) data by intervals in python: # N = points to mean in the array # data = original data # data_mean = average data each N points data_mean = np.array([np.mean(i) for i in np.array_split(data,…
nandhos
  • 681
  • 2
  • 16
  • 31
1
vote
3 answers

ng-click is not working if the element is generated by directive

I am creating a directive in angularJS which will replace my custom element with some elements (pagination), the elements which are generated by the directive has ng-click attribute and the value of ng-click attribute is the function of controller…
Dau
  • 8,578
  • 4
  • 23
  • 48
1
vote
0 answers

Applying MEAN() to a group from DF

I have a large dataframe representing scores of products belonging to various product groups. I need to: Group all rows by beer_style For each beer_style calculate the mean of that style For each beer_style: subtract the mean for this specific…
Toly
  • 2,981
  • 8
  • 25
  • 35
1
vote
0 answers

Change color of histogram bars based on mean values of another variable

I have my code as below, which express how make histogram of variable 1 with density. I want to put color in each bin based on mean value of variable 2 in each bin. One more thing, how can I handle NA to put mean value of variable 1 as a line in the…
user2928318
  • 549
  • 3
  • 7
  • 20
1
vote
0 answers

How can i use mean.js without MongoDB

I didn't want to use mongodb in mean.js how can deploy it. Or it must be use?
ronchi
  • 41
  • 5
1
vote
1 answer

How to calculate % difference between numbers by index in ngRepeat

I have a simple table which displays data objects, with one of the properties of the data objects being numbers. Here's my table with ngRepeat: {{ $index }} {{ number.num }} …
Nick D.
  • 11
  • 3
1
vote
2 answers

Official pattern MEAN for JetBrains

In webstorm I really like the template nodejs + expressjs. And I was very upset when I learned that there is no MEAN. So I want to ask - does JetBrains template MEAN? If not, which of the best generators?
oei
  • 571
  • 1
  • 5
  • 16
1
vote
2 answers

R apply mean for numerical columns and majority vote on categorical

Assume following table Name Gender Place Age V1 Tom M NY 24 A Nadia F AT 22 A Alex M DE 42 B Jodie F OH 18 B Tom M NY 28 B Alex F ID 32 B Nadia F AT 34 …
1
vote
1 answer

Best way to calculate means within a MATLAB array based on other values in the array?

I have a MATLAB double array that looks like this: YEAR QUARTER ID VAR1 VAR2 2000 1 1 50 20 2000 1 2 20 34 2000 2 1 43 33 It goes on for many years and many quarters, and the number of rows in…
1 2 3
99
100