国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁 > news >正文

四川成都最新新聞事件今天深圳谷歌seo推廣

四川成都最新新聞事件今天,深圳谷歌seo推廣,wordpress自動升級失敗,如何做網(wǎng)站發(fā)布商品1 分位數(shù)Quantile 分位數(shù)(Quantile),亦稱分位點,是指將一個隨機變量的概率分布范圍分為幾個等份的數(shù)值點,常用的有中位數(shù)(即二分位數(shù))、四分位數(shù)、百分位數(shù)等。 2 常見各類分位數(shù) 2.1 二分位…

1 分位數(shù)Quantile

分位數(shù)(Quantile),亦稱分位點,是指將一個隨機變量的概率分布范圍分為幾個等份的數(shù)值點,常用的有中位數(shù)(即二分位數(shù))、四分位數(shù)、百分位數(shù)等。

2 常見各類分位數(shù)

2.1 二分位數(shù)

對于有限的數(shù)集,可以通過把所有觀察值高低排序后找出正中間的一個作為中位數(shù)。如果觀察值有偶數(shù)個,則中位數(shù)不唯一,通常取最中間的兩個數(shù)值的平均數(shù)作為中位數(shù),即二分位數(shù)。
一個數(shù)集中最多有一半的數(shù)值小于中位數(shù),也最多有一半的數(shù)值大于中位數(shù)。如果大于和小于中位數(shù)的數(shù)值個數(shù)均少于一半,那么數(shù)集中必有若干值等同于中位數(shù)。
計算有限個數(shù)的數(shù)據(jù)的二分位數(shù)的方法是:把所有的同類數(shù)據(jù)按照大小的順序排列。如果數(shù)據(jù)的個數(shù)是奇數(shù),則中間那個數(shù)據(jù)就是這群數(shù)據(jù)的中位數(shù);如果數(shù)據(jù)的個數(shù)是偶數(shù),則中間那2個數(shù)據(jù)的算術(shù)平均值就是這群數(shù)據(jù)的中位數(shù)。

2.2 四分位數(shù)

四分位數(shù)(Quartile)是統(tǒng)計學(xué)中分位數(shù)的一種,即把所有數(shù)值由小到大排列并分成四等份,處于三個分割點位置的數(shù)值就是四分位數(shù)。
1)第一四分位數(shù)(Q1),又稱“較小四分位數(shù)”,等于該樣本中所有數(shù)值由小到大排列后第25%的數(shù)字;
2)第二四分位數(shù)(Q2),又稱“中位數(shù)”,等于該樣本中所有數(shù)值由小到大排列后第50%的數(shù)字;
3)第三四分位數(shù)(Q3),又稱“較大四分位數(shù)”,等于該樣本中所有數(shù)值由小到大排列后第75%的數(shù)字。
第三四分位數(shù)與第一四分位數(shù)的差距又稱四分位距。

2.3 百分位數(shù)

百分位數(shù),統(tǒng)計學(xué)術(shù)語,如果將一組數(shù)據(jù)從小到大排序,并計算相應(yīng)的累計百分位,則某一百分位所對應(yīng)數(shù)據(jù)的值就稱為這一百分位的百分位數(shù)。運用在教育統(tǒng)計學(xué)中,例如表現(xiàn)測驗成績時,稱PR值。

3 分位數(shù)的應(yīng)用

分位數(shù)回歸思想的提出至今已經(jīng)有近30多年了,經(jīng)過這近30多年的發(fā)展,分位數(shù)回歸在理論和方法上都越來越成熟,并被廣泛應(yīng)用于多種學(xué)科中。它對于實際問題能提供更加全面的分析,無論是線性模型還是非線性模型,分位數(shù)回歸都是一種很好的工具,它對一般回歸模型做了有益的補充。

分位數(shù)回歸是對以古典條件均值模型為基礎(chǔ)的最小二乘法的延伸,它用幾個分位函數(shù)來估計整體模型。分位數(shù)回歸法的特殊情況就是中位數(shù)回歸(最小一乘回歸),用對稱權(quán)重解決殘差最小化問題,而其他條件分位數(shù)回歸則需要用非對稱權(quán)重解決殘差最小化 [2] 。

分位數(shù)回歸采用加權(quán)殘差絕對值之和的方法估計參數(shù),其優(yōu)點體現(xiàn)在以下幾方面:首先,它對模型中的隨機擾動項不需做任何分布的假定,這樣整個回歸模型就具有很強的穩(wěn)健性;其次,分位數(shù)回歸本身沒有使用一個連接函數(shù)來描述因變量的均值和方差的相互關(guān)系,因此分位數(shù)回歸有著比較好的彈性性質(zhì);第三,分位數(shù)回歸由于是對所有分位數(shù)進行回歸,因此對于數(shù)據(jù)中出現(xiàn)的異常點具有耐抗性;第四,不同于普通的最小二乘回歸,分位數(shù)回歸對于因變量具有單調(diào)變換性;最后,分位數(shù)回歸估計出來的參數(shù)具有在大樣本理論下的漸進優(yōu)良性。

4 計算分位數(shù)的C#源程序

using System;

namespace Legalsoft.Truffer
{
? ? /// <summary>
? ? /// Object for estimating arbitrary quantile values?
? ? /// from a continuing stream of data values.
? ? /// </summary>
? ? public class IQagent
? ? {
? ? ? ? public const int nbuf = 1000;
? ? ? ? private int nq { get; set; }
? ? ? ? private int nt { get; set; }
? ? ? ? private int nd { get; set; }
? ? ? ? private double[] pval { get; set; }
? ? ? ? private double[] dbuf;
? ? ? ? private double[] qile { get; set; }
? ? ? ? private double q0 { get; set; }
? ? ? ? private double qm { get; set; }

? ? ? ? public IQagent()
? ? ? ? {
? ? ? ? ? ? this.nq = 251;
? ? ? ? ? ? this.nt = 0;
? ? ? ? ? ? this.nd = 0;
? ? ? ? ? ? this.pval = new double[nq];
? ? ? ? ? ? this.dbuf = new double[nbuf];
? ? ? ? ? ? this.qile = new double[nq];
? ? ? ? ? ? this.q0 = 1.0e99;
? ? ? ? ? ? this.qm = -1.0e99;

? ? ? ? ? ? for (int j = 85; j <= 165; j++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? pval[j] = (j - 75.0) / 100.0;
? ? ? ? ? ? }

? ? ? ? ? ? // Set general purpose array of p - values ranging from 1.0e-6 to 1~1.0e-6.
? ? ? ? ? ? // You can change this if you want.
? ? ? ? ? ? for (int j = 84; j >= 0; j--)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? pval[j] = 0.87191909 * pval[j + 1];
? ? ? ? ? ? ? ? pval[250 - j] = 1.0 - pval[j];
? ? ? ? ? ? }
? ? ? ? }

? ? ? ? /// <summary>
? ? ? ? /// Assimilate a new value from the stream.
? ? ? ? /// </summary>
? ? ? ? /// <param name="datum"></param>
? ? ? ? public void add(double datum)
? ? ? ? {
? ? ? ? ? ? dbuf[nd++] = datum;
? ? ? ? ? ? if (datum < q0)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? q0 = datum;
? ? ? ? ? ? }
? ? ? ? ? ? if (datum > qm)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? qm = datum;
? ? ? ? ? ? }
? ? ? ? ? ? if (nd == nbuf)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? update();
? ? ? ? ? ? }
? ? ? ? }

? ? ? ? /// <summary>
? ? ? ? /// Batch update.
? ? ? ? /// This function is called by add or report and should not be called directly
? ? ? ? /// by the user.
? ? ? ? /// </summary>
? ? ? ? public void update()
? ? ? ? {
? ? ? ? ? ? int jd = 0;
? ? ? ? ? ? int jq = 1;
? ? ? ? ? ? double told = 0.0;
? ? ? ? ? ? double tnew = 0.0;
? ? ? ? ? ? double[] newqile = new double[nq];

? ? ? ? ? ? Sorter.sort(dbuf, nd);

? ? ? ? ? ? double qold = q0;
? ? ? ? ? ? double qnew = q0;
? ? ? ? ? ? qile[0] = newqile[0] = q0;
? ? ? ? ? ? qile[nq - 1] = newqile[nq - 1] = qm;
? ? ? ? ? ? pval[0] = Math.Min(0.5 / (nt + nd), 0.5 * pval[1]);
? ? ? ? ? ? pval[nq - 1] = Math.Max(1.0 - 0.5 / (nt + nd), 0.5 * (1.0 + pval[nq - 2]));
? ? ? ? ? ? for (int iq = 1; iq < nq - 1; iq++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? double target = (nt + nd) * pval[iq];
? ? ? ? ? ? ? ? if (tnew < target)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? for (; ; )
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? if (jq < nq && (jd >= nd || qile[jq] < dbuf[jd]))
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? qnew = qile[jq];
? ? ? ? ? ? ? ? ? ? ? ? ? ? tnew = jd + nt * pval[jq++];
? ? ? ? ? ? ? ? ? ? ? ? ? ? if (tnew >= target)
? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? qnew = dbuf[jd];
? ? ? ? ? ? ? ? ? ? ? ? ? ? tnew = told;
? ? ? ? ? ? ? ? ? ? ? ? ? ? if (qile[jq] > qile[jq - 1])
? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tnew += nt * (pval[jq] - pval[jq - 1]) * (qnew - qold) / (qile[jq] - qile[jq - 1]);
? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? ? ? jd++;
? ? ? ? ? ? ? ? ? ? ? ? ? ? if (tnew >= target)
? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? ? ? told = tnew++;
? ? ? ? ? ? ? ? ? ? ? ? ? ? qold = qnew;
? ? ? ? ? ? ? ? ? ? ? ? ? ? if (tnew >= target)
? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? told = tnew;
? ? ? ? ? ? ? ? ? ? ? ? qold = qnew;
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? //if (tnew == told)
? ? ? ? ? ? ? ? if (Math.Abs(tnew - told) <= float.Epsilon)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? newqile[iq] = 0.5 * (qold + qnew);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? newqile[iq] = qold + (qnew - qold) * (target - told) / (tnew - told);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? told = tnew;
? ? ? ? ? ? ? ? qold = qnew;
? ? ? ? ? ? }
? ? ? ? ? ? // qile = newqile;
? ? ? ? ? ? qile = Globals.CopyFrom(newqile);
? ? ? ? ? ? nt += nd;
? ? ? ? ? ? nd = 0;
? ? ? ? }

? ? ? ? /// <summary>
? ? ? ? /// Return estimated p-quantile for?
? ? ? ? /// the data seen so far. (E.g., p D 0:5 for median.)
? ? ? ? /// </summary>
? ? ? ? /// <param name="p"></param>
? ? ? ? /// <returns></returns>
? ? ? ? public double report(double p)
? ? ? ? {
? ? ? ? ? ? if (nd > 0)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? update();
? ? ? ? ? ? }
? ? ? ? ? ? int jl = 0;
? ? ? ? ? ? int jh = nq - 1;
? ? ? ? ? ? int j;
? ? ? ? ? ? while (jh - jl > 1)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? j = (jh + jl) >> 1;
? ? ? ? ? ? ? ? if (p > pval[j])
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? jl = j;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? jh = j;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? j = jl;
? ? ? ? ? ? double q = qile[j] + (qile[j + 1] - qile[j]) * (p - pval[j]) / (pval[j + 1] - pval[j]);
? ? ? ? ? ? return Math.Max(qile[0], Math.Min(qile[nq - 1], q));
? ? ? ? }
? ? }
}
?

http://aloenet.com.cn/news/45940.html

相關(guān)文章:

  • 自己的服務(wù)器做網(wǎng)站優(yōu)速網(wǎng)站建設(shè)優(yōu)化seo
  • web app 和網(wǎng)站的區(qū)別企業(yè)郵箱賬號
  • 定制做網(wǎng)站百度網(wǎng)絡(luò)科技有限公司
  • 免費做網(wǎng)站的網(wǎng)址有哪些網(wǎng)絡(luò)整合營銷4i原則
  • 微信小網(wǎng)站怎么做百度競價廣告推廣
  • 盱眙在仕德偉做網(wǎng)站的有幾家如何進行品牌營銷
  • 焦作市網(wǎng)站建設(shè)科技推廣方法有哪幾種
  • 寧波外貿(mào)網(wǎng)站推廣今日頭條重大消息
  • 網(wǎng)站建設(shè)需要哪些技能天津seo顧問
  • ecshop源碼南京seo報價
  • 鄭州網(wǎng)站高端設(shè)計百度網(wǎng)站打不開
  • 動態(tài)網(wǎng)站開發(fā)教案xp優(yōu)化大師
  • 網(wǎng)站建設(shè)付款方式河南百度seo
  • 百度推廣網(wǎng)站怎么做網(wǎng)站策劃方案案例
  • asp網(wǎng)站建設(shè)下載青島百度推廣seo價格
  • 必應(yīng)網(wǎng)站收錄在哪seo推廣顧問
  • 做網(wǎng)站用模板百度競價廣告怎么投放
  • 做移動互聯(lián)網(wǎng)站點哪些店鋪適合交換友情鏈接
  • 網(wǎng)站專題模板下載上海優(yōu)化網(wǎng)站公司哪家好
  • 建網(wǎng)站怎么做報分系統(tǒng)網(wǎng)絡(luò)推廣公司有多少家
  • 怎樣做校園網(wǎng)站推廣手游推廣渠道和推廣方式
  • 海南省人民政府網(wǎng)站官網(wǎng)寧波百度快照優(yōu)化排名
  • 17素材網(wǎng)官網(wǎng)蘇州seo
  • 公安局網(wǎng)站建設(shè)營銷策略
  • 社交網(wǎng)站建設(shè)教程愛網(wǎng)
  • 南陽專業(yè)做網(wǎng)站公司seo技術(shù)培訓(xùn)茂名
  • 做網(wǎng)站老師全自動引流推廣軟件下載
  • 如何在公司服務(wù)器建個內(nèi)部 網(wǎng)站網(wǎng)站結(jié)構(gòu)
  • seopc流量排名網(wǎng)站百度詞條優(yōu)化工作
  • 河南省住房和城鄉(xiāng)建設(shè)廳官方網(wǎng)站海外廣告優(yōu)化師