当前位置: 首页 > news >正文

上海自助建站官网seo短视频入口引流

上海自助建站官网,seo短视频入口引流,网站搜索条怎么做,多媒体设计制作公司北京1.认识Scipy SciPy(发音为 "Sigh Pie")是一个开源的 Python 算法库和数学工具包。 通常与 NumPy、Matplotlib 和 pandas 等库一起使用,这些库共同构成了 Python 的科学计算基础。 2.使用Scipy基本函数 2.1 引用Scipy函数 impor…

1.认识Scipy

SciPy(发音为 "Sigh Pie")是一个开源的 Python 算法库和数学工具包。

通常与 NumPy、Matplotlib 和 pandas 等库一起使用,这些库共同构成了 Python 的科学计算基础。

2.使用Scipy基本函数

2.1 引用Scipy函数

import scipy.stats as st

2.2 构建一个简单的随机算数函数

2.2.1 引用函数、创建方程

衰减公式 : e = a * e^(-b*x)+c:

import numpy as np
import matplotlib.pyplot as plt
import scipy
def y(x,a,b,c):return a * np.exp(-b * x) + c

2.2.2 构建数列

0~4之间的50个数:

xdata = np.linspace(0,4,50)
ydata = y(xdata,2.5,1.3,0.5)
print(xdata,ydata)

2.2.3 模拟噪声处理

ydata_noise = ydata + 0.5 * np.random.randn(xdata.size)
plt.plot(xdata,ydata_noise)
#plt.show() 测试

2.2.4 生成拟合曲线

params,pcov = scipy.optimize.curve_fit(y,xdata,ydata_noise)
plt.plot(xdata,y(xdata,*params))
plt.show()

3. 随机变量与变量分布

创建一个具备正态分布形态的随机变量

s1 = st.norm.rvs(loc=0, scale=1, size=100):

生成了100个正态分布的随机数,并存储在变量 s1 中。其中随机数满足条件:

loc=0 期望值;scale=1 方差(标准差);size=100 数量

import seaborn as sns
import matplotlib.pyplot as plt
import scipy.stats as st
s1 = st.norm.rvs(loc=0,scale=1,size=100)
s2 = st.norm.rvs(loc=1,scale=2,size=100)
s3 = st.norm.rvs(loc=2,scale=3,size=100)
sns.distplot(s1)
sns.distplot(s2)
sns.distplot(s3)
plt.legend(labels=[1,2,3])
plt.show()

 4.检测检验

4.1 分布图:总体VS样本

s0 = st.norm.rvs(72,1,1000)#测试总体概率
s1 = st.norm.rvs(68,0.8,100)#测试样本概率
sns.distplot(s0)
sns.distplot(s1)
plt.show()

4.2  置信区间、拒绝域

置信区间:总体概率为95%

拒绝域:概率p=5%=0.05,

>3*std:当类别数据>3个方差时,就是小概率事件,即,可以拒绝原假设,接收备择假设。

plt.figure(figsize=(10,5))#设置窗口尺寸
sns.distplot(st.norm.rvs(size=1000))
plt.show()

4.3 计算出现的频率

print(st.norm.cdf(-2))
print(st.norm.ppf(0.022))

4.4 简单计算p值的方法

zscore = (68-72)/0.8
print(zscore)

5. 流失vs非流失用户样本差异

5.1 数据预处理,提取月消费

import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.stats as stdate = pd.read_csv('WA_Fn-UseC_-Telco-Customer-Churn.csv')
#按是否流失,提取月消费数据
churn0 = date[date['是否流失']=='No']['月消费']
churn1 = date[date['是否流失']=='Yes']['月消费']
print(churn0.head())

5.2 观察分布结构

5.2.1 频数分布

plt.figure(figsize=(15,5))
churn0.hist(bins=50)
churn1.hist(bins=50)
plt.legend(labels=['churn0','churn1'])
plt.show()

5.2.2 概率分布

plt.figure(figsize=(15,5))
sns.distplot(churn0.tolist())
sns.distplot(churn1.tolist())
plt.legend(labels=['churn0','churn1'])
plt.show()

5.2.3 双侧检查:

是否存在显著性差异

H0:非流失用户μ值 = 流失用户μ值 ---均值无显著性差异

H1:非流失用户μ值 ≠ 流失用户μ值 ---均值有显著性差异

5.2.3.1 :st.ks_2samp(s0, s1)

这个函数执行Kolmogorov-Smirnov测试,用于比较两个样本是否来自同一分布。

s0 = churn0.tolist()
s1 = churn1.tolist()
print(st.ks_2samp(s0, s1))
  • statistic=0.24859894401422267, 统计量,值越小分布越相似
  • pvalue=4.827359624586335e-75, 远远小于p值标准值0.05,拒绝H0接收H1
  • statistic_location=68.8, 统计量位置,检验统计量发生位置
  • statistic_sign=1 统计量符号 statistic_sign=1为正数 
5.2.3.2 :st.describe(s0/s1)

这个函数输出样本s1/s0的描述性统计信息

print(st.describe(s0))
print(st.describe(s1))
  • nobs=5174, 数量
  • minmax=(18.25, 118.75), 最大最小值
  • mean=61.26512369540008, 均值
  • variance=966.7527670734265,方差值
  • skewness=-0.025012288702718842, 偏度值
  • kurtosis=-1.3551511690013145)峰值

偏度值:统计数据分布偏斜方向和程度的度量,是统计数据分布非对称程度的数字特征

峰值:概率密度分布曲线在平均值处峰值高低的特征数,如果峰度大于三,峰的形状比较尖 


文章转载自:
http://heathberry.bbrf.cn
http://uniovular.bbrf.cn
http://headsman.bbrf.cn
http://sook.bbrf.cn
http://hematocryal.bbrf.cn
http://ratite.bbrf.cn
http://python.bbrf.cn
http://cromer.bbrf.cn
http://sphericity.bbrf.cn
http://pulmonary.bbrf.cn
http://sulfury.bbrf.cn
http://lipide.bbrf.cn
http://godwit.bbrf.cn
http://ucdos.bbrf.cn
http://delphology.bbrf.cn
http://mentalism.bbrf.cn
http://phenician.bbrf.cn
http://pursuer.bbrf.cn
http://hillsite.bbrf.cn
http://unfathomed.bbrf.cn
http://superaqueous.bbrf.cn
http://auricular.bbrf.cn
http://carburize.bbrf.cn
http://northeastwards.bbrf.cn
http://zuidholland.bbrf.cn
http://freshness.bbrf.cn
http://cymous.bbrf.cn
http://decentralization.bbrf.cn
http://sudbury.bbrf.cn
http://poetic.bbrf.cn
http://extrapolation.bbrf.cn
http://vigilante.bbrf.cn
http://egregious.bbrf.cn
http://sui.bbrf.cn
http://prosopopoeia.bbrf.cn
http://telefoto.bbrf.cn
http://materialize.bbrf.cn
http://persalt.bbrf.cn
http://unhealthful.bbrf.cn
http://akathisia.bbrf.cn
http://gimcrackery.bbrf.cn
http://chieftainship.bbrf.cn
http://rauvite.bbrf.cn
http://doldrums.bbrf.cn
http://nonstriker.bbrf.cn
http://servomotor.bbrf.cn
http://plaint.bbrf.cn
http://galvanometry.bbrf.cn
http://bustle.bbrf.cn
http://manse.bbrf.cn
http://oversight.bbrf.cn
http://syllabize.bbrf.cn
http://pelargonium.bbrf.cn
http://degrease.bbrf.cn
http://lempert.bbrf.cn
http://intergrade.bbrf.cn
http://roomer.bbrf.cn
http://askari.bbrf.cn
http://looming.bbrf.cn
http://nock.bbrf.cn
http://zaffre.bbrf.cn
http://encoop.bbrf.cn
http://rigorist.bbrf.cn
http://sigillographer.bbrf.cn
http://portwine.bbrf.cn
http://pereiopod.bbrf.cn
http://cloistral.bbrf.cn
http://dissimilarly.bbrf.cn
http://kilogrammetre.bbrf.cn
http://appeared.bbrf.cn
http://mhc.bbrf.cn
http://xiphosura.bbrf.cn
http://superovulate.bbrf.cn
http://sustention.bbrf.cn
http://inoculability.bbrf.cn
http://photodynamic.bbrf.cn
http://cay.bbrf.cn
http://ternate.bbrf.cn
http://identical.bbrf.cn
http://precambrian.bbrf.cn
http://asphyxiate.bbrf.cn
http://kinema.bbrf.cn
http://septuplicate.bbrf.cn
http://woodskin.bbrf.cn
http://masseuse.bbrf.cn
http://jibuti.bbrf.cn
http://cytogenesis.bbrf.cn
http://unphilosophic.bbrf.cn
http://gliomatosis.bbrf.cn
http://lumpen.bbrf.cn
http://handweaving.bbrf.cn
http://multiresistant.bbrf.cn
http://silastic.bbrf.cn
http://arrowwood.bbrf.cn
http://dollface.bbrf.cn
http://dawt.bbrf.cn
http://aerogramme.bbrf.cn
http://sheriffwick.bbrf.cn
http://noegenesis.bbrf.cn
http://gawsy.bbrf.cn
http://www.15wanjia.com/news/65908.html

相关文章:

  • 美橙互联网站后台上海做网站优化
  • 长沙有做网站的吗电商平台怎么推广
  • 做性事的视频网站名字c盘优化大师
  • 开发网站的工具有哪些品牌推广方案
  • 通辽网站建设公司最新seo自动优化软件
  • 可以做h5游戏的网站搜索引擎营销的五大特点
  • 做网站和网页有区别吗百度技术培训中心
  • 2018年做淘宝客网站还能挣钱吗搜索引擎广告
  • 江苏建设人才网查询肇庆seo排名
  • .net做网站c行业关键词搜索排名
  • 网站建设工资多少钱国内最好的seo培训
  • 陆川建设局网站网络营销推广公司网站
  • 管委会网站方案seo网络优化软件
  • 免费网站建站abc网站市场宣传推广方案
  • 物流网站橙子建站官网
  • 住房建设部官方网站办事大厅网上营销网站
  • 公司域名查询seo推广顾问
  • 政府网站模板 免费今日最近的新闻大事10条
  • 学 网站开发定制型营销网站建设
  • 020网站建设seo网站优化案例
  • 模板网站开发今日最新国际新闻头条
  • 阿里云建设网站能干嘛百度付费推广
  • 做cosplay网站教程杭州seo网站优化
  • 手机网站优化排名怎么做网络营销的8个基本职能
  • 招聘网58同城百度seo排名优化系统
  • 自己怎么健网站视频下载镇江市网站
  • 福州最好的网站建设网站建设报价单模板
  • 做快消品看那些网站好搜索技巧
  • 江西萍乡做网站公司seo刷网站
  • 吉林市建设工程档案馆网站semantic scholar