Machine Learning -- 2

Implement Logistic Regression from scratch

using a programming language of your choice. As part of your

implementation of logistic regression (LR), you will code the Gradient

Descent Algorithm that we discussed in class to find out the parameters

for Θ. One way to verify gradient descent is working as expected is to

monitor the value of J(Θ) whether it is decreasing with each training


Please address the subparts in each section to receive full credit and

justify what you did in your implementation as well as the results you


You will use observational data collected from caregivers of people with

dementia on their sleep quality. There are 20 independent variables and 1

dependent variable in the dataset and you will be specified which

variables to use (as source and target) to train your model. The dataset is

included in the Assignment with filename sleepQualityFinal.csv. You may

use any train/val/test split ratio and/or K-Fold cross-validation as you

see fit. Note that your model should never be exposed to your testing

(hold-out) data at train time.

1. Logistic Regression using One Feature

a. Train your Logistic Regression (LR) model to predict sleep_quality

using the amount of sleep (amountAsleep) as input feature.

b. Evaluate the performance of your model on the training set and

hold-out (testing) set using a metric discussed in class (e.g.,

precision, recall, F1 score, and confusion matrix). Discuss your


2. Logistic Regression with multiple variables and training


a. Train your LR model to predict the sleep_quality using the 12

features below:

swsLengthHR, swsTimeHR, swsLengthT, swsTimeT, decreasePercentageT,

swsTimeM, swsLengthM, decreasePercentageM, amountAsleep,

amountAwake, sleepEfficiency, epochPeakCounter.

b. Train your LR model to predict sleep_quality using forward selection

to select the most significant features in the dataset as input

variables. Which subset of features gave you the best performance?

What are your thoughts on these features getting selected?

c. Compare the performance of the model built using all of the

features in (2a) with the model trained using the selected features

(2b) . Which set of features performed better?

d. Train your LR model using training sample size within the range

{50, 100, 150} and the features selected in (2b) and compute

cross-entropy loss (log loss) on the same hold-out set and plot your

results (log-loss on y-axis and train sample size on x-axis). What is

the impact of increasing training sample size? Justify why the

log-loss decreases, increases or doesn’t change at all.

Regularization and Feature Scaling:

i. For the best performing model in Q 2 (Model from 2c), does

regularization improve the performance?

ii. Does Feature Scaling improve the performance for the model

in Q 3a?

Skills: Python, C++ Programming

See more: implement machine learning, implement algorithm machine learning java, scratch programming language, scratch programming language wiki, machine learning algorithms from scratch, machine learning algorithms from scratch with python pdf, implementing machine learning algorithms from scratch, google machine learning programming language, most popular machine learning programming language, coursera machine learning programming language, hackers programming language choice, best programming language for machine learning, machine learning algorithms from scratch with python, sql server 2017 machine learning services, with the r language installed, how to develop a machine learning model from scratch, best programming language for ai and machine learning, coursera machine learning week 2 programming assignment answers, machine learning from the scratch using python, machine learning engineer programming language, machine learning is based on which language

About the Employer:
( 5 reviews ) Fairborn, United States

Project ID: #31865530

Awarded to:


Hi, How are you? Very happy to bid your project because my skills are fitted in your project. I have 12 years experience in Machine learning ,Deep learning ,NLP and AI. I am very familiar with CNN, RNN, LSTM, SVM , Re More

$100 USD in 3 days
(7 Reviews)

8 freelancers are bidding on average $151 for this job


Hi, Hope you are doing well. I have over 6 years of rich experience in data science and machine learning. I have worked hands on in Python with different datasets for data wrangling, data manipulation, data analysis More

$200 USD in 3 days
(11 Reviews)

Hi there, I am a talented python dev, and I suppose I can handle this task successfully. Please let me know more details, and Please give me your chance. I look forward to hearing from you. More

$139 USD in 7 days
(3 Reviews)

How are you, Deeply interested in your project~ As a Python/Machine Learning/Web Scraping/Data Mining developer, fully capable with not only the AI model, Python script part but also the Backend RestAPI integration, Da More

$140 USD in 5 days
(7 Reviews)
(3 Reviews)

Hi Dear! I already check your description with carefully and very interesting your project. Also I have a development experience of project like your project. Specially I have more than 10 years of experience in softwa More

$135 USD in 3 days
(3 Reviews)

Hello, How are you today? Thank you for posting this project, and I'm very happy to bid on your project. I've read carefully your project details. I have rich experiences related to your project. Your satisfaction with More

$230 USD in 7 days
(0 Reviews)

Hi I just saw your job description and understood your demand clearly. As a super developer, I have 8+ years of experience in deep learning development using python For your project, I'm going to use the tensorflow fo More

$140 USD in 7 days
(0 Reviews)