Question: ( 1 point ) Machine Learning Application Logistic regression ( LR ) is a type of model used to compute the probabitity that a class

(1 point) Machine Learning Application
Logistic regression (LR) is a type of model used to compute the probabitity that a class or an event is observed. LR is commonly used in machine learning applications. In thi. problem, we will implement a logistic regression models and then we will apply it.
a. A company is interested in determining the probability that a person will rent their e-scooters for a trip from Terrace to UPRM. They have a LR model that computes the probability that a person rents an e-scooter; we will use p to represent this probability. Create a function called lr model that implements the following LR model:
p=11+e-z
where z=0+1x1+2x2. The variable x1 represents a person's income and the variable x2 is the price of an e-scooter trip. The 0,1,2,x1, and x2 variables must be represented as the function parameters. The function must return the value of p.
b. The model classifies people as renters and non-renters of the company's e-scooters based on each person renting probability (p). The "decision rule" is as follows: if the probability p is greater than 0.5, the person is classified as a renter; otherwise, the person is classified as a non-renter. Create a function called classification that implements the decision rule. The function must return the value of a variable called decision. decision is 1 if p is greater than 0.5(i.e., the person is classified as a renter), and 0 otherwise (i.e., the person is classified as a non-renter).
c. Add the lr_model function and the classification function within function called demand_forecast. This function predicts the level of demand for scooters at different price levels. should be simil
 (1 point) Machine Learning Application Logistic regression (LR) is a type

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!