Step by step I inch my way up the beautiful marble stairs of Grand Central Station, becoming closer and closer to my favorite place; the concrete jungle, better known as New York City. I can’t help but to fantasize about life in the city. I strut my way down Broadway in my two-thousand dollar Louboutins accompanied by my Spring 2014 Prada dress suit, paying no attention to the walk sign that displays a flashing hand because I have a high paying job that I need to get to. My glamorous chimera has only just begun when I feel the grasping tug of a warm hand struggling to find stability. I look at my embarrassed dad one step below me, as he tensely grabs the brass railing while struggling to climb the twenty stairs that bring absolute delight to his little princess.
I wish I could say that my father had sprained his ankle or had broken his leg. I also wish I could say that I’ve been skiing, hiking or jogging with my dad. But none of that’s true. The year 2000 has no significance to me other than that year my dad, a whole-hearted, gregarious man, was destroyed. The day began as every other day on the job did; a brief hello to everyone occupying the worn red and blue leather seats followed by the mastered task of attacking the small white tickets with the oversized hole puncher. Just as my dad greeted one of his “regulars” his radio was bombarded with shouts from a coworker on a different train screaming, “Mike! Stop the train! Your undercarriage is on fire! Evacuate immediately!” Dropping any other care in the world, my dad ran through all cars demanding all passengers to abandon the train quickly. Finally stopping at the location of the waving and smoking fire, my dad jumped to the needs of the fatigued and suffocating passengers without hesitation. Heroically speaking my dad claims, “The passengers were my responsibility. I had to get them off the train if it was the last thing I did.” On September 13, 2000, an average forty-year-old man saved the lives of thirty Metro-North commuters despite his twelve fractured bones, various torn ligaments and tendons, endless gashes, and loss of a lung due to inhalation of heavy smoke. With a permanently muffled voice and troubled breathing, my dad claimed the title of a hero.
My dad is continuously reminded of his heroic moment as he looks down at the thirteen scars covering his body or hears his raspy voice straining itself to answer a simple question. At any point in time, he is able to relive the catastrophe as he saved the lives of desperate strangers. My story is a little different. I cannot look down at my arm and see a soft purple scar to remind me of a heroic deed. Rather, I see my dad struggle to walk, talk or breathe and internally inflate with sorrow and anger. Selfishly, I yearn for a dad that’s a dad, not an observer. I want a dad that could have chased me around Indian River soccer field, jogging ten feet behind at a sluggishly slow pace yelling, “You’re so fast, I’m never going to catch you!” I want a dad that could have surprised my family with a vacation because he secretly decided to work overtime a few days every week. I want a dad who can decide to go to the gym and workout for an hour because he has a small window of time before he has to pick me up from tennis practice.
My emotions are uncontrollable as I think of how I could have grown up differently if my dad never saved those passengers. I long for a life I can’t have, but I also realize how blessed I am with the life I do have. Every day I decide to glance over the scars that ruin his skin, the hoarse voice that hides his expression, and the limp muscles that prevent him from participating in endless activities because I know that is not what matters. Rather I value each moment my dad lectures me on how to hit a golf ball right or zoom in to capture the perfect picture. I understand how lucky I am to have someone to teach and guide me. I continuously look into my dad’s heart, filled with life, energy, and love and appreciate the amazing dad that I am fortunate enough to have.
For this assignment, you need to build a linear regression model from scratch. Below is a detailed instruction of what you may need to do.
Dataset PreparationYou need to load the dataset using sklearn.datasets. load_diabetes. More information about the function can be found at: https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_diabetes.html#sklearn.datasets.load_diabetes
After loading the dataset, randomly shuffle the dataset to split the dataset to train/dev/test sets.Use the 70% of data for the train set, 15% for the dev set, and 15% for the test set
You need to make sure that the labels and features are still matching after shuffling the data.
You may want to use the random shuffle function provided by Numpy.
Univariate Linear Regression DevelopmentYou need to implement a univariate linear regression model from scratch.You need to use a gradient descent algorithm to solve the optimal parameters for the univariate linear regression model.
You need to implement the gradient descent algorithm from scratch.
The dataset contains 10 features; however for a univariate linear regression model, you may only use one feature. Thus, to build the linear regression model, you need to decide which feature to you. There are three approaches you may use:You may train 10 univariate linear regression models, one model for each feature, and select the one with the best performance on the dev set.
You may run a feature selection algorithm to select a feature. There are plenty of feature selection algorithms available. Feel free to search on the internet and use a method at your choice.
You may use PCA for dimension reduction to reduce the number of features to 1. There are many python libraries that provide PCA algorithms you may use. In fact, scikit-learn also has a function. Feel free to search on the internet and choose one at your choice.
Test the ModelTest the model using the test set.
SubmissionYou need to submit a written report for this assignment. For this report, you need to: Explain what you have done
Report the best performance on the test set (in terms of MSE)
Include your code as an appendixYou could save your Colab code as a PDF file and attach it to your report, or you could copy and paste your code into the report.If you want to copy/paste your code, make sure to maintain the appropriate indentation and make the code readable.
This assignment is worth 100 points.
(50 pts) The code must be runnable and works as expected
(50 pts) The report must contain the three components
Essay Writing at Online Custom Essay
Review This Service