The following are sample screen shots to illustrate the expected behavior of your program. Your program must display the same information with the same format. Welcome to the Simple Machine-Learning Function Program: ++ Please enter a Weekday and Time, respectively: suNDaY NIGHT-tiMe Value of the prototype Learning Function, Z, is: 1.47 Thank you for contributing to this Machine Learning project! Figure 4. Sample1 output of Question2 Welcome to the Simple Machine-Learning Function Program: ++ Please enter a Weekday and Time, respectively: thursday Night-time Value of the prototype Learning Function, Z, is: 1.52 Thank you for contributing to this Machine Learning project! Figure 5. Sample2 output of Question2 Welcome to the Simple Machine-Learning Function Program: Please enter a Weekday and Time, respectively: nIGHt-TiMe FriDAy Error: An invalid value has been entered for the 'Time' variable. Kindly retry agair Value of the prototype Learning Function, z, is: 0.00 Thank you for contributing to this Machine Learning project!
Question 2 – Simple Machine-Learning Function Java Program
A Learning Function is an empirical formula which isresponsible for regulating the training of an agent
with respect to Machine Learning and
prototype Learning Function, ?, which tunes and regulates the training as well as learning in our AI
agents. This is defined such that: ? = ? ∗ Ω
Given that Ω = 0.567143 and ? is a dynamic variable, which is defined with respect to the day of
the week and the time of the day, as illustrated in the table below:
Weekday/Time | Day-Light | Night-Time |
Monday | 2.53 | 3.25 |
Tuesday | 3.15 | 2.99 |
Wednesday | 3.00 | 3.99 |
Thursday | 2.41 | 2.68 |
Friday | 1.99 | 3.73 |
Saturday | 3.59 | 2.86 |
Sunday | 2.00 | 2.59 |
Therefore, write a Java class/program correctly such that your source code will accomplish the following:
1. Display a prompt message for the user to enter the Weekday and the Time as a single input separated via the space character. Thus, valid inputs for Weekday and Time variables are: Monday – Sunday and Day-Light as well as Night-Time, respectively. Also, these inputs MUST be case-insensitive.
2. Validate the user’s inputs to ensure that only valid values were entered for Weekday and Time inputs. If an invalid input was received; display the respective error message, and end the program with a note to the user to retry again.
3.If the user has entered a valid input with respect to Weekday and Time, process the user’s inputs to determine the corresponding value for variable, ?.
4. Thereafter, compute the resultant value for our prototype learning function, ?, using the aforementioned empiric formula.
5. You MUST use the switch() statement to implement all your decision/selection logic withrespect to the value for variable ? in the Weekday/Time table given herein. In this regard, using an if() statement in lieu of switch() statement will be assumed as a logical failure.
6. After processing, display a confirmation message to the user in the form below: Value of the prototype Learning Function, ?, is: X.XX
7. Finally, display a complimentary-close message as follows: Thank you for contributing to this Machine Learning project!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images