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

Pushing values into Mongodb model in Nodejs

HI I am using MEAN stack with two data models that are interrelated: Post and Comment So in my PostSchema I have comments:{ type:mongoose.Schema.Types.ObjectId, ref:'Comment' and in my CommentSchema I have post:{ …
A Allen
  • 273
  • 1
  • 4
  • 12
1
vote
2 answers

getting average mean for each period in a ffdf object in R

I have an ffdf object called 'group1' that has a million rows of data that looks like this: Location DateandTime Reading Group 1 1 01/01/2012 00:00:00 0.8 1 2 1 …
Clover
  • 63
  • 5
1
vote
1 answer

Is it possible to compare a data set with a published mean and standard deviation?

Is it possible to compare a data set with a published mean and standard deviation? To be more precise: I have a data set of a clinical trial. I want to compare my data with published data from the literature, where you generally find n, mean and…
Chris
  • 327
  • 3
  • 11
1
vote
0 answers

PassportJS get user by connect.sid

I have a website using PassportJS to handle the authentication. I'd like to keep user logged in during page refreshing, how can I get the user instance by a given connect.sid stored in the cookie? Is this the best practice by doing this?
asir6
  • 584
  • 6
  • 14
1
vote
2 answers

error: uncaughtException: require(...).invokeRolesPolicies is not a function

I am using MEAN.JS for developing a web app, but for some reason after I made few changes, well mostly copied and paste new modules into the app I see the error as below: error: uncaughtException: require(...).invokeRolesPolicies is not a…
Lulzim Fazlija
  • 865
  • 2
  • 16
  • 37
1
vote
1 answer

private chat using socket.io in MEAN app

i am trying to include chat features on my MEAN app, all i have completed till now is a medium where all connected users can communicate.not a separate group. i follow some of the tutorials but they do by trick like sending some key words in front…
kisor
  • 464
  • 5
  • 22
1
vote
1 answer

aggregate function produces daily instead of hourly mean

I have a data.frame with 15 minute time steps in the first column and 16 more columns full of data. I want to get the hourly mean for each column. I am using aggregate and it works perfectly fine for 1 min data. mydata <- list() for(j in…
BallerNacken
  • 305
  • 7
  • 16
1
vote
2 answers

Calculating mean or median in one function in numpy

I have function that is supposed to compute, depending on user input, either the mean or median of a numpy.array. I have written it like this import numpy as np ... if input=='means': return np.mean(matrix, axis=1) if input=='median': …
patrick
  • 4,455
  • 6
  • 44
  • 61
1
vote
1 answer

Mongodb find() don't work

Why dosen't db.find work? The console.log gets undefined... var course = (db.courses.find({ _id: mongo.helper.toObjectID(param.course)})); console.log(course.body)
sacan
  • 47
  • 7
1
vote
1 answer

compare and diff between jade template and mustache template

i am beginner in java script and familiar with client developing in low level. my question is this that what main diff between jade template engine and mustache template? both of them is for nodejs server side or use in client side? what advantage…
sajjad
  • 646
  • 1
  • 9
  • 20
1
vote
0 answers

MEAN io module not working properly

I am new in mean stack and i am creating module. My module is not working properly,some time it works and some time not. I dont understand what i am doing wrong. packages/custom/settings/public/routes/settings.js 'use strict'; //Setting up…
Vikram Pote
  • 5,433
  • 4
  • 33
  • 37
1
vote
2 answers

remove by _id in mongodb doesn't work

I originally thought it would be really simple to create an delete function to use with my mongodb but am unable to get it to work and haven't been able to find a solution on google or SO. I'm creating an application using the MEAN stack that uses…
Johanna
  • 51
  • 2
  • 8
1
vote
1 answer

Calculate average of a time period (from another dataset) per location in r

I would like to calculate the average burninghours (burningshours$hours_burned) for the time period between ds$date_fixed and ds$date_broken. I know I can calculate this by using the code below: ds$average_burninghours <- sapply…
Mini
  • 67
  • 3
1
vote
2 answers

Calculate mean difference per row and per group

I have a data.frame with many rows and columns and I want to calculate the mean difference of each value to each of the other values within a group. Here an example: ID value 1 4 1 5 1 7 2 8 2 6 2 5 2 6 This is…
jranzijn
  • 31
  • 7
1
vote
2 answers

Average varying block sizes in excel

I need some help calculating an average of the center of a number of polygons. I have coordinates for their corners in excel. Most polygons have 4 corners, but not all. Screenshot: Screenshot from excel Columns E and F contains the coordinates and…