We consider a regression problem for predicting the demand of

 

We consider a regression problem for predicting the demand of bike-sharing services in Washington D.C.1 The prediction task is to predict the demand for the bikes (column cnt) given the other features: ignore the columns instant and dteday. Use the day.csv file from the data folder. (a) Write a Python file to load day.csv.2 Compute the correlation coefficient of each feature with the response (i.e., cnt). Include a table with the correlation coefficient of each feature with the response. Which features are positively correlated (i.e., have positive corre- lation coefficient) with the response? Which feature has the highest positive correlation with the response? (b) Were you able to find any features with a negative correlation coefficient with the response? If not, can you think of a feature that is not provided in the dataset but may have a negative correlation coefficient with the response? (c) Now, divide the data into training and test sets with the training set having about 70 percent of the data. Import train_test_split from sklearn to perform this operation. Use an existing package to train a multiple linear regression model on the training set using all the features (except the ones excluded above). Report the coefficients of the linear regression models and the following metrics on the training data: (1) RMSE metric; (2) R2 metric. [Hint: You may find the libraries sklearn.linear_model.LinearRegression useful.] (d)  Next, use the test set that was generated in the earlier step. Evaluate the trained model in step (c) on the testing set. Report the RMSE and R2 metrics on the testing set. (e)  Interpret the results in your own words. Which features contribute mostly to the linear regression model? Is the model fitting the data well? How large is the model error? 

 1https://www.kaggle.com/datasets/marklvl/bike-sharing-dataset?search=bike+demand+Washington& select=Readme.txt. You can also find a Readme.txt file that explains all the features in the dataset. 2Refer to https://docs.python.org/3/library/csv.html on how to load a csv file in Python. 

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

A brief introductory paragraph that introduces the songs and the

 A brief introductory paragraph that introduces the songs and the theories. Write three stories (1-2 paragraphs each) with a set of song lyrics (4-8 lines) that accompany each story. Write a 2-3 paragraph analysis of each of the 3 story/lyric pairings applying any 3 of the different theories from those

only 3 Qs please see them I need full answer

only  3 Qs please see them I need full answer for all 3 . Case Study In September 2018, Mohammed Salim joined KAAF Software Solutions (KAFF) as a Senior Programmer, with a handsome pay. Prior to this job, he worked successfully as an Assistant Programmer in Gant Computers (Gant). Salim

For this assignment, you will compose a reflection paper that

For this assignment, you will compose a reflection paper that responds to the prompts below. Appraise effective leadership strategies that you can implement in health care delivery. Apply methods of managing potential conflict in your career. Apply the decision-making process for designing organizational structures in health services organizations with which

The purpose of this assignment is to create a poster

The purpose of this assignment is to create a poster that will present the visual and graphic presentation of the capstone project. Poster presentation should clearly articulate what you did, how you did it, why you did it, and what it contributes to your field and the larger field of

Discuss how a company’s internal environment might affect the development

  Discuss how a company’s internal environment might affect the development of the corporate strategy. Include product life cycle, personnel, and organizational structure in your discussion as these components must receive consideration for success of any strategy. Answer the above bullet points in a minimum of 250 words.

Read chapter 18and 19of the class textbook and review the attached

Read chapter 18and 19of the class textbook and review the attached PowerPointpresentation. Once done answer the following questions; 1. Discuss the cultural development of the Japanese and the Jewish heritage. 2. What are the cultural beliefs of the Japanese and Jewish heritage related to health care and how they influence

The impact of the #MeToo movement on media and politics

Description Today, we will begin work on Assignment #3, which will be a proposal and annotated bibliography for the final paper. Please take you through the process of posing a question, exploring a conversation, finding sources, and developing your ideas. You will find that this produces a richer understanding of

Sitting and the ability to sit varied greatly between the

Sitting and the ability to sit varied greatly between the era of Louis XIV and Louis XV, “To Sit or Not to Sit: Etiquette at the Court of Louis XIV.” https://partylike1660.com/ten-rules-of-etiquette-for-your-versailles-visit/ http://thisisversaillesmadame.blogspot.com/2016/11/take-seat-seating-etiquette.html https://www.getty.edu/news/sitting-in-style/ Explain the difference between the two.   After reading the following articles and the information in the

Outdoor footwear market value is estimated to register US$ 82.62

  Outdoor footwear market value is estimated to register US$ 82.62 Bn in by 2032-end. Meanwhile, utilization of outdoor footwear is expected to increase at a CAGR of around 7.1% over the upcoming years. COVID-19 forced countries across the world to go into lockdowns. Moreover, the outdoor footwear industry persisted immune

For this assignment, you will write an opinion piece for

For this assignment, you will write an opinion piece for a local news article r advocating for the needs of offenders whom you believe has been unethically treated based on their mental health issues, social, or cultural background, or due to the general nature of treatment and assessment in forensic

How do its goals and mission fit in with your worldview and philosophy

Advanced registered nursing graduates are entering the profession at dynamic time when roles and scope of practice are shifting based on developments in legislation and policy in response to the evolving needs of the health care system. Professional nursing organizations play an important role in making sure the perspectives of

M You are still employed by Me Jean-Claude Van Damme,

M You are still employed by Me Jean-Claude Van Damme, who currently has a good volume of files in criminal law. He asks you to answer one or more questions for each of these files. You will have to send a memo (Word file) to Me Van Damme in which

Background: Here is a quote from Chapter 10 to ponder:

Background:   Here is a quote from Chapter 10 to ponder:  “Listen at all levels.  Some of the best ideas come from those on the front lines.” — Rosalind Brewer, president and CEO, Sam’s Club. To Read: Read Chapter 10: Listening To View: “5 Ways to Listen Better” 5 ways to