Question

This week is about conditional statements and conditional learning. Think about the decisions you make in...

This week is about conditional statements and conditional learning. Think about the decisions you make in your everyday life. How many are conditional? Buy this, not that. Do this, not that, etc. So, how does this fit into algorithms? Why do computers need to make decisions? Discuss the merits of decision tree structures in computing and why they are necessary. Be sure to highlight what decision tree structures do and how they are important, or if they are at all, to programs and computing in general.

Homework Answers

Answer #1

1) Conditional Statements

Conditional statements, expressions and constructs are features of a computer programming language, which perform different computations or actions depending on whether a specified condition evaluates to true or false. In otherwords, Conditional statements help you to make a decision based on certain conditions. These conditions are specified by a set of conditional statements having boolean expressions which are evaluated to a boolean value true or false.

2)Conditional statement in algorithm

Hree we are going to see how conditional statement is placed in algorithm. There are many conditional statement is available like IF/ELSE, AND/OR, WHILE. For example: In IF/ELSE scenario, we can code the program to provide the output if its matches with conditions defined in IF statement and if the condition doesnt met then program will execute the ELSE condition.

Example:

if Age > 18 :
{
Print "You are eligible to vote"
}

Else :
{
Print "You are not eligible to vote"
}

In the above conditional statement, we defined 1 condition and instructed program to execute 1 statement if its matches the IF conditions and execute the 2 statement if the IF condition doesnt met.

3) Decision Tree and Why computer need to make decisions ?

Decision tree alogorithm is a flow like a tree structure that works on the principle of conditions. It has mainly attributed that include internal nodes, branches and a terminal node. Every internal node holds a “test” on an attribute, branches hold the conclusion of the test and every leaf node means the class label.

Example:


Terms in Decision tree:
Branches - Division of the whole tree is called branches.
Root Node - Represent the whole sample that is further divided.
Splitting - Division of nodes is called splitting.
Terminal Node - Node that does not split further is called a terminal node.
Decision Node - It is a node that also gets further divided into different sub-nodes being a sub node.
Pruning - Removal of subnodes from a decision node.
Parent and Child Node - When a node gets divided further then that node is termed as parent node whereas the divided nodes or the sub-nodes are termed as a child node of the parent node.

Decision trees are considered to be widely used in data science. It is a key proven tool for making decisions in complex scenarios. Decision trees create a tree-like structure by computing the relationship between independent features and a target. This is done by making use of functions that are based on comparison operators on the independent features.

4) Decision tree structure Merit

It is effective and is very simple.
It can be used while dealing with the missing values in the dataset.
It can take care of numeric as well as categorical features.
Help determine worst, best and expected values for different scenarios.
It can be combined with other decision techniques.
A decision tree algorithm can be used to solve both regression and classification problems.
A Decision tree model is very intuitive and easy to explain to technical teams as well as stakeholders.
Results that are generated from DT does not require any statistical or mathematics knowledge to be explained.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
After learning and applying the 4 lens Right/Responsibility, result, relationship, reputation to make decisions. Did you...
After learning and applying the 4 lens Right/Responsibility, result, relationship, reputation to make decisions. Did you find yourself drawn more often to the rationales of a particular lens? How much do you think that affected your final decision? How might the skills you have learned within Ethics Exercises help you make ethical decisions in the future?
When you go shopping I am sure you do not consciously make decisions the way you...
When you go shopping I am sure you do not consciously make decisions the way you have learned using the mathematics of consumer equilibrium this week. Can you describe in words how you make a decision when you go shopping for 2 items with a certain amount of money in your pocket? Do you think that on the subconscious level you are using consumer equilibrium to make your choices? Why or why not?
What does entrepreneurship mean? Why do you think learning about entrepreneurship is important? How does this...
What does entrepreneurship mean? Why do you think learning about entrepreneurship is important? How does this course benefit ?(entrepreneurship)
TASK TWO(10%, 500 words) This task is all about you and your approach to learning! You...
TASK TWO(10%, 500 words) This task is all about you and your approach to learning! You are required to reflect on your experiences during your participation in this unit this semester. In particular, discuss what (if any) aspects of the unit challenged or strengthened your assumptions, beliefs, or expectations about yourself as a student of finance, and how this might affect your future studies in this discipline.Use the three-step reflective framework below to structure your response. (You may use some...
DISCUSSION- PRODUCTION THEORY First, the idea that firms (and individuals) should make decisions on how they...
DISCUSSION- PRODUCTION THEORY First, the idea that firms (and individuals) should make decisions on how they optimize "on the margin" (where MC=MR). Often people get confused and think about making decisions based on the average (such as average total cost). Average total cost includes FIXED costs, which are sunk and should not influence future decisions. Second, the idea of diminishing marginal returns. That's the idea that each additional unit provides less benefit than the previous unit consumed. Use these concepts...
For this project, you will make decisions about how two parameters (proportions or means) compare using...
For this project, you will make decisions about how two parameters (proportions or means) compare using hypothesis tests, and you will estimate the difference between the two parameters using confidence intervals. For each confidence, report the following: the confidence interval limits rounded as directed (from StatCrunch) An interpretation of the confidence interval (e.g. "I am 95% confident ... .") Here is a template for reporting the answer for a sample confidence interval problem. Sample problem: Find a 90% confidence interval...
Introduction Remember – these journal questions require more thinking than writing. Think about exactly what you...
Introduction Remember – these journal questions require more thinking than writing. Think about exactly what you are asked to do, and then write as economically as possible. Instructions Critical Thinking Go back to your very first journal entry – review your definition of critical thinking. After studying critical thinking for the past eight weeks, would you change your definition in any way? If yes, how and why? If no – if it was perfect – what parts of the text...
Assume that you wanted to expand your Learning English business to other non-U.S. countries where some...
Assume that you wanted to expand your Learning English business to other non-U.S. countries where some individuals may want to speak English. a.   Explain why you might be able to stabilize the profits of your total business in this manner. Review the motives for direct foreign investment that are identified in this chapter. Which of these motives are most important? b.  Why would a city such as Montreal be a less desirable site for your business than a city such as Mexico...
For part a could you show me how using r code make the necessary graphs, and...
For part a could you show me how using r code make the necessary graphs, and for part b show me the work for how to solve the problem. thank you 1. A dairy scientist is testing a new feed additive. She chooses 13 cows at random from a large population. She randomly assigns nold = 8 to the old diet and nnew = 5 to a new diet including the additive. The cows are housed in 13 widely separated...
The assignment summary sheets will be submitted week 14 with Test 3. You are to personally...
The assignment summary sheets will be submitted week 14 with Test 3. You are to personally experience the power and satisfaction of developing these skills firsthand and to reflect and write about this experience. Over the years, many students have shared amazingly rewarding experiences as they worked on these skills. The assignment will be evaluated and be weighted as 5% of your final mark (together, they are worth 20% of your mark for Test 3, which is worth 25% of...