2015-06-23 115 views
-2

我想要的是瞭解星級評分的工作原理。我不明白它的邏輯。星級評分系統如何工作?

例子:

5 star - 300 people 
4 star - 45 people 
3 star - 100 people 
2 star - 99 people 
1 star - 10 people 

的554人

我想這些票數轉換爲百分比,並計算所有的它獲得的平均

5 star - 40% (300 people) 
4 star - 10% (45 people) 
3 star - 21% (100 people) 
2 star - 20 % (99 people) 
1 star - 9% (10 people) 

一個總總計100%

I噸只是一個隨機百分比。這不是正確的答案。

我該如何做到這一點?我不認爲這是否是評級的正確過程。

+1

我沒有得到:你的問題是關於數學算法還是關於如何開發? –

+0

這不是一個編程問題。這只是數學。 300/554人投票5星。這意味着54,15%的選民對這5星評價。等其他評分 –

+0

是什麼問題? – FeedTheWeb

回答

0

首先得到總共沒有人投票。

並使用此功能顯示百分比。

star percentage = star total people vote * 100/total no of people vote. 

例如,如果你想獲得5星級率百分比然後

5星級百分比= 300 *554分之100

0

只是一些基本的數學。

Sum: 300 + 45 + 100 + 99 + 10 = 554 Votes 

Percentage by rating: 
5 Star: (300/554) * 100 = 54,15162455% 
4 Star: (45/554) * 100 = 8,122743682% 
3 Star: (100/554) * 100 = 18,05054152% 
2 Star: (99/554) * 100 = 17,8700361% 
1 Star: (10/554) * 100 = 1,805054152% 

Average: 
(5*300) + (4*45) + (3*100) + (2*99) + (1*10) = 2188 
2118/554 = 3,949458484 stars 
4

我很困惑問題是什麼?

但是首先一些數學:

5 star - 300 people 
4 star - 45 people 
3 star - 100 people 
2 star - 99 people 
1 star - 10 people 

的554人

我們可以很容易地計算出百分比投票分佈stars總,讓我們檢查單位:

[count of people]/[total of people] => ratio of people 
ratio of x * 100 => % of x 

i.e: 
(300/554) * 100 = 54.1516245487 % of people 

並計算由於四捨五入所有

5 star - 300 people - 54.15 % of votes 
4 star - 45 people - 8.12 % of votes 
3 star - 100 people - 18.05 % of votes 
2 star - 99 people - 17.87 % of votes 
1 star - 10 people - 1.80 % of votes 

錯誤:100 - (總和(%)= 99.99)= 0.01因此,其確定以圓形的


然而,這也不是什麼數字你看起來像。 這可能是因爲你使用的代碼沒有顯示投票的人的百分比,而是顯示了投票應如何分配的估計值,而不是它們是如何分配的。

許多評級系統實際上會根據現有的分佈或不同文化間的選票來計算不同權重的選票。

我是丹麥人,所以我會使用該文化的參考,例如。 以丹麥農村爲例。 在這種文化中,沒有人實際使用率5或1,除非被評分的東西非常非常不好或不好。 事實上,它也更容易得到一個1比5 - 但如果你得到一個2或4,它不是「接近3」它實際上是非常糟糕的還是真的不錯..

丹麥城市你會得到更多的退出,並輕鬆地投票5的東西基本上是平庸的表現。因爲你有一個糟糕的一天,因此也是1。

因此,對於一個普通的,但好戲,(應率平均4),這將是兩個分佈:

農村:

5 stars - 1 people 
4 stars - 3 people 
3 stars - 10 people 
2 stars - 5 people 
1 stars - 1 people. 

城市:

5 stars - 4 people 
4 stars - 5 people 
3 stars - 5 people 
2 stars - 3 people 
1 stars - 3 people. 

通知文化差異清楚地顯示在這些彌補結果..

我不這樣做它的CA您可能想要閱讀以下內容: http://www.harzing.com/download/respstyles.pdf

因此,開發人員需要考慮評級應該補償哪種響應風格。

我可以很輕鬆地衡量農村選票,並讓1個敢於按5星的人獲得額外的體重,還可以讓投票3星的人獲得更少的威望。這將使這兩個結果看起來更相似,並且使城市居民更容易比較結果。

但是這實際上是正確的。 ? (選擇城市選票作爲常態,並修改其他選項以適合)相反的論點會是一樣的嗎?

在城市投票中權重減少5和1,另外還有3個,使農村人口看起來更具可比性?

-

你的情況似乎結果進行加權 我們無法看到的權重已經被發現,但我們可以從中扣除的東西。

權重:

5 star - 40%/54.15% ~= 0.74 
4 star - 10%/8.12% ~= 1.21 
3 star - 21%/18.05% ~= 1.16 
2 star - 20%/17.87% ~= 1.18 
1 star - 9%/1.8% ~= 5 

所以在這種情況下,一個負的表決被重視具有高權重,以及正表決,給出以下懷特。

我本來料想的是權重的總和等於1,但它們不是,所以這可能是手動微調評級結果的結果,某些期望的分佈(商業利益),或者可能是你的錯誤計算。