Programming Logic & Design Comprehensive
9th Edition
ISBN: 9781337669405
Author: FARRELL
Publisher: Cengage
expand_more
expand_more
format_list_bulleted
Question
Q1): Given the following dataset
Restaurant waiting: the problem of deciding whether to wait for a table at a
restaurant.
For this problem the output, y, is a Boolean variable that we will call WillWait.
The input, x, is avector of ten attribute values, each of which has discrete
values:
1. Alternate: whether there is a suitable alternative restaurant nearby.
2. Bar: whether the restaurant has a comfortable bar area to wait in.
3. Fri/Sat: true on Fridays and Saturdays.
4. Hungry: whether we are hungry right now.
5. Patrons: how many people are in the restaurant (values are None, Some, and
Full).
6. Price: the restaurant’s price range ($, $$, $$$).
7. Raining: whether it is raining outside.
8. Reservation: whether we made a reservation.
9. Type: the kind of restaurant (French, Italian, Thai, or burger).
10. WaitEstimate: host’s wait estimate: 0–10, 10–30, 30–60, or >60minutes
Restaurant waiting: the problem of deciding whether to wait for a table at a
restaurant.
For this problem the output, y, is a Boolean variable that we will call WillWait.
The input, x, is a
values:
1. Alternate: whether there is a suitable alternative restaurant nearby.
2. Bar: whether the restaurant has a comfortable bar area to wait in.
3. Fri/Sat: true on Fridays and Saturdays.
4. Hungry: whether we are hungry right now.
5. Patrons: how many people are in the restaurant (values are None, Some, and
Full).
6. Price: the restaurant’s price range ($, $$, $$$).
7. Raining: whether it is raining outside.
8. Reservation: whether we made a reservation.
9. Type: the kind of restaurant (French, Italian, Thai, or burger).
10. WaitEstimate: host’s wait estimate: 0–10, 10–30, 30–60, or >60minutes
Please show work and equations etc. no cdoing required ..
A): [Alt = “Yes” , Bar = “ No” ]
B): [ Alt = “Yes”, Bar=” No”, Price = “$”.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Similar questions
- Programming langauge: Python Prompt: Pick a genre of your choice and provide average movie’s ratings by the following four time intervals during which the movies were released withiin 10 years group (i.e. 1970 to 1979, 1980 to 1989, 1990 to 1999, 2000 to 2009) Mock dataframe: *attached screenshot*arrow_forwardin c++ programming plzarrow_forwardimport numpy as npfrom scipy.optimize import minimizeimport matplotlib.pyplot as pltimport pickle #Implement the function calAnaliticalSolution def calAnaliticalSolution(X,y): # Inputs: # X = N x d # y = N x 1 # Output: # w = d x 1 (which is the parameter calculated from data X and label y using alalytical solution) # IMPLEMENT THIS METHOD - REMOVE THE NEXT LINE w = np.zeros((X.shape[0],1)) return w #Implement the function calRegressionError def calRegressionError(w,Xtest,ytest): # Inputs: # w = d x 1 # Xtest = N x d # ytest = N x 1 # Output: # mse = scalar value (which is the error of the regression model) # IMPLEMENT THIS METHOD - REMOVE THE NEXT LINE mse = 0 return mse Xtrain,ytrain,Xtest,ytest = pickle.load(open('diabetes.pickle','rb')) x1 = np.ones((len(Xtrain),1))x2 = np.ones((len(Xtest),1))Xtrain_i =…arrow_forward
- Using the ∑ = {0, 1}, Write the regex for the following descrip on: 1. {w | w has an even number of 0s and each 0 is followed by at least one 1} 2. {w | w doesn’t contain 01}arrow_forwardfunction loginValidate () { var id = document.getElementById ('myid').value; var pass = document.getElementById('mypassword').value; if ((id == null : id alert ("ID and Pasword both must be filled out") : "") && (pass == null , pass == ")){ == return false: else if (id == null || id == "") { alert ("ID must be filled out "); return false; else if (pass == null || pass == "") { alert ("Password must be filled out "); return false;arrow_forwardFor example, the number 35190 can be cut between 351 and 90 digits, from 3 + 5 + 1 = 9 and 9 + 0 = 9. On the other hand, the number 555 has no place to rest (you must divide between digits). Create a retrieval function if the number has a breakpoint, and is false if not. Examples break_point (159780) - true break_point (112) - true break_point (1034) - true break_point (10) lie break_point (343) – liearrow_forward
- function result = result = ''; 1 tokens_to_str_code(token_mat, time_unit) 3 for i =1:size(token_mat,1) 4 5 if(token_mat (i,1) if(token_mat(i,2) > 4*time_unit) result = strcat(result,"-"); elseif((token_mat(i,2) > time_unit) && (token_mat(i,2) 8*time_unit) result = strcat(result,"/"); elseif((token_mat(i,2) 11 == 0) 12 13 14 4*time_unit) && (token_mat(i,2) < 8*time_unit)) 15 result strcat(result," "); %3D 16 end 17 end 18 end 19 end 20 21 Check Test Expected Got tokens %3D [1 4; е 3; 1 3; е 1; 1 3; е 1; 1 1; ө 1; 1 1 ]; time_unit = .5; disp( tokens_to_str_code( tokens, time_unit )) tokens = [ 0 4; 1 1457; 0 463; 1 1457; 0 463; 1 497; 0 1423; 1 1457; ---/..--.. --.---/..--.. о 463; 1 1457; 0 463; 1 1457; ө 3343; 1 497; ө 463; 1 497; 0 463; 1 1457; 0 1423; 1 1457; 0 463; 1 497; 0 463; 1 497; e 379 ]; time_unit = 240; disp( tokens_to_str_code( tokens, time_unit ))arrow_forwardQuestion 03: Write a simplified sinmulation of Ping-Pong according to the following rules: • Ranks 0 and 1 participate • Rank 0 starts with the ball • The rank with the ball sends it to the other rank Both ranks count the number of times they get the ball After counting to 1 million, the rank gives up • There are no misses or pointsarrow_forward← → CO Iteration Quiz 1 2 3 Consider the following code segment. B What is the value of result after the code segment is executed? D 6 10 15 ☐ apclassroom.collegeboard.org/103/assessments/assignments/49699569 21 186 2 3 W # e с $ 4 r % 5 x-0 result 0 REPEAT UNTIL (x > 5 t A result result + x X-X + 1 Oll 6 M - 31 DELL y & الافكافل 7 u 8 K 9arrow_forward
- Solution should be provided by using PHP languagearrow_forwardUsing JavaScriptConstruct the function based on the following requirements below:Name:multiplyArguments:n1, n2Body:var result = n1 * n2;Returns the result of the product of the two givenarguments:return result;arrow_forward01. Please _Given an integer num, repeatedly add all its digits until the result has only one digit, and return it. Example 1: Input: num = 38 Output: 2 Explanation: The process is 38 --> 3 + 8 --> 11 11 --> 1 + 1 --> 2 Since 2 has only one digit, return it. Example 2: Input: num = 0 Output: 0 Constraints: 0 <= num <= 231 - 1 Follow up: Could you do it without any loop/recursion in O(1) runtime? //code here class Solution {public: int addDigits(int num) { }}; //.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole