Questions tagged [weighted-average]

The weighted average or weighted mean is similar to an arithmetic mean where instead of each of the data points contributing equally to the final average, some data points contribute more than others.

If all the weights are equal, then the weighted mean is the same as the arithmetic mean.

The mathematical expression for the weighted average is

enter image description here

Read more here

476 questions
0
votes
2 answers

How do I calculate the importance/weight of input based on users reputation?

I have a couple systems which contain a users' table along with some form of karma/weight/reputation. Sometimes it's the number of posts a user has made, sometimes it's the number of up/down votes a user has received across all their activity on the…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
0
votes
1 answer

Weighted vote handling for RDBMS

I have three tables in my RDBMS (most often MySQL or Postgresql) which I want to use when calculating votes. The first is a user table where users have different levels of pull (weight), the second is a table which records their vote on an item, and…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
0
votes
1 answer

Edge weight calculation based on real traffic street data

I am currently developing a navigation system in android and I am using dijkstra's shortest path algorithm My Vertex class contains members as shown below: ------------------------------------- | Vertex …
0
votes
1 answer

If statement for weighted averaged in R

I have a data file that is several million lines long, and contains information from many groups. Below is an abbreviated section: MARKER GROUP1_A1 GROUP1_A2 GROUP1_FREQ GROUP1_N GROUP2_A1 GROUP2_A2 GROUP2_FREQ GROUP2_N rs10 A C…
mfk534
  • 719
  • 1
  • 9
  • 21
-1
votes
4 answers

SQL - apply single value to all rows in table

I have two tables - one called "customer_data" and one called "weighted_average_rate_charged". Customer_data First Name Last…
st87_top
  • 57
  • 1
  • 1
  • 7
-1
votes
1 answer

Distribute number between two groups with different weights

I have two groups of technicians I need to distribute a total number of service tickets to. The total number of techs is 17, with 10 being "normal" techs, and 7 being "specialized" techs. The 7 specialized techs only get assigned half of the amount…
Tydis
  • 65
  • 1
  • 2
  • 9
-1
votes
1 answer

Ensemble stacking model... with different inputs (molecular Fingerprint) in one type of keras model

I am CHEMIST and still learning ML... I have trained 7 different models with keras using different types of molecular fingerprints as features to predict a property...however the accuracy was not that good. So using a tutorial i found online def…
-1
votes
2 answers

Obtain data in the desired format

I am a bit new to Python and I have the following requirement. Value Date Ticket Source Result 0.939531371 3/1/2018 T1 Source1 1 0.951619897 3/1/2018 T2 Source1 1 0.952681914 3/1/2018 T3 Source1 0 0.957009407 3/1/2018 T4…
-1
votes
1 answer

How do I derive weights given a weighted average?

Ok I feel like this has to have a simple solution but I can't for the life of me figure it out. I have a given weighted average, let's say total returns of a portfolio. And I want to break that out into returns from equity and returns from bonds. …
-1
votes
2 answers

Applying weights to a dataframe and rescaling them in R

I have a dataframe in R that looks like this: And then another weights dataframe that looks like this: What I want to do is apply the weights to the dataframe - which is fairly simple and I can do it by using the following code: dataframe$month <-…
Jay J
  • 155
  • 1
  • 12
-1
votes
1 answer

Matlab: weighted average of data points

I have a plot in Matlab where the data points (15 of them) are located with different distances between each other. I have an interval (5 data points, nr 6 to 10) almost in the middle where the data points are a bit closer to each other and where I…
nilz
  • 1
  • 1
-1
votes
2 answers

Small numerical error when calculating Weight Average

Here is a part in a Physics engine. The simplified function centerOfMass calculates 1D-center-of-mass of two rigid bodies (demo) :- #include #include float centerOfMass(float pos1,float m1, float pos2,float m2){ return…
cppBeginner
  • 1,114
  • 9
  • 27
-1
votes
1 answer

Should I use Weighted Average vs Arithmetic Average in my data?

Should I use weighted average vs arithmetic average in my data? Columns(Month, Bookings, Day, Bookings/Day) Should I do Bookings/Days OR Avg(Bookings/day) to get average by month?
Sam Ali
  • 1
  • 3
-1
votes
1 answer

Moving Window Sum product Calculation Python

I have the following lists: a= [1,2,3,4,5,6,7,8,9,10,11,12] wts= [0.055555556,0.055555556,0.055555556,0.055555556,0.055555556,0.055555556,0.055555556,0.055555556,0.055555556,0.10,0.10,0.30] The Desired result is result =…
ceeka9388
  • 69
  • 8
-1
votes
1 answer

Weighted Rank in SAS

I have a table with different scores for R60,R90,R120,R150,R180 and how can I make one table with a weighted rank based on this five variables, and CODE_RAC where NORM_PCT has 40% weightage, RB_PCT has 30% weightage and RB_PCT has 40% weightage…
SUBHRA SANKHA
  • 118
  • 1
  • 2
  • 11
1 2 3
31
32