首页 > 编程语言 >R代做编程辅导:CSC120 Predicting Future Values Of A Time Sequence

R代做编程辅导:CSC120 Predicting Future Values Of A Time Sequence

时间:2022-10-30 15:57:36浏览次数:65  
标签:datasets CSC120 Sequence predict Predicting should values predicts day

全文链接:tecdat.cn/?p=29694

Introduction

UT的R语言,比起上次的A1,这次的竟然要求画56张图,真是丧心病狂。
使用Data frames去读取数据,然后运算,然后写函数去运算,不能使用index而只能慢慢的去loop,效率低不说,这么大的数据量,卡是必然的。
每个图差不多都要运行5秒才能得出结果,画全套图得好几分钟才能完成。

Requirement

You should write R scripts for predicting future values of a time sequence in this assignment, and use them to observations on numbers of maximum temperatures and deaths.
The datasets is derived from that distributed by the NMMAPS, the U.S. National Morbidity Mortality Air Pollution Study, with some missing temperature values. I have provided the datasets from 2000-12-31 to 1994-01-01 as a csv file on the course web page.
Finishing this assignment should provide more practice in basic R scripts, and on the knowledge of datasets frames and of subscripts that are logical or numeric lists.
We wish to predict the number of the maximum temperature and deaths for every day, based only on datasets before that day, except that when predicting the number of deaths on a day, we may use the maximum temperature for that day, as well as previous days.
You should also write a function called predictions, which makes predicts for all days from some start point to the last day for which datasets is provided. This function should take as its arguments a function to use for predicting, a datasets frame with values that may be used for predicting, the series of values for which predicts are to be made, and the start point for making predicts of this series. It should return a list of predicts for values in the series from the specified start point to the end.
Once you have produced predicts for every day, you should produce plots of the predicts, the actual values, and the errors in the predicts. You should also evaluate how good these predicts were in terms of the average absolute value of the error.
You should write several functions for predicting the value of some variable on a single day. All these functions should take as their first arguments a datasets frame, containing variables that may be used in making the predict, and as their second argument a series of past values for the variable being predict (which should have at least one past value, and for some functions should have to have more than one past value). This predicting function should return a predict for the next value in this series. The datasets frame should have at least as many rows as the length of the series plus one (so there should be values for the day for which the predict is being made). The datasets frame may have additional rows, but they should not be looked at when making the predict for this day.
Finally, you should try a more powerful predicting method, in which you first make predicts with some function, and then try to use another function to predict the error in the first method. The idea is that if you can manage to predict the error well, you can get a better predict by just adding the predicted error to the original prediction.

Summary

这次作业竟然写了快400行代码,画了56张图,完全就是个体力活。

标签:datasets,CSC120,Sequence,predict,Predicting,should,values,predicts,day
From: https://www.cnblogs.com/tecdat/p/16841439.html

相关文章

  • sanger sequencescape 开源LIMS
    概述开源地址:https://github.com/sanger/sequencescape开源公司sanger:https://www.sanger.ac.uk/。全球领先的基因研究机构。基于云的高扩展的LIMS,适用于大样本量的实验......
  • 【ARC074E】RGB Sequence(神奇的dp)
    注意到颜色的种类数只有\(3\)种,\(n\leq100\)也很小。然后就有了一种神奇的dp状态:考虑从前往后填方块,设\(dp(i,j,k)\)表示离当前位置最近的颜色位置在\(i\),离当......
  • 7.CF438D The Child and Sequence 线段树维护区间取模
    7.CF438DTheChildandSequence线段树维护区间取模给定数列,区间查询和,区间取模,单点修改。记录区间最大值,对于区间最大值小于模数的区间不予更新洛谷传送门:​​CF438DT......
  • mysqlsequence并发
    mysql有sequence吗在该目录中创建一个小型php文件(info.php的)在浏览器中调用它。该文件将显示很多关于我们的php安装,如安装的php版本和有用的一些细节。如何用navicatpre......
  • CF438D The Child and Sequence
    题目链接:​​传送门​​区间求和,单点修改,区间取模线段树里维护一个max,取模的时候如果区间最大值小于max直接return就可以不然的话递归到叶子节点再取模有效降低复杂度不......
  • CF438D(The Child and Sequence-线段树mod x)
    维护一个区间的和,支持单点修改,区间modx考虑a>x,时,amodx<a/2,否则a=x所以暴力维护就行了#include<iostream>#include<cmath>#include<algorithm>#include<cstdio>#inclu......
  • Sequence Flow示例
    准备实践环境[root@master~]#knservicecreatesq-appender-01--imageikubernetes/appender--envMESSAGE="-HandledbySQ-01"Creatingservice'sq-appender-0......
  • SP685 SEQPAR - Partition the sequence 题解
    SP685SEQPAR-PartitionthesequenceSolution目录SP685SEQPAR-PartitionthesequenceSolution更好的阅读体验戳此进入题面SolutionCodeUPD更好的阅读体验戳此进......
  • [Typescript] 62. Medium - Fibonacci Sequence
    Implementageneric Fibonacci<T> thattakesanumber T andreturnsitscorresponding Fibonaccinumber.Thesequencestarts:1,1,2,3,5,8,13,21,34,......
  • csu 1551: Longest Increasing Subsequence Again BIT + 思维
    预处理last[i]表示以第i个开始,的合法后缀。pre[i]表示以第i个结尾,的合法前缀。那么每一个数a[i],肯定是一个合法后缀last[i]+一个合法前缀,那么合法前缀的数字要小于a[i],并......