统计CSDN流量与排名关系—设计拐点

背景

目前有13W历史浏览量、排名13W。今年的okr怎么定呢?思路是看看csdn整体的数据情况。取了两个关键指标:排名、浏览量。

统计脚本与数据分析

import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import numpy as np
from scipy import log

#step1:统计数据
x=np.array([1, 2, 3, 1122, 10000, 30000, 50000, 210000])	#CSDN排名
y=np.array([1975, 1054, 938, 175, 13, 13, 5, 0.23])			#CSD访问流量

#step2:拟合
#多项式拟合
def fit_poly():
	f=np.polyfit(x, y, 4)
	f_poly = np.poly1d(f)
	y_fit_poly =f_poly(x)
	return y_fit_poly
#幂数拟合
def fit_power():
	def alpha(x, a, b):
		return a*np.exp(-b/x)
	popt, pcov = curve_fit(alpha, x, y)
	a=popt[0]
	b=popt[1]
	return alpha(x, a, b)
#指数拟合
def fit_exp():
	def alpha(x, a, b):
		return x**a+b
	popt, pcov = curve_fit(alpha, x, y)
	a=popt[0]
	b=popt[1]
	return alpha(x, a, b)
#对数拟合
def fit_log():
	def alpha(x, a, b):
		return a*log(x)+b
	popt, pcov = curve_fit(alpha, x, y)
	a=popt[0]
	b=popt[1]
	return alpha(x, a, b)

#step3:绘图
y_fit = fit_poly()
data_origin = plt.plot(x, y, '*', label = 'orgin')
data_fit = plt.plot(x, y_fit, 'r', label = 'ployfit')
plt.xlabel('flow')
plt.ylabel('rank')
plt.legend(loc=4) #指定legend的位置右下角
plt.title('polyfitting')
plt.show()

多项式拟合(poly)

幂数拟合(power)

拐点(1000,240W)

扫描二维码关注公众号,回复: 9121715 查看本文章

对数拟合(Log)

拐点(30000,12W),(10000,150W),(1000,420W)

博客浏览量的爆发点

从上边的数据来看,排名与流量更符合对数关系。1W排名、150W流览量是比较好的一个最近拐点

今年可达一半、即取中点比较理想:(3W,13W) -> (2W, 80W) -> (1W, 150W)。(80-13) * 10000) / 365 = 1800,

拆解至每天的策略即:每天新增1800流览量




发布了137 篇原创文章 · 获赞 275 · 访问量 13万+

猜你喜欢

转载自blog.csdn.net/Ture010Love/article/details/104261111
今日推荐