CSE4_574_Project1
.pdf
keyboard_arrow_up
School
University at Buffalo *
*We aren’t endorsed by this school
Course
474
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
2
Uploaded by AgentGull4124
1 Using UB Brightspace Submission
: This is a group project for up to two students
. Please enroll yourself in Brightspace groups. All project group members must join the same group and submit one solution under your group. CSE4/574 Spring 2024 Introduction to Machine Learning Programming Project 1 Linear Models Due Date: Mar 8
th
2024 Maximum Score: 100 Note: Do not use any Python libraries/toolboxes, built-in functions, or external tools/libraries that directly perform classification, regression or function fitting
. Using any external code will result in 0 points for the corresponding problem. Also submit a project report (pdf file) summarizing your findings. In the problem statements below, the portions for REPORT need to be discussed in the project report.
Data Set
: Use California housing dataset using following code. from sklearn.datasets import fetch_california_housing california_housing = fetch_california_housing(as_frame=True).frame Submission You are required to submit a single file called proj1.zip using Brightspace. File proj1.zip must contain 2 files: report.pdf and script.py
. Submit your report in a pdf format. Please indicate the team members on the top of the report. The code file should contain all implemented functions. Problem 1: Exploratory data analysis (5 code + 5 report = 10 Points) Explore and visualize the dataset to understand distribution of features and target variable. Summarize your finding/observations in report.
2 Problem 2: Linear Regression (10 code + 5 report = 15 Points) 1.
Implement simple linear regression using a single feature (use MedInc - median income in block group
as a feature). 2.
Evaluate model performance using appropriate metrics. 3.
Plot the errors on train and test data. 4.
Summarize your finding/observations in report. Problem 3: Multiple Linear Regression (20 code + 5 report = 25 Points) 1.
Extend the model to include multiple features. 2.
Compare the performance of multiple linear regression with simple linear regression. 3.
Summarize your finding/observations in report. Problem 4: Locally Weighted Linear Regression (25 code + 5 report = 30 points) 1.
Choose a Kernel Function: LWLR involves assigning weights to data points based on their distance from the prediction point. You'll need to choose a kernel function (e.g., Gaussian kernel) to determine these weights. 2.
Implement Locally Weighted Linear Regression: Create a function that takes a prediction point, the dataset, and the chosen kernel function. For each data point in the dataset, calculate the weight based on its distance from the prediction point using the kernel function. 3.
Use these weights to fit a weighted linear regression model to the local data points, giving more influence to nearby observations. 4.
Predict the target variable for the given prediction point using the locally fitted model. 5.
Tune Hyperparameters: Experiment with different bandwidth (tau) values in the kernel function to control the degree of locality. This hyperparameter determines how much influence nearby points have on the prediction. 6.
Evaluate the Model: Evaluate the performance of the LWLR model using appropriate metrics, such as mean squared error or R-squared. 7.
Summarize your finding/observations in report. Problem 5: Model Comparison and Selection (10 code + 10 report = 20 points) Using the results obtained from previous 4 problems, make final recommendations for anyone using regression for predicting housing prices using these input features.
Compare the various approaches in terms of training and testing error. What metric should be used to choose the best setting?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Explain the concept of marker interfaces and their usage in programming. Provide examples of marker interfaces from standard libraries or frameworks.
arrow_forward
PLEASE CODE IN PYTHON
Problem DescriptionBoring is a type of drilling, specifically, the drilling of a tunnel, well, or hole in the earth. With some recent events, such as the Deepwater Horizon oil spill and the rescue of Chilean miners, the public became aware of the sophistication of the current boring technology. Using the technique known as geosteering, drill operators can drill wells vertically, horizontally, or even on a slant angle.
A well plan is prepared before drilling, which specifies a sequence of lines, representing a geometrical shape of the future well. However, as new information becomes available during drilling, the model can be updated and the well plan modified.Your task is to write a program that verifies validity of a well plan by verifying that the borehole will not intersect itself. A two-dimensional well plan is used to represent a vertical cross-section of the borehole, and this well plan includes some drilling that has occurred starting at (0, −1) and moving…
arrow_forward
using Java GUI Interface language
arrow_forward
Description
Greetings!
Task: Write a program that will ask for the user's name and output their name mixed with a command
line argument given as the greeting.
Command line args will be formally introduced next week, however, you're encouraged to do
some of your own research for this challenge! Python docs:
https://docs.python.org/3/library/sys.html#sys.argv
PYTHON
1 import sys
2
3 # e.g. $ python main.py foo bar
4 # Arguments would contain:
5
6 sys.argv[0] # => main.py
7 sys.argv[1] % => foo
8 sys.argv[2] # => bar
Your program should read the greeting from command line arguments, ask the user for their
name, and then output a custom greeting, like so:
Example 1
$ python greet.py Yo!
What's your name? Jamal
Yo! Jamal
Example 2
$ python greet.py "G'day"
What's your name? Summer
G'day Summer
Tip: For G'day, be sure to include in double quotes, so Bash treats it as one argument.
arrow_forward
PYTHON
# Part 1: Tasks
# Info
# Bunch of task
# Task has status: Not Started, In Progress, Completed
# Task can have a prerequisite/parent task
# You can’t start a task until prerequisite/parent task is completed
# Automatically start the next task when it’s prerequisite/parent is completed
# Functionality
# Start a task
# Complete a task
# Example
# A -> B -> C, D # task = {# "status"# "prereq"}
arrow_forward
Software development C#The application developed in Part 1 is already useful in terms of functionality, but it has a severe usability flaw: the data is not persisted, forcing the user to capture all the data from scratch if the application is executed again.For this part, you will continue working on the application you developed in Part 1. Remember to implement any feedback provided by your lecturer on Part 1 before working on Part 2. Marks will be awarded for this (see the rubric for details).All the requirements from Part 1 must still be met by the program, with the following changes and additions:1. The software shall persist the data in a SQL database.2. The user shall be able to register with a username and password.3. The software shall store only the hash of the password in the database.4. The user shall be able to log into the software with their username and password.5. The user shall only be able to see their own data and never that of other users.Non‐functional…
arrow_forward
To start execution of a model
you can
keyboard shortcut, Ctrl+S
click the Start button on the model's
toolbar
keyboard shortcut, Ctrl+T
select Start from the model editor's
Simulation menu
arrow_forward
it should be done with the use of API
arrow_forward
Overview:
A Sports Club is an organization formed in order to help its members develop interest in certain
sports.
Usually, members interested in the same sport are divided into groups and an expert trainer is
responsible for training each group.
In this TMA, it is required to help the head of a Sports Club for kids implement application to
keep track of the kids (members of the club) and the sports they are interested in.
Requirements:
After a quick meeting with the head of the sports club, you got the following information:
• Itis required to store the whole data (all groups of all sports) in one collection.
Each group has a number, a trainer and they are interested in a certain sport (e.g. football).
In addition, it contains many kids with flexibility of adding and removing kids within a given
limit for the maximum number of kids who could be in the same group (where this limit is
fixed and unified for all groups). Furthermore, there are other attributes (add at least 2
attributes…
arrow_forward
Overview:
A Sports Club is an organization formed in order to help its members develop interest in certain
sports.
Usually, members interested in the same sport are divided into groups and an expert trainer is
responsible for training each group.
In this TMA, it is required to help the head of a Sports Club for kids implement application to
keep track of the kids (members of the club) and the sports they are interested in.
Requirements:
After a quick meeting with the head of the sports club, you got the following information:
It is required to store the whole data (all groups of all sports) in one collection.
Each group has a number, a trainer and they are interested in a certain sport (e.g. football).
In addition, it contains many kids with flexibility of adding and removing kids within a given
limit for the maximum number of kids who could be in the same group (where this limit is,
fixedandunitiedterallgroues). Furthermore, there are other attributes (add at least 2
attributes from…
arrow_forward
Overview: A Sports Club is an organization formed in order to help its members develop interest in certain sports. Usually, members interested in the same sport are divided into groups and an expert trainer is responsible for training each group. In this TMA, it is required to help the head of a Sports Club for kids implement application to keep track of the kids (members of the club) and the sports they are interested in.
Requirements:
After a quick meeting with the head of the sports club, you got the following information: It is required to store the whole data (all groups of all sports) in one collection. Each group has a number, a trainer and they are interested in a certain sport (e.g. football). In addition, it contains many kids with flexibility of adding and removing kids within a given limit for the maximum number of kids who could be in the same group (where this limit is, fixedandunitiedterallgroues). Furthermore, there are other attributes (add at least 2 attributes from…
arrow_forward
Deep access is preferred over shallow access from the perspective of a developer, as opposed to a user.
arrow_forward
Submitting: Each INDIVIDUAL should submit his/her work online, both source code and output screenshots. All assignments should be submitted ON TIME.
Collaboration among students is strongly encouraged. It is legal to get approaches and ideas from students, the internet, etc.
However, it is ILLEGAL to get a code (if a part of the code is submitted by two or more students, ALL are guilty of cheating).
Any minor cheating will not be tolerated
arrow_forward
JAVA
A popular technique used with GUI programs is a programming design called Model-View-Controller. This is a programming technique where you split your program up into three distinct portions - the model, view, and controller - and have each portion handle a single, separate function of the program. Model-View-Controller is not built in to any programming language, but is rather a method programmers use when designing their programs.
The model handles the program's data. Whether it is a series of variables, some files, or a database, the model is responsible for managing and retrieving the data. The view, controller, and user never see or interact with the data directly; it all goes through the model.
The view handles the presentation of the data. This would be the GUI design in a graphical program. The view does not retrieve the data, handle errors with the data, or manage user requests. The view's only purpose is to construct the visuals for whatever data is passed to it,…
arrow_forward
In the software industry, "cohesion" and "coupling" are used interchangeably.
arrow_forward
Salesforce
Please describe some Salesforce annotations that we use for the test classes and testing methods in the Salesforce.
arrow_forward
C programming Debugging
arrow_forward
Deep access is preferable to shallow access from the perspective of a developer rather than a user.
arrow_forward
Jdbc java program
Note: please do a jdbc example, you can take any scenario it has to contain student names and their information's.
Please provide a clear and big photos of output
arrow_forward
Looping is an essential component of any script or application written in Python. Looping allows you to run repeated operations without copying code. This Discussion Board is designed to help illustrate each loop type and when to use a particular loop type. Select either the For or While loop and provide the following in your Discussion Board post: A description of what the loop does An example of why you would use the loop you selected over the other Remember to use a reference to your learning materials or an outside source in at least one post each week.
arrow_forward
Write, test, and debug (if necessary) PHP scripts for the specifications that follow write functions and the code to test them.
1. Parameter: An array of strings. Return value: A list of the three strings that occur most frequently in the parameter array
arrow_forward
Object oriented
programming
Using C++ programming
language
Creating program make user
insert his birthday date
yy/mm/dd and display his
Astrological sign using four
of these Threads
inheritance-1
vector-2
opreator overloading-3
Template-4
Expection Handling -5
class-6
freind function and friend-7
class
arrow_forward
Examples are used to demonstrate concepts related to programming and user environments.
arrow_forward
Examples are used to educate students about programming environments as well as user environments.
arrow_forward
Explain the role of interfaces in promoting code reusability and maintainability.
arrow_forward
C# programming
slope calculator that can identify types of slope
arrow_forward
Computer Graphics:
Using Unreal Engine or any CGI Software provide two rendered objects in which at least five(5) of the following techniques are realized.
Sphere , Materials , Point Lighting , Spot Lighting , Directional Lighting , Ambient Lighting , Recursive Depth , Soft Shadow , Transparent Object , Depth of Field , Motion Blur , Texture Mapping and 3D Transformation
There is no restriction on what techniques you choose to demonstrate, nor on the scene you choose to develop, but you must submit the following.
A still rendered image, provided as a *.jpg or *.png file
A five to ten (5-10) second animation clip, provided as an *.mpg or suitable video formatted file.
arrow_forward
Java Language
Create Clock class and demonstrate the features of the class with the driver program. upload a single file that contains the source code with documentation for both the clock class and the driver and execution of the program. The rule for execution is that you execute enough times with sufficient data that every line in the program is executed).
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- Explain the concept of marker interfaces and their usage in programming. Provide examples of marker interfaces from standard libraries or frameworks.arrow_forwardPLEASE CODE IN PYTHON Problem DescriptionBoring is a type of drilling, specifically, the drilling of a tunnel, well, or hole in the earth. With some recent events, such as the Deepwater Horizon oil spill and the rescue of Chilean miners, the public became aware of the sophistication of the current boring technology. Using the technique known as geosteering, drill operators can drill wells vertically, horizontally, or even on a slant angle. A well plan is prepared before drilling, which specifies a sequence of lines, representing a geometrical shape of the future well. However, as new information becomes available during drilling, the model can be updated and the well plan modified.Your task is to write a program that verifies validity of a well plan by verifying that the borehole will not intersect itself. A two-dimensional well plan is used to represent a vertical cross-section of the borehole, and this well plan includes some drilling that has occurred starting at (0, −1) and moving…arrow_forwardusing Java GUI Interface languagearrow_forward
- Description Greetings! Task: Write a program that will ask for the user's name and output their name mixed with a command line argument given as the greeting. Command line args will be formally introduced next week, however, you're encouraged to do some of your own research for this challenge! Python docs: https://docs.python.org/3/library/sys.html#sys.argv PYTHON 1 import sys 2 3 # e.g. $ python main.py foo bar 4 # Arguments would contain: 5 6 sys.argv[0] # => main.py 7 sys.argv[1] % => foo 8 sys.argv[2] # => bar Your program should read the greeting from command line arguments, ask the user for their name, and then output a custom greeting, like so: Example 1 $ python greet.py Yo! What's your name? Jamal Yo! Jamal Example 2 $ python greet.py "G'day" What's your name? Summer G'day Summer Tip: For G'day, be sure to include in double quotes, so Bash treats it as one argument.arrow_forwardPYTHON # Part 1: Tasks # Info # Bunch of task # Task has status: Not Started, In Progress, Completed # Task can have a prerequisite/parent task # You can’t start a task until prerequisite/parent task is completed # Automatically start the next task when it’s prerequisite/parent is completed # Functionality # Start a task # Complete a task # Example # A -> B -> C, D # task = {# "status"# "prereq"}arrow_forwardSoftware development C#The application developed in Part 1 is already useful in terms of functionality, but it has a severe usability flaw: the data is not persisted, forcing the user to capture all the data from scratch if the application is executed again.For this part, you will continue working on the application you developed in Part 1. Remember to implement any feedback provided by your lecturer on Part 1 before working on Part 2. Marks will be awarded for this (see the rubric for details).All the requirements from Part 1 must still be met by the program, with the following changes and additions:1. The software shall persist the data in a SQL database.2. The user shall be able to register with a username and password.3. The software shall store only the hash of the password in the database.4. The user shall be able to log into the software with their username and password.5. The user shall only be able to see their own data and never that of other users.Non‐functional…arrow_forward
- To start execution of a model you can keyboard shortcut, Ctrl+S click the Start button on the model's toolbar keyboard shortcut, Ctrl+T select Start from the model editor's Simulation menuarrow_forwardit should be done with the use of APIarrow_forwardOverview: A Sports Club is an organization formed in order to help its members develop interest in certain sports. Usually, members interested in the same sport are divided into groups and an expert trainer is responsible for training each group. In this TMA, it is required to help the head of a Sports Club for kids implement application to keep track of the kids (members of the club) and the sports they are interested in. Requirements: After a quick meeting with the head of the sports club, you got the following information: • Itis required to store the whole data (all groups of all sports) in one collection. Each group has a number, a trainer and they are interested in a certain sport (e.g. football). In addition, it contains many kids with flexibility of adding and removing kids within a given limit for the maximum number of kids who could be in the same group (where this limit is fixed and unified for all groups). Furthermore, there are other attributes (add at least 2 attributes…arrow_forward
- Overview: A Sports Club is an organization formed in order to help its members develop interest in certain sports. Usually, members interested in the same sport are divided into groups and an expert trainer is responsible for training each group. In this TMA, it is required to help the head of a Sports Club for kids implement application to keep track of the kids (members of the club) and the sports they are interested in. Requirements: After a quick meeting with the head of the sports club, you got the following information: It is required to store the whole data (all groups of all sports) in one collection. Each group has a number, a trainer and they are interested in a certain sport (e.g. football). In addition, it contains many kids with flexibility of adding and removing kids within a given limit for the maximum number of kids who could be in the same group (where this limit is, fixedandunitiedterallgroues). Furthermore, there are other attributes (add at least 2 attributes from…arrow_forwardOverview: A Sports Club is an organization formed in order to help its members develop interest in certain sports. Usually, members interested in the same sport are divided into groups and an expert trainer is responsible for training each group. In this TMA, it is required to help the head of a Sports Club for kids implement application to keep track of the kids (members of the club) and the sports they are interested in. Requirements: After a quick meeting with the head of the sports club, you got the following information: It is required to store the whole data (all groups of all sports) in one collection. Each group has a number, a trainer and they are interested in a certain sport (e.g. football). In addition, it contains many kids with flexibility of adding and removing kids within a given limit for the maximum number of kids who could be in the same group (where this limit is, fixedandunitiedterallgroues). Furthermore, there are other attributes (add at least 2 attributes from…arrow_forwardDeep access is preferred over shallow access from the perspective of a developer, as opposed to a user.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage