Hi I have a problem with one of my assignments. I am using the following dataset http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv One of the questions asks to "reduce the levels of rating for quality to three levels as high, medium, and low". I would like to output the summary of the quality variable to these strings. They are originally as integers
Asked
Active
Viewed 104 times
1 Answers
0
If it is a homework you should really try to get part of the solution yourself nevertheless here are helping ideas:
You want to cut or bin the variables. E.g. you have a scale of 1-6, you could cut it into three groups of 1-2,3-4 and 5-6.
Once you have cut or binned your variables you can transform the binned variable (which is now a factor) to the desired levels by using transformations like "5-6" -> "high".
Can you provide as least some code you have already worked on and where your problems are? Then I could provide better feedback instead of just providing a solution.

Fnguyen
- 1,159
- 10
- 23