精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

代做Lab 2: Time Series Prediction with GP

時間:2024-03-21  來源:  作者: 我要糾錯



Evolutionary Computation 2023/2024
Lab 2: Time Series Prediction with GP
Released: February 26, 2024
Deadline: March 18, 2024
Weight: 25 %
You need to implement one program that solves Exercises 1-3 using any programming language.
In Exercise 5, you will run a set of experiments and describe the result using plots and a short
discussion.
(In the following, replace abc123 with your username.) You need to submit one zip file
with the name ec2024-lab2-abc123.zip. The zip file should contain one directory named
ec2024-lab2-abc123 containing the following files:
• the source code for your program
• a Dockerfile (see the appendix for instructions)
• a PDF file for Exercises 4 and 5
In this lab, we will do a simple form of time series prediction. We assume that we are given some
historical data, (e.g. bitcoin prices for each day over a year), and need to predict the next value in
the time series (e.g., tomorrow’s bitcoin value).
1
We formulate the problem as a regression problem. The training data consists of a set of m
input vectors X = (x
(0), . . . , x(m−1)) representing historical data, and a set of m output values
Y = (x
(0), . . . , x(m−1)), where for each 0 ≤ j ≤ m − 1, x
(j) ∈ R
n and y
(j) ∈ R. We will use genetic
programming to evolve a prediction model f : R
n → R, such that f(x
(j)
) ≈ y
(j)
.
Candidate solutions, i.e. programs, will be represented as expressions, where each expression evaluates to a value, which is considered the output of the program. When evaluating an expression,
we assume that we are given a current input vector x = (x0, . . . , xn−1) ∈ R
n. Expressions and evaluations are defined recursively. Any floating number is an expression which evaluates to the value
of the number. If e1, e2, e3, and e4 are expressions which evaluate to v1, v2, v3 and v4 respectively,
then the following are also expressions
• (add e1 e2) is addition which evaluates to v1 + v2, e.g. (add 1 2)≡ 3
• (sub e1 e2) is subtraction which evaluates to v1 − v2, e.g. (sub 2 1)≡ 1
• (mul e1 e2) is multiplication which evaluates to v1v2, e.g. (mul 2 1)≡ 2
• (div e1 e2) is division which evaluates to v1/v2 if v2 ̸= 0 and 0 otherwise, e.g., (div 4 2)≡ 2,
and (div 4 0)≡ 0,
• (pow e1 e2) is power which evaluates to v
v2
1
, e.g., (pow 2 3)≡ 8
• (sqrt e1) is the square root which evaluates to √
v1, e.g.(sqrt 4)≡ 2
• (log e1) is the logarithm base 2 which evaluates to log(v1), e.g. (log 8)≡ 3
• (exp e1) is the exponential function which evaluates to e
v1
, e.g. (exp 2)≡ e
2 ≈ 7.39
• (max e1 e2) is the maximum which evaluates to max(v1, v2), e.g., (max 1 2)≡ 2
• (ifleq e1 e2 e3 e4) is a branching statement which evaluates to v3 if v1 ≤ v2, otherwise the
expression evaluates to v4 e.g. (ifleq 1 2 3 4)≡ 3 and (ifleq 2 1 3 4)≡ 4
• (data e1) is the j-th element xj of the input, where j ≡ |⌊v1⌋| mod n.
• (diff e1 e2) is the difference xk − xℓ where k ≡ |⌊v1⌋| mod n and ℓ ≡ |⌊v2⌋| mod n
• (avg e1 e2) is the average 1
|k−ℓ|
Pmax(k,ℓ)−1
t=min(k,ℓ)
xt where k ≡ |⌊v1⌋| mod n and ℓ ≡ |⌊v2⌋|
mod n
In all cases where the mathematical value of an expression is undefined or not a real number (e.g.,

−1, 1/0 or (avg 1 1)), the expression should evaluate to 0.
We can build large expressions from the recursive definitions. For example, the expression
(add (mul 2 3) (log 4))
evaluates to
2 · 3 + log(4) = 6 + 2 = 8.
2
To evaluate the fitness of an expression e on a training data (X , Y) of size m, we use the mean
square error
f(e) = 1
m
mX−1
j=0

y
(j) − e(x
(j)
)
2
,
where e(x
(j)
) is the value of the expression e when evaluated on the input vector x
(j)
.
3
Exercise 1. (30 % of the marks)
Implement a routine to parse and evaluate expressions. You can assume that the input describes a
syntactically correct expression. Hint: Make use of a library for parsing s-expressions1
, and ensure
that you evaluate expressions exactly as specified on page 2.
Input arguments:
• -expr an expression
• -n the dimension of the input vector n
• -x the input vector
• -question the question number (always 1 in this case)
Output:
• the value of the expression
Example: In this example, we assume that your program has been compiled to an executable with
the name my lab solution.
[pkl@phi ocamlec]$ my_lab_solution -question 1 -n 1 -x "1.0"
-expr "(mul (add 1 2) (log 8))"
9.0
[pkl@phi ocamlec]$ my_lab_solution -question 1 -n 2 -x "1.0 2.0"
-expr "(max (data 0) (data 1))"
2.0
Exercise 2. (10 % of the marks) Implement a routine which computes the fitness of an expression
given a training data set.
Input arguments:
• -expr an expression
• -n the dimension of the input vector
• -m the size of the training data (X , Y)
• -data the name of a file containing the training data in the form of m lines, where each line
contains n + 1 values separated by tab characters. The first n elements in a line represents
an input vector x, and the last element in a line represents the output value y.
• -question the question number (always 2 in this case)
1See e.g. implementations here http://rosettacode.org/wiki/S-Expressions
4
Output:
• The fitness of the expression, given the data.
Exercise 3. (30 % of the marks)
Design a genetic programming algorithm to do time series forecasting. You can use any genetic
operators and selection mechanism you find suitable.
Input arguments:
• -lambda population size
• -n the dimension of the input vector
• -m the size of the training data (X , Y)
• -data the name of a file containing training data in the form of m lines, where each line
contains n + 1 values separated by tab characters. The first n elements in a line represents
an input vector x, and the last element in a line represents the output value y.
• -time budget the number of seconds to run the algorithm
• -question the question number (always 3 in this case)
Output:
• The fittest expression found within the time budget.
Exercise 4. (10 % of the marks) Here, you should do one of the following exercises.
If you follow LH Evolutionary Computation, do the following exercise: Describe your
algorithm from Exercise 3 in the form of pseudo-code. The pseudo-code should be sufficiently detailed
to allow an exact re-implementation.
If you follow LM Evolutionary Computation (extended), do the following exercise:
Describe in 150 words or less the result in one recent research paper on the topic “symbolic regression
using genetic programming”. The paper needs to be published in 2020 or later in the proceedings of
one of the following conferences: GECCO, PPSN, CEC, or FOGA.
5
Exercise 5. (20 % of the marks)
In this final task, you should try to determine parameter settings for your algorithm which lead to
as fit expressions as possible.
Your algorithm is likely to have several parameters, such as the population size, mutation rates,
selection mechanism, and other mechanisms components, such as diversity mechanisms.
Choose parameters which you think are essential for the behaviour of your algorithm. Run a set of
experiments to determine the impact of these parameters on the solution quality. For each parameter
setting, run 100 repetitions, and plot box plots of the fittest solution found within the time budget.
6
A. Docker Howto
Follow these steps exactly to build, test, save, and submit your Docker image. Please replace abc123
in the text below with your username.
1. Install Docker CE on your machine from the following website:
https://www.docker.com/community-edition
2. Copy the PDF file from Exercises 4 and 5 all required source files, and/or bytecode to an
empty directory named ec2024-lab2-abc123 (where you replace abc123 with your username).
mkdir ec2024 - lab2 - abc123
cd ec2024 - lab2 - abc123 /
cp ../ exercise . pdf .
cp ../ abc123 . py .
3. Create a text file Dockerfile file in the same directory, following the instructions below.
# Do not change the following line . It specifies the base image which
# will be downloaded when you build your image .
FROM pklehre / ec2024 - lab2
# Add all the files you need for your submission into the Docker image ,
# e . g . source code , Java bytecode , etc . In this example , we assume your
# program is the Python code in the file abc123 . py . For simplicity , we
# copy the file to the / bin directory in the Docker image . You can add
# multiple files if needed .
ADD abc123 . py / bin
# Install all the software required to run your code . The Docker image
# is derived from the Debian Linux distribution . You therefore need to
# use the apt - get package manager to install software . You can install
# e . g . java , python , ghc or whatever you need . You can also
# compile your code if needed .
# Note that Java and Python are already installed in the base image .
# RUN apt - get update
# RUN apt - get -y install python - numpy
# The final line specifies your username and how to start your program .
# Replace abc123 with your real username and python / bin / abc123 . py
# with what is required to start your program .
CMD [" - username " , " abc123 " , " - submission " , " python / bin / abc123 . py "]
7
4. Build the Docker image as shown below. The base image pklehre/ec2024-lab2 will be
downloaded from Docker Hub
docker build . -t ec2024 - lab2 - abc123
5. Run the docker image to test that your program starts. A battery of test cases will be executed
to check your solution.
docker run ec2024 - lab2 - abc123
6. Once you are happy with your solution, compress the directory containing the Dockerfile as
a zip-file. The directory should contain the source code, the Dockerfile, and the PDF file
for Exercise 4 and 5. The name of the zip-file should be ec2024-lab2-abc123.zip (again,
replace the abc123 with your username).
Following the example above, the directory structure contained in the zip file should be as
follows:
ec2024-lab2-abc123/exercise.pdf
ec2024-lab2-abc123/abc123.py
ec2024-lab2-abc123/Dockerfile
Submissions which do not adhere to this directory structure will be rejected!
7. Submit the zip file ec2024-lab2-abc123.zip on Canvas.
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:代寫CSIE3310、代做c++/Python編程
  • 下一篇:AIST1110代做、Python編程設計代寫
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      国产成人免费在线视频| 美女一区二区三区| av不卡一区二区三区| 亚洲色图色小说| 91精品一区二区三区久久久久久 | 亚洲精品中文在线观看| 91国产免费观看| 精品制服美女丁香| 亚洲男人的天堂一区二区| 91精品午夜视频| 91精品麻豆日日躁夜夜躁| 欧美裸体一区二区三区| 99re在线视频这里只有精品| 久久91精品国产91久久小草| 精品一区二区三区欧美| 韩国毛片一区二区三区| 午夜影视日本亚洲欧洲精品| 中文字幕一区二区三区四区| 亚洲精品一区二区三区精华液 | www国产成人| 欧美影院精品一区| 成人的网站免费观看| 久久成人免费电影| 午夜精品视频一区| 亚洲国产美国国产综合一区二区| 国产精品乱码妇女bbbb| 欧美日韩久久不卡| jlzzjlzz亚洲日本少妇| 欧美性生活一区| 欧美电视剧在线观看完整版| 欧美色精品在线视频| 色94色欧美sute亚洲线路二| 337p亚洲精品色噜噜噜| 国产无一区二区| 国产午夜亚洲精品理论片色戒| 亚洲欧洲av色图| 美腿丝袜亚洲一区| 不卡高清视频专区| 日韩一级黄色大片| 欧美va亚洲va在线观看蝴蝶网| 91精品国产综合久久精品麻豆| 久久嫩草精品久久久久| 欧美激情一区二区三区在线| 欧美激情在线看| 婷婷中文字幕一区三区| 成人av免费在线观看| 欧美一区二区三区在线电影| 亚洲精品在线三区| 亚洲成人黄色影院| www.日韩精品| 久久久777精品电影网影网| 亚洲一区二区影院| 日本不卡高清视频| 国产在线播放一区三区四| 国产成人亚洲精品狼色在线| 91精品免费观看| 亚洲精品欧美激情| 高清在线成人网| 色视频一区二区| 日韩一区二区在线看| 一区二区三区在线播| 亚洲国产精品久久久男人的天堂| 国产精品小仙女| 欧洲一区在线观看| 日韩一区二区三区四区 | 欧美日韩久久一区二区| 亚洲欧美一区二区三区极速播放| 国产在线视视频有精品| 欧美一区二区三区白人| 午夜精品免费在线| 欧美日韩国产一级| 亚洲国产精品一区二区www在线| 99国产欧美另类久久久精品| 欧美激情在线看| 成人免费高清在线观看| 欧美三级电影精品| 亚洲一线二线三线视频| 欧洲视频一区二区| 亚洲一区二区三区四区在线免费观看| 色综合久久久久久久久| 亚洲欧美日韩综合aⅴ视频| 91麻豆免费在线观看| 日韩欧美三级在线| 捆绑紧缚一区二区三区视频| 精品久久久网站| 黄页视频在线91| 国产欧美精品一区二区色综合| 亚洲成人av免费| 欧美一区二区三区性视频| 另类综合日韩欧美亚洲| 久久久一区二区三区捆绑**| 国产99精品视频| 亚洲欧美视频在线观看视频| 欧美中文字幕亚洲一区二区va在线 | 久久蜜桃av一区精品变态类天堂 | 精品国产免费视频| 风间由美性色一区二区三区| 自拍偷拍国产精品| 欧美精品在线观看一区二区| 久99久精品视频免费观看| 亚洲国产精品av| 欧美中文字幕一区二区三区亚洲| 午夜精品一区在线观看| 欧美大度的电影原声| 99国产精品国产精品毛片| 天天影视涩香欲综合网| 久久精品一区四区| 欧美性感一类影片在线播放| 狠狠色伊人亚洲综合成人| 亚洲丝袜精品丝袜在线| 日韩一区和二区| 92国产精品观看| 狠狠色丁香久久婷婷综| 亚洲激情一二三区| 国产视频一区在线观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 国产馆精品极品| 天堂久久久久va久久久久| 在线看国产一区二区| 麻豆91精品91久久久的内涵| 一区在线观看免费| 久久免费美女视频| 欧美三级日韩三级| 岛国一区二区三区| 久久精品国产澳门| 一区二区三区丝袜| 中文字幕在线播放不卡一区| 日韩免费高清视频| 欧美亚洲动漫制服丝袜| 91小视频在线| 高清久久久久久| 国产一区高清在线| 理论片日本一区| 日韩电影在线观看电影| 精品国产91乱码一区二区三区| 在线观看中文字幕不卡| 99精品国产91久久久久久| 国产专区欧美精品| 免费黄网站欧美| 日韩电影在线看| 午夜精品久久久久影视| 亚洲不卡一区二区三区| 亚洲激情av在线| 夜夜亚洲天天久久| 一区二区三区欧美日| 一区二区三区成人| 一区二区在线观看视频| 亚洲久草在线视频| 一区2区3区在线看| 午夜精品久久久久久久99樱桃| 一卡二卡三卡日韩欧美| 亚洲mv大片欧洲mv大片精品| 亚洲无线码一区二区三区| 亚洲成a人v欧美综合天堂下载| 亚洲国产视频一区| 青青草国产精品亚洲专区无| 日本一区中文字幕| 国产在线观看一区二区| 国产ts人妖一区二区| av在线不卡电影| 色94色欧美sute亚洲线路一久| 欧美日韩一卡二卡三卡| 日韩视频免费观看高清完整版在线观看 | 欧美极品xxx| 亚洲视频一区在线观看| 亚洲国产精品欧美一二99| 日韩—二三区免费观看av| 国内精品国产成人国产三级粉色| 国产一级精品在线| av一区二区三区黑人| 欧美日韩一区精品| 精品国内二区三区| 国产精品不卡在线| 五月天国产精品| 精品亚洲欧美一区| 菠萝蜜视频在线观看一区| 欧美性色综合网| 久久久久久久久久久电影| 亚洲视频一区二区在线| 日av在线不卡| va亚洲va日韩不卡在线观看| 欧美三区在线视频| 久久久久久久综合色一本| 亚洲精品欧美综合四区| 毛片av一区二区| 99riav一区二区三区| 精品免费国产二区三区| 亚洲精品五月天| 老司机免费视频一区二区三区| 本田岬高潮一区二区三区| 4438亚洲最大| 亚洲美腿欧美偷拍| 韩国欧美国产1区| 欧美性猛交xxxx黑人交| 日本一区二区动态图| 免费看日韩精品| 色婷婷激情一区二区三区| 久久精品免费在线观看| 三级影片在线观看欧美日韩一区二区| 国产91对白在线观看九色|