首页 > 编程 > Python > 正文

时间序列分析(3)Python-最简单的回归

2019-11-08 03:14:42
字体:
来源:转载
供稿:网友
# -*- coding: utf-8 -*-"""Created on Fri Feb 17 15:08:37 2017@author: yunjinqiE-mail:yunjinqi@QQ.comDifferentiate yourself in the world from anyone else."""import pandas as pdfrom scipy import statsdf=pd.read_csv('C:/Users/Administrator/exam0203.csv')dftype(df)x=df.iloc[::,3]y=df.iloc[::,4]beta, alpha, r_value, p_value, std_err=stats.linregress(x,y)betaalphar_value#r_squre=r_value*r_valuep_valueR语言和Python回归结果是相同的,但是Python的界面很不好看,在统计上,Python还是需要进一步努力
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表