We present an efficient method for extracting fuzzy rules directly from numerical input-output data for function approximation problems. First, we convert a given function approximation problem into a pattern classification problem. This is done by dividing the universe of discourse of the output variable into multiple intervals, each regarded as a class, and then by assigning a class to each of the training data according to the desired value of the output variable. Next, we partition the data of each class in the input space to achieve a higher accuracy in approximation of class regions. Partition terminates according to a given criterion to prevent excessive partition. For class region approximation, we discuss two different types of representations using hyperboxes and ellipsoidal regions, respectively. Based on a selected representation, we then extract fuzzy rules from the approximated class regions. For a given input datum, we convert, or in other words, defuzzify, the resulting vector of the class membership degrees into a single real value. This value represents the final result approximated by the method. We test the presented method on a synthetic nonlinear function approximation problem and a real-world problem in an application to a water purification plant. We also compare the presented method with a method based on neural networks