Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

Logistic regression and Non linear transformations with python coding

Logistic regression and Non linear transformations with python coding

Logistic regression and Non linear transformations with python coding

Description

Non-linear transformation. The file Voices contains data related to the
voices of 1000 different humans. The first column represents the intensity
of the voice. The second column represents the tone of the voice. The
final column says whether the voice belongs to a young adult, 18 to 30
years old (1 ? yes, ?1, ? N o). Notice that both, intensity and tone, are
normalized variables, going from ?1 to 1.

(a) Use a non-linear circular hypothesis to classify the data (slide 4). For
that:
etermine by inspection r, the radius of the circle.
ompute the predicted output y = sign(r2 ?intensity2 ?tone2).
ompute Ein.

  • (b) Transform the data to its linear version (slide 5), and compute a
    linear regression over the transformed data to calculate w. Com-
    pute the Ein obtained with the linear regression and compare it with
    the the error obtained with the non-linear hypothesis. Draw your
    conclusions.

2. Logistic regression. The file Weekly consists of 1, 089 weekly returns
for 21 years, from the beginning of 1990 until the end of 2010. For each
week, we have recorded the percentage returns for each of the five previous
trading weeks, Lag1 through Lag5. We have also recorded Volume (the
number of shares traded on the previous week, in billions), Today (the
percentage return on the week in question) and Direction (whether the
market was Up or Down on this week).
(a) Use the full data set to perform a logistic regression (slide 39) with
Direction as the response and the five lag variables plus Volume
as predictors. The learning rate ?, and the number iterations are
already defined in the template as 0.1 and 200. Report the coefficients
(w). Draw your conclusions. Do any of the predictors appear to be
significant?
(b) Show how Ein evolves with the iterations (slide 37, second equation).
(c) Report the probability output g(x) for the first 10 data points of your
training set (use the sigmoid function, slide 30).
 

(d) Compute the overall fraction of correct predictions (using the training
set). Hint: Use 0.5 as a threshold for the probability g(x) to obtain
a binary output. 

Explanation & Answer:

1 Worksheet
User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Essay Noon only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Essay Noon are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Essay Noon are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Essay Noon, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20