Calculate average rating [closed] - average

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Can any one tell me how to calculate rating average?

I interpret rating average as the average of a set of ratings.
In that case you simply compute
sum_of_all_ratings
rating_average = ------------------
number_of_ratings

I recommend this
example :
Ordinary average : (a+b+c....z)/(number_added_items)
Rating average : (va*a + vb*b + vc*c... +vz*z)/(number_added_items)
In the first case you could say that the weight for each item is 1 as all items have the same weight in the calculation, while in the second case weights differ)
In your case the weight for each rating vote might depend on the voter so let's say a highly rated voter has a ponder for 3 his vote while a novice has 1.If 3 novices vote for an answer the rating of that answer will be (1*1+1*1+1*1)/(3) = 1 while if 2 high voters and a novice vote for an answer the average will be 3*1+3*1+1*1/3 = 2.33.
Does this answer your question? otherwise please be more explicit.

Related

How to do actions based on numbers [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am trying to make a shop in my game. I have a label that updates dynamically for the
amount of money the player has. My issue is that I need to figure out some type of if
statement so if the player has enough money, do x. If not, do y. My label with the money is
cash Amount. If someone could help me write an if statement with lines for if the player has
enough money and if they don't, I would be very thankful. Thanks so much!
Let we say X = 250
players money = Y
if (Y>=X) {
//then your player have enough money
//do your x here
} else {
//then your player does not have enough money
//do your y here
}
I am assuming that the problem that you are having is that you don't know how to determine what the amount in the label is.
If so, all you have to do is convert it into an integer as so:
int val = [cashAmount.text intValue];
and then use that val to determine whether or not the player has enough.

All possible combinations of words with given set of words [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a given set of alphabets say 11 letters. I want to find all possible word combinations of specific length say 5. These are numbers are dynamic. It doesn't matter to me if the resulted words do have a meaning or not.
Can someone please provide me with this kind of code or algo to follow. Or guide me right direction.
Thanks
This algorithm is a permutation. A relatively easy way is to use recursion to solve it.
Read this SO Question:
Sequence combinations of varying length using two 'alphabets'
Read "UPDATE 2:" in this question there he post his working code
All the best

Divide line in multiple segments [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Let's say I want to divide timeline in linearly growing chops ranging from 1" (starting value) to 10" (end value). If the sum is given (e.g. 120") I would like to know the value of each segment.
How do I calcutlate that in matlab?
Thank you!
Use the linspace() function, which is for exactly this purpose.

How to explain this following code? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
can you explain me about this following code?? when the size newRowB (1,12), this code cannot work?
~any(diff([0;find(newRowB);12+1])>3));
thanks before
diff calculates the difference between the successive terms of the given input vector.
and
find locates elements of array X that are non-zero

Calculate the numbers in Scala [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I can calculate the expressions, and term but I don't understand what is tregonometric functions. Are they Expressions or Terms or Items? How to write the algorithm of calculation of Pi and tregonometric functions. Cos, sin....
Please if you know give me a hint.
Try a web search again, this time using the correct spelling "trigonometric functions". Algorithms for calculations like this date back at least to ancient Greece and you'll find them in a great many maths textbooks.
I suggest you try to do your own homework, then (and only then) come back to stack overflow if you have some particular issue with Scala syntax that prevents you from implementing your chosen algorithm. In the meantime, this isn't a proper or valid question.