prediction algorithm using python Programming Assignment Help. prediction algorithm using python Programming Assignment Help.
(/0x4*br />
Advanced Aspects of Nature Inspired Search and Optimisation 2019/2020
Lab 2 MSc: Time Series Prediction with GP
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 niso3-abc123.zip. The zip file should contain one directory named niso3-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
1
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).
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)),whereforeach0≤j≤m−1,x(j) ∈Rn andy(j) ∈R. Wewillusegenetic programming to evolve a prediction model f : Rn → R, such that f(x(j)) ≈ y(j).
Candidate solutions, i.e. programs, will be represented as expressions, where each expression eval- uates 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 ) ∈ Rn . Expressions and eval- uations 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 e e ) is power which evaluates to vv2 , e.g., (pow 2 3)≡ 8 121
- ? (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 ev1 , e.g. (exp 2)≡ e2 ≈ 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 −xl where k ≡ |⌊v1⌋| mod n and l ≡ |⌊v2⌋| mod n
- ? (avg e1 e2) is the average 1 ?max(k,l)−1 xt where k ≡ |⌊v1⌋| mod n and l ≡ |⌊v2⌋| |k−l| t=min(k,l)
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))
2
evaluates to
2·3+log(4) = 6+2 = 8.
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)=m
j=0
m−1
1 ? ? (j) (j) ?2
y −e(x ) ,
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
Output:
? the value of the expression
Example:
[pkl@phi ocamlec]$ niso_lab3 -question 1 -n 1 -x "1.0"
-expr "(mul (add 1 2) (log 8))"
9.0
[pkl@phi ocamlec]$ niso_lab3 -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.Output:
? The fitness of the expression, given the data.1See e.g. implementations here http://rosettacode.org/wiki/S-Expressions4
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 Output:? The fittest expression found within the time budget
- .Exercise 4. (10 % of the marks)
- Describe your algorithm from Exercise 3 in the form of pseudo-code. The pseudo-code should besufficiently detailed to allow an exact re-implementation.
- Exercise 5. (20 % of the marks)
- In this final task, you should try to determine parameter settings for your algorithm which lead toas 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.
a portion of the work is done and attached below , but there are mistakes in it that needs to be corrected . please do not bid if you don’t already know the material because that has already happened before and it is highly time sensitive . Thank you.
prediction algorithm using python Programming Assignment Help[supanova_question]
Discussion board Writing Assignment Help
Step 1 Choose an article.
Please choose any one article from Practical Argument Book chapters 1 – 2 please only from the attached below.
Chapters attached here:
Chapter 1:
Chapter 2:
Step 2 Critically read the article and complete the PACES worksheet.
Read and annotate the article and complete the PACES worksheet.
Step 3 Answer Questions in Practical Argument
Please answer the checklist questions on page 102 for the article you choose.
The page 102 (the checklist questions) here:
Step 4 Post your response to the discussion board.
Submit the answers to the checklist in paragraph form as your discussion board post along with the attached PACES worksheet to the discussion board.
Step 5 Read and respond to other students’ posts.
Read other students’ posts and respond to at least two of them. In addition to any other comments you may have, respond to the following:
Do you think the thesis was well-supported?
If you had to offer a critical writing opinion of the text, what would you tell the author to revise?
Use your personal experience, if it’s relevant, to support or debate other students’ posts. If differences of opinion occur, debate the issues professionally and provide examples to support opinions.
Please respond to at least two (2) classmates.
After you gonna send me the answer I’ll send you the two post to reply on them
I appreciate your help
[supanova_question]
Create a folder in your personal CSCI1423 repo called Test2. In that folder create the following files that contain/perform the following Programming Assignment Help
gt.pl
Write a perl program that contains a subroutine that returns the greater of two numbers passed to it. The program should print out the two numbers that will be passed to the subroutine and then call the subroutine, passing those 2 numbers to it. The subroutine should determine if one number is greater than the other and return to the main routine the larger number so that the main routine can print out a message about which number is greater. In other words, if num1 was greater than num2, then the subroutine should return num1 to the main program and a message about num1 being greater would be printed out to the user. Otherwise, num2 should be returned and a similar message about num2 should be printed.
Double_the_number.pl
Write a perl program that reads in a text file containing several numbers in it. The program should loop through all the numbers, printing out the original number and then multiplying it by 2 and printing out that doubled number.
[supanova_question]
[Refutation Essay] Games and E-Sports Writing Assignment Help
(Great English is a must)
(1000 words, APA Format)
——————————–
Subject of the paper: Refutation Essay about E-sports and Games (the arguments are in the attached files)
Requirement: It’s a refutation paper assignment, here is the topic: Many people think that children should be prohibited from playing games, which will affect children’s concentration and even make them addicted to games, but I think they should cultivate children’s nature. E-sports has become a major in universities. Games are no longer children’s drugs. Parents should allow their children to play games in moderation and health.
The theme argument and outline requirements of the article are in the attachment. You can refer to the argument and add your own views. Do not copy the argument documents directly. 5-6 citations (MLA format) are required. Works Cited is appended at the end. The citation order is alphabetical and the number of words is 900-1000 words.
Please read the attached document before bidding to make sure you have the knowledge to solve this task.
Format:
- APA Format
- Please read the attached document in order to have an idea of what you have to write (the paper will be reviewed based on the attached document)
No plagiarism is accepted
*** The work will be checked for plagiarism through Turnitin by the professor. It is essential for everything to be free of plagiarism otherwise sanctions will be imposed***
——–
Thank you for your support
[supanova_question]
Corporate Power – Critically examine the risks contemporary trade and investment agreements pose to public health Business Finance Assignment Help
Description
I am looking for a writer to help me with this module i am doing at university. I am really struggling with this essay as i have a lot of personal stuff going on in my life, and I would hugely appreciate your help to hit over 70%. Please no plagiarism. I have attached the assignment brief, main reading articles i found online, some further readings in a word document and the grading criteria. Once again, your help is much appreciated and i would be forever thankful.
Corporate Power
Instructions
You are asked to answer the following question listed below. Your essay should be no longer
than 3,000 words (plus or minus 10%, excluding bibliography).
Essay Question
1. Critically examine the risks contemporary trade and investment agreements pose to
public health.
[supanova_question]
[supanova_question]
Assignment Programming Assignment Help
Open Table has a public API available at https://platform.opentable.com/documentation/#auth…that you can use to get restaurant information, including restaurant details and delivery information.
As an example, http://opentable.herokuapp.com/api/restaurants?cit… returns a list of restaurants that deliver to Toronto, including some basic restaurant information.
The task is to create an application that accepts an City as a parameter. The application should then display the following information about each restaurant that delivers to that City:
• Name
• Address
• Price
Platform Choice
You can create the application as a web application in any of the following platforms
• JavaScript Native
• ReactJS
• Polymer
• Angular
• VueJS
Task requirements
Feel free to spend as much or as little time on the exercise as you like as long as the following requirements have been met.
• Please complete the user story below.
• Your code should compile and run in one step.
• Feel free to use whatever frameworks / libraries / packages you like.
• You must include tests
• Please avoid including artifacts from your local build (such as NuGet packages or the bin folder(s)) in your final ZIP file
User Story
As a user running the application
I can view a list of restaurants in a user submitted City (e.g. Toronto)
So that I know which restaurants are currently available
Acceptance criteria
• For the known City, results are returned
• The Name, Cuisine Types and Rating of the restaurant are displayed
Technical questions
Please answer the following questions in a markdown file called Answers to technical questions.md.
1. How long did you spend on the coding test? What would you add to your solution if you had more time? If you didn’t spend much time on the coding test then use this as an opportunity to explain what you would add.
2. What was the most useful feature that was added to the latest version of your chosen language? Please include a snippet of code that shows how you’ve used it.
3. How would you track down a performance issue in production? Have you ever had to do this?
4. How would you improve the API that you just used?
5. Please describe yourself using JSON.
Preferred platform : react js
Code should be neat and clean
Assignment Programming Assignment Help[supanova_question]
HSC499 Discussion Health Medical Assignment Help
1. Please review this article and let me know your thoughts: 100-150 words. This article is attached
Please cite all quotations, facts, and ideas that are not your own original work and please don’t paraphrasing
Reference:
Varkey, Prathibha, MD,M.P.H., M.H.P.E., & Bennet, K. E. (2010). Practical techniques for strategic planning in health care organizations. Physician Executive, 36(2), 46-8. Retrieved from https://search-proquest-com.contentproxy.phoenix.e…
2. Please review this article and let me know your thoughts: 100-150 words.Please click the link to open the article.
https://smallbusiness.chron.com/strategic-planning…
Please cite all quotations, facts, and ideas that are not your own original work and please don’t paraphrasing
[supanova_question]
Advanced C++ question Computer Science Assignment Help
The purpose of this assignment is to maintain a list of 10 highest scores for some game. The assignment requires building and using two libraries and reading and writing a binary file. The program will make use of an input file containing game scores.
The Date Library
The Date library should contain a Date class. The Date class should contain a time_t data member to store the date.
The Date class should contain
- 4 constructors:
- Date();
- Date(const Date&) = default;
- Date(time_t); // Date in time_t format
- Date(const char*);
- The default constructor should create a Date object containing the current date.
- Date(const char*) constructor should accept arguments with date formats of “mm/dd/yy”, or “mm-dd-yy” or “ddmonyy”
- The Date library should also contain an overloaded insertion operator to display Dates.
- You may add any other member function necessary for the Date class.
The Score library
The Score library should contain a Score class and an overloaded insertion operator to display Score objects.
The Score class shold contain
- 3 data members:
- char name[16];
- int score;
- Date date;
- One or more constructors
- Accessor functions
- An overloaded < operator function. You’ll need this to sort the Scores.
The binary file
The Scores data must be stored in a binary file in sorted order.
A maximum of 10 highest scores will be stored in the binary file.
The binary file should be read in before each record in the input file is processed.
The binary file should be written each time a new score is inserted into the list of highest scores.
Sample input, output, and main are attached
[supanova_question]
Advanced C++ assignment Computer Science Assignment Help
Your program should adhere to the following specifications:
- You are to use the Word and Dictionary classes defined below and write all member functions and any necessary supporting functions to achieve the specified result.
- The Word class should dynamically allocate memory for each word to be stored in the dictionary.
- The Dictionary class should contain an array of pointers to Word. Memory for this array must be dynamically allocated. You will have to read the words in from the file. Since you do not know the “word” file size, you do not know how large to allocate the array of pointers. You are to let this grow dynamically as you read the file in. Start with an array size of 8, When that array is filled, double the array size, copy the original 8 words to the new array and continue. You can see the expected behavior in the sample program output listed below.
- You can assume the “word” file is sorted, so your Dictionary::find() function must contain a binary search algorithm. You might want to save this requirement for later – until you get the rest of your program running.
- Make sure you store words in the dictionary as lower case and that you convert the input text to the same case – that way your Dictionary::find() function will successfully find “Four” even though it is stored as “four” in your Dictionary.
- Make sure you remove leading or trailing punctuation from a word, such as “nation,”.
- Do not use the string class for this assignment. All text data should be stored and managed as C-strings.
Warning: If you are using a Mac or Linux compiler, you may want to remove the r at the end of each line in both input files. You can do that like this:
strtok(line,”r”);
<strong><u>Word class</u></strong>
class Word
{
char* word_;
public:
Word(const char* text = 0);
~Word();
const char* word() const;
};
<strong><u>Dictionary class</u></strong>
class Dictionary
{
Word** words_;
unsigned int capacity_; // max number of words Dictionary can hold
unsigned int numberOfWordsInDictionary_;
void resize();
void addWordToDictionary(char* word);
public:
Dictionary(const char* filename);
~Dictionary();
bool find(const char* word);
};
<strong><u>main()</u></strong>
int main()
{
char buffer[MaxWordSize];
Dictionary Websters(wordfile);
ifstream fin(document);
cout << "nSpell checking " << document << "nn";
while (fin >> buffer) {
// remove leading/trailing punctuation, change to lowercase
if (cleanupWord(buffer)) {
if (!Websters.find(buffer)) {
cout << buffer << " not found in the Dictionaryn";
}
}
}
}
<strong><u>Program output</u></strong>
Dictionary resized to capacity: 16 <strong><--- This illustrates Dictionary resizing</strong>
Dictionary resized to capacity: 32
Dictionary resized to capacity: 64
Dictionary resized to capacity: 128
Dictionary resized to capacity: 256
Dictionary resized to capacity: 512
Dictionary resized to capacity: 1024
Dictionary resized to capacity: 2048
Dictionary resized to capacity: 4096
Dictionary resized to capacity: 8192
Dictionary resized to capacity: 16384
Dictionary resized to capacity: 32768
Spell checking /deanza/data/gettysburg.txt <strong><--- spell checking begins</strong>
created not found in the Dictionary <strong><--- words not found in the Dictionary</strong>
struggled not found in the Dictionary
consecrated not found in the Dictionary
por not found in the Dictionary
remember not found in the Dictionary
unfinished not found in the Dictionary
nobly not found in the Dictionary
advanced not found in the Dictionary
...
[supanova_question]
Code test assignment Programming Assignment Help
Coding Test
Open Table has a public API available at https://platform.opentable.com/documentation/#auth…that you can use to get restaurant information, including restaurant details and delivery information.
As an example, http://opentable.herokuapp.com/api/restaurants?cit… returns a list of restaurants that deliver to Toronto, including some basic restaurant information.
The task is to create an application that accepts an City as a parameter. The application should then display the following information about each restaurant that delivers to that City:
• Name
• Address
• Price
Platform Choice
You can create the application as a web application in any of the following platforms
• JavaScript Native
• ReactJS
• Polymer
• Angular
• VueJS
Task requirements
Feel free to spend as much or as little time on the exercise as you like as long as the following requirements have been met.
• Please complete the user story below.
• Your code should compile and run in one step.
• Feel free to use whatever frameworks / libraries / packages you like.
• You must include tests
• Please avoid including artifacts from your local build (such as NuGet packages or the bin folder(s)) in your final ZIP file
User Story
As a user running the application
I can view a list of restaurants in a user submitted City (e.g. Toronto)
So that I know which restaurants are currently available
Acceptance criteria
• For the known City, results are returned
• The Name, Cuisine Types and Rating of the restaurant are displayed
Technical questions
Please answer the following questions in a markdown file called Answers to technical questions.md.
1. How long did you spend on the coding test? What would you add to your solution if you had more time? If you didn’t spend much time on the coding test then use this as an opportunity to explain what you would add.
2. What was the most useful feature that was added to the latest version of your chosen language? Please include a snippet of code that shows how you’ve used it.
3. How would you track down a performance issue in production? Have you ever had to do this?
4. How would you improve the API that you just used?
5. Please describe yourself using JSON.
[supanova_question]
prediction algorithm using python Programming Assignment Help
prediction algorithm using python Programming Assignment Help