爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频

代做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

    爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频
    <strike id="bfrlb"></strike><form id="bfrlb"><form id="bfrlb"><nobr id="bfrlb"></nobr></form></form>

        <sub id="bfrlb"><listing id="bfrlb"><menuitem id="bfrlb"></menuitem></listing></sub>

          <form id="bfrlb"></form>

            <form id="bfrlb"></form>

              <address id="bfrlb"></address>

              <address id="bfrlb"></address>
              欧美精品一区二区三区在线看午夜| 欧美大片在线观看一区二区| 亚洲另类黄色| 香蕉尹人综合在线观看| 午夜在线一区| 久久久999成人| 欧美午夜国产| 欧美肉体xxxx裸体137大胆| 亚洲三级性片| 久久久久久噜噜噜久久久精品| 日韩视频一区| 久久天天躁狠狠躁夜夜爽蜜月| 欧美精品日韩www.p站| 亚洲精品国久久99热| 国产欧美日本在线| 亚洲性线免费观看视频成熟| 久久久久久久网| 亚洲精品午夜精品| 久久精品国产第一区二区三区最新章节| 国内一区二区三区在线视频| 亚洲手机成人高清视频| 国语自产精品视频在线看一大j8| 久久精品亚洲精品| 99成人精品| 99riav国产精品| 美女露胸一区二区三区| 午夜精品久久久久久久久久久久| 亚洲欧美日韩一区二区三区在线观看| 日韩性生活视频| 一区二区激情视频| 精品9999| 伊人狠狠色丁香综合尤物| 欧美激情片在线观看| 国产精品免费aⅴ片在线观看| 亚洲日本中文| 国产区二精品视| 久久精品视频亚洲| 亚洲自拍另类| 黄色亚洲大片免费在线观看| 欧美精品自拍偷拍动漫精品| 欧美成人一区在线| 国产日产亚洲精品| 欧美激情综合五月色丁香| 国产一区自拍视频| 欧美freesex交免费视频| 99热在这里有精品免费| 国产精品久久二区二区| 激情视频一区二区三区| 亚洲伊人一本大道中文字幕| 亚洲国产毛片完整版| 久久夜色精品国产| 欧美在线电影| 欧美成ee人免费视频| 亚洲天堂男人| 美女主播一区| 欧美极品在线视频| 欧美国产视频在线观看| 99精品福利视频| 亚洲一区影院| 亚洲新中文字幕| 欧美精品高清视频| 精品成人一区二区三区四区| 1024欧美极品| 国内精品久久久久影院薰衣草| 国产一区在线免费观看| 亚洲人成在线观看网站高清| 欧美激情综合亚洲一二区| 久久精品国产第一区二区三区最新章节| 欧美激情综合五月色丁香小说| 国产在线不卡精品| 久久精品72免费观看| 一区二区三区精品在线| 国产精品一区二区三区免费观看| 国产综合色一区二区三区| 亚洲福利av| 国产区二精品视| 久久久久免费观看| 亚洲视频日本| 亚洲一区二区三区国产| 在线一区二区三区四区| 国产视频精品免费播放| 亚洲午夜一区二区三区| 国内精品一区二区| 国产日产欧美精品| 久久国产精彩视频| 久久国产欧美精品| 欧美日韩国产亚洲一区| 欧美一区国产二区| 亚洲男人第一网站| 欧美多人爱爱视频网站| 久久蜜桃香蕉精品一区二区三区| 欧美破处大片在线视频| 先锋影院在线亚洲| 欧美在线观看视频在线| 999在线观看精品免费不卡网站| 国产精品极品美女粉嫩高清在线| 国产欧美日韩综合精品二区| 午夜一区在线| 国产女主播在线一区二区| 精品电影在线观看| 亚洲激情综合| 久久国产精品久久国产精品| 国产日韩欧美一二三区| 在线亚洲一区二区| 国产精品久久九九| 日韩一二三区视频| 久久久久久久久久久一区| 久热爱精品视频线路一| 怡红院精品视频在线观看极品| 久久成人av少妇免费| 欧美α欧美αv大片| 欧美激情在线狂野欧美精品| 在线观看日韩www视频免费| 亚洲第一在线视频| 99在线精品免费视频九九视| 国产欧美一区二区精品秋霞影院| 欧美一区二区三区另类| 亚洲一区二区高清视频| 一区二区三区在线免费观看| 在线免费观看日韩欧美| 欧美日韩免费区域视频在线观看| 欧美精品日韩三级| 国产在线观看精品一区二区三区| 在线观看精品| 欧美激情久久久久久| 久久成人在线| 国产精品亚洲第一区在线暖暖韩国| 亚洲最新视频在线| 国产情人节一区| 欧美一区二区视频97| 激情综合网激情| 亚洲一区在线观看视频| 经典三级久久| 日韩一级不卡| 欧美剧在线观看| 亚洲手机成人高清视频| 欧美一区二区视频在线观看2020| 国产精品一区视频| 午夜精品成人在线视频| 99精品欧美一区二区蜜桃免费| 国产一区二区电影在线观看| 麻豆9191精品国产| 日韩视频―中文字幕| 免费观看成人| 国产亚洲激情视频在线| 欧美日韩国产电影| 国产视频一区在线观看| 日韩一级视频免费观看在线| 一本久久a久久免费精品不卡| 亚洲一区二区三区免费观看| 国产在线一区二区三区四区| 亚洲免费观看在线观看| 狠狠入ady亚洲精品经典电影| 在线亚洲电影| 欧美精品高清视频| 久久人人97超碰精品888| 日韩午夜高潮| 国产精品v欧美精品v日韩| 亚洲大胆视频| 欧美日韩国产综合视频在线| 国产一区二区丝袜高跟鞋图片| 亚洲巨乳在线| 美日韩免费视频| 欧美视频在线观看免费| 亚洲一区二区av电影| 免费在线欧美视频| 欧美日韩国产色综合一二三四| 国产亚洲欧美日韩在线一区| 午夜久久福利| 一区二区三区在线不卡| 欧美视频二区| 尤物九九久久国产精品的特点| 国产免费成人| 亚洲在线观看免费| 亚洲国产视频a| 国产模特精品视频久久久久| 久久亚洲私人国产精品va| 在线观看精品视频| 久久久久久久高潮| 国产欧美视频在线观看| 国产在线精品一区二区中文| 亚洲日韩欧美视频一区| 亚洲激情网站免费观看| 一本色道久久综合亚洲精品按摩| 欧美日韩一区在线视频| 亚洲精品国产精品久久清纯直播| 国产精品丝袜久久久久久app| 国产在线观看91精品一区| 欧美成人精精品一区二区频| 欧美 日韩 国产精品免费观看| 国产伦精品一区二区| 国产精品a久久久久| 最近看过的日韩成人| 亚洲电影自拍| 老司机成人网| 亚洲一区二三| 99亚洲伊人久久精品影院红桃| 亚洲一区二区三区中文字幕在线| 免费91麻豆精品国产自产在线观看| 久久久久亚洲综合|