Case-Based FCTF Reasoning System

Case-based reasoning uses old information to infer the answer of new problems. In case-based reasoning, a reasoner firstly records the previous cases, then searches the previous case list that is similar to the current one and uses that to solve the new case. Case-based reasoning means adapting old solving solutions to new situations. This paper proposes a reasoning system based on the case-based reasoning method. To begin, we show the theoretical structure and algorithm of from coarse to fine (FCTF) reasoning system, and then demonstrate that it is possible to successfully learn and reason new information. Finally, we use our system to predict practical weather conditions based on previous ones and experiments show that the prediction accuracy increases with further learning of the FCTF reasoning system.


Introduction
Case-based reasoning (CBR) is a problem-solving method, not only making connections between problem descriptors and conclusions, but also is able to utilize the specific previous knowledge to infer new solutions for new problem situations (cases) [1,2].A new problem is solved by finding a similar past case, and reused in this new problem situation.The CBR field has grown rapidly in recent years, as evidenced by the emergence of several international case-based reasoning conferences in European and other CBR workshops, by the usage of available commercial tools, and successful applications in daily use [3][4][5][6].
In the early 1980s, CBR traces back to the work of Roger Schank, whose model of dynamic memory was the basis for the earliest CBR systems [7].Other types of CBR emerged in the 1980s, aiming at topics such as legal reasoning, reasoning from massively parallel machines cases, and combinations of CBR with other machine learning techniques.CBR technology resulted in deployment of a number of successful systems, such as the system for controlling composite parts to be baked in a convection oven and the system of health application area [8].
There is one type of CBR system called Conversational Case-based Reasoning (CCBR) [9], which provides a mixed-initiative dialog for guiding users to construct their problem description incrementally through a question.For each time running a CBR, the users are confronted with a new dialog or a new query that is used to decide to terminate the whole process or just go on.This is a kind of "multistep CBR" that means applying CBR and improving the query, and reapplying CBR, etc.The common features of our system and CCBR is "multistep".Our CBR system is a kind of CCBR.
The main contribution of the paper is to use previous information to infer new information based on case based "from coarse to fine" (FCTF) reasoning system.Specifically, the system starts with the cases with the least features/feature to learn and predict, if it could not get the expected accuracy of the prediction, the system would increase osne feature, and then repeat the step for many times.This process stops when it reaches to the expected accuracy.
The organization of this paper is as follows.In Section 2, we briefly introduce the preliminaries of the paper: case-based reasoning and Occam's razor theory.Section 3 is the description of the case-based FCTF reasoning system.Section 4 presents how to use the case-based FCTF reasoning system to predict the precipitation.Finally, we make the conclusion.

Case-Based Reasoning
Case-based reasoning learns from experience.A reasoner uses old experience to suggest solutions for new problems [10].Specifically, the reasoner solves new problems by recording and reusing the most similar one or one set [11,12].It interprets new situations by remembering old similar situations and contrasting the new one to old ones to see which one fits best.Case-based reasoning could be used as the diagnostic assistant to help users diagnose problems on their computer systems [13].When a user describes his problems, the closest cases in the case base will be retrieved.The diagnostic system can recommend some of these to the user, adapting each case to each user's particular situation, such as changing recommendations based on what operating system the user has, what software the user uses, what internet connection method they choose, and the printer brand.If none of the cases is suitable, some other problem-solving method can be done to solve the problem, perhaps by having a human help diagnose the problem.When the problem is finally fixed, the case would be added to the case base.
Case-based reasoning is a method that combines learning with reasoning.In case-based learning, the training samples, the cases, are stored and accessed to solve a new problem [14,15].It is very important to find a way to represent the data.To trigger this method, a distance is required to measures the closeness of two examples.Suppose e(Xi) (shown in Table 1) is the value of feature Xi for the example e; (e1(Xi) − e2(Xi)) is the feature difference between example e1 and example e2.The Euclidean metric can be used as the distance between two objects and can be calculated as the square root of the sum of the squares of the feature differences.One issue is the importance of different features; increasing the weight of one feature increases the importance of that feature.Let wi be a non-negative real-valued parameter that specifies the weight of feature Xi.The distance between examples e1 and e2 is then d(e1,e2) = sqrt(∑iwi × (e1(Xi) − e2(Xi)) 2 ).The feature weights can be provided as input.

Table 1.
Values of feature Xi for the example e1 and e2.
After the situations or cases are properly represented and stored, the new situation (case) will enter into the system memory that is used for reasoning for the next time.In case-based reasoning, to get a prediction for a new case, we choose the case that is similar, or close to, the new case to predict the value of the target features of the new case.In general, the second time solving the problem is easier than the first because we are more competent since we remember our mistakes and, therefore, can avoid them.
A case-based reasoning algorithm to predict whether the user will or will not read this article must determine the relative importance of the dimensions.One of the problems in case-based reasoning is accessing the relevant cases.To finish this work as quickly as possible, a kd-tree [16] is a way to number the training examples so that chosen examples can be found quickly.Just like a decision tree, a kd-tree splits on input features.In building a kd-tree from a set of examples, the learner tries to find a suitable feature that can split the examples into several sets that have approximately equal size, then builds sub-kd-trees for the cases in each partition.The exact matches will be found at the leaf.Case-based reasoning can be expressed as a four-step process shown in Figure 1 [17].Retrieve: Remembering is the process of retrieving a case or set of cases from memory.In general, it consists of two sub-steps: recall previous cases and select the best case.The goal of the first step is to retrieve suitable cases that can support reasoning that occurs in the following step.Good cases are those that have the potential ability to make a correct prediction on the new case.Given a new case, we retrieve a similar case/cases from the case base, and then select the best subset.This step selects the most promising case/cases to reason with from those generated in the recall step of previous cases.The purpose of this step is to narrow the set of relevant cases to a few candidates worthy of intensive consideration.Sometimes it is appropriate to choose one best case, sometimes a small set.
Reuse: Adapt the retrieved case or cases to match with the new case, and propose a solution.
Revise: Evaluate and revise the solution based on how well it works.The revision can involve other reasoning techniques, such as using the proposed solution as a basic point to come up with a more suitable solution, which can be done by a human interactive system.
Retain: Decide whether to keep this new case and its solution in the case base.

Occam's Razor
Occam's razor traces its root to the work of William Ockham, a principle of succinctness used for solving problem [18][19][20].It states that the one with the fewest assumptions should be selected among a number of hypotheses.Other more complicated solutions may ultimately be proved correct, but the fewer assumptions that are made, the better, in the case of certainty absence.
Occam's razor is also called the parsimony principle [21][22][23].Recently, it is usually interpreted as something like "the simpler the explanation, the better".Occam's razor, as a principle that is frequently used, establishes the criteria for choosing among choices that have equal opportunities.For example, Occam's razor can be used to support creationism over evolution since evolution is much more complex than having God create everything, which indeed is much simpler than evolution.After all, evolution is a very complex process.
However, Occam's razor does not say that the more simple a hypothesis, the better [24].We don't assume that the simpler theory is correct and the more complex one is false.We know from experience the theory that requires complicated machinations is often to be proved wrong.However, until proved, the more complex theory competing with a simpler explanation should still be considered.We should not safely assume that the simpler one is absolutely right.Occam's razor is useless when a rational person should make a choice between an implausible explanation and a probable one since the answer is obvious, but if the principle is minimalist, then it seems to imply that the more simplification the better.If so, then the principle of parsimony might better have been called Occam's Chainsaw, for its main use looks like a clear-cutting action [25,26].

Case-Based "FCTF" Reasoning System
As mentioned before, Occam's razor is a principle of succinctness used for solving problems, which means that the one with the fewest assumptions or features should be selected.Among the scientific methods, Occam's razor is not considered as an irrefutable existence [27][28][29]; the preference for simplicity is based on the falsifiability criterion [30,31].For each accepted explanation of a phenomenon, although there is always a number of possible and more complex alternatives, simpler theories are preferable to more complex ones since they are better testable and falsifiable.Case-based FCTF reasoning system is based on such a theory.FCTF, just as the name implies, means "from coarse to fine" and starts with the least feature or features to reason.
When performing analysis of complex data, one of the major problems is the number of involved variables; in other words, the number of features.Generally speaking, analysis with a large number of variables demands a large amount of memory, time, and computation time to generate an answer of a problem.Feature extraction is a key point for constructing the variables to solve these problems while still describing the data with sufficient accuracy.
In case-based reasoning, feature extraction is a primary step.When the input data is too complicated to be processed or suspected of having redundant information, then the input data will be transformed into a reduced representation set of features.Using the set of features to represent the input data is called feature extraction.If the features extracted are carefully chosen, it is expected that the features set will perform the desired task using this feature extraction representation.
Best results are achieved when an expert constructs a set of application-dependent features.Nevertheless, if no such expert knowledge is available, general dimensionality reduction techniques may help.

Case-Based Reasoning Problem Definition
Generally speaking, a case in case-based reasoning system can be represented by the three steps conceptually below: Problem definition: the expression of the problem that needed to be solved at one time.Solution definition: the expression of the solution to the problem specified in the problem definition step.
Outcome: the resulting state after the solution was carried out.
A new case only has the problem definition part.The similarity measurement between a query and a stored case is based on the comparison of the problem definition parts of them.

Case-Based "FCTF" Reasoning System
Case-based FCTF reasoning system is shown in Figure 2. As shown in Figure 2, the system starts with the least number of features; one, for example.If the prediction accuracy cannot be reached, we increase the number of features and do the case-based learning again.
Retrieve: Remembering is the process of retrieving a case or set of cases from memory.The case element may be a crisp number or a more complicated one.
Reuse: If we find the same case, we just set the solution of the case in the case base as the solution of the new case, if we cannot, we find the nearest case and output according to this case.
Revise: Evaluate the solution and revise it based on the real situation.In a case-based reasoning system, one key point is to compute the similarities between a query and old cases to decide which case is most similar to the new coming one.Normally, the similarity between a query and an old case is calculated by the accumulated similarities on all counted features.
The similarities are also influenced by the calculation methods.For example, in one method, two cases can be treated as similar, while in another method, two cases with various values on one nominal feature can possibly be considered as similar through exploring general domain knowledge.There are many methods to compute the similarities between a query and old cases.
Here, we just give an example of a calculation method, the Euclidean metric, to compare the similarity of the cases if the case is a set of features, each of which is a crisp number.
Assume that there are r rules in the rule set with the same structure, we first compute the distance between the prerequisite of the R(r+1) and Rj, denote it as dist(A(r+1)i, Aji), which can be calculated as (A(r+1)i − Aji).Then, we find the rule number with the minimum value of dist(R(r+1), Rj) and denote it as minj.To calculate the Euclidean metric of the prerequisite between two rules, we compute the distance between one variable value in one rule and the corresponding variable value in the other rule, and then do the same to the next variable value and the corresponding variable value in the other rule, and so on.Finally, we calculate the dist(R(r+1), Rj) according to the equation following: For example, if we want to compare the Euclidean metric between R1 and R2, we should compute the distance between the first element of the prerequisite in R1 "A11" and the first element of the prerequisite in R2 "A21" yielding dist(A11, A21).We then do the same for the second element of the prerequisite in R1 and the second element of the prerequisite in R2 yielding dist(A12, A22).At this point, we use the equation above to calculate dist(R1, R2).α in line 1 is a user-specified threshold to control the reasoning process.Its value determines the accuracy of the reasoning system: if α is bigger, the reasoning system is more accurate.If the case of the feature is an interval, we average the values in the interval and use the averaged, crisp number to denote the interval.Afterwards, the interval reasoning algorithm is the same as the crisp reasoning algorithm.

Experiments and Analysis
We took the most common time series predicting weather forecast for example, to test the effects of different number of input atmosphere conditions on the rainfall forecasting accuracy of our case-based FCTF Reasoning System.
Expert systems in meteorological area are expressed using rules in the following way: Given a rule base of r rules, e.g., n-input 1-output, the j th control rule is described in the following form: Rj: IF x1 is Aj1 AND x2 is Aj2 , AND xn is Ajn, THEN y is Bj, where j is a rule number, n is the total number of inputs.Rule-based expert systems can only deal with rules that is in the rule set.
When we want to deduce another rule that is not in the rule set above (denoted as Ra): "Ra: IF x1 is A1 AND x2 is A2, AND xn is Arn, THEN y is ?".
We can translate this rule-based expert system into a case-based reasoning system: one complete case is one complete rule; one incomplete case is one partial rule.Thus, a rule-based expert system can be transferred to a case-based reasoning system, which can deal with rules that are not in a rule set.This is somewhat like partial-rule matching algorithm [32].
In our experiments, we take Euclidean distance and cosine similiarity to measure the similarities between the two instances.In our experiments, there is no difference between these two methods when we use them.

Data Collection
From Shanxi Meteorological Administration, China, we got the ground surface meteorological observation data in Taiyuan, a city of Shanxi Province, China from May 2007 to October 2007, May 2008 to October 2008, and May 2009 to October 2009, which are the rainy seasons in that city.The specific meteorological elements included the day's atmospheric pressure, relative humidity, dry and wet bulb temperature, wind speed, and accumulated precipitation at 20 o'clock (Beijing Time, equivalent to 1200 UTC), which we took into our experiments.

Experimental Section
We took the day's atmospheric pressure, relative humidity, dry and wet bulb temperature, and wind speed observations at 20 o'clock (Beijing Time) as input conditions.Before the experiments, we classified the input meteorological conditions into different levels according to their rating, which is shown in Table 2. Atmospheric pressure falls into four levels shown in the first two columns of Table 2; dry and wet bulb temperature falls into four levels shown in the third and fourth columns; relative humidity falls into five levels, shown in the fifth and sixth columns; and wind speed falls into five levels shown in the last two columns.We tested our case-based FCTF reasoning systems with different numbers of input conditions in these experiments to discover the effects of number of input conditions on the case-based FCTF reasoning systems' predicting accuracy.Table 3 shows the detailed experiment section: in experiment number one, we took only one input condition which is atmospheric pressure; in experiment number two, we took two input conditions which are atmospheric pressure and relative humidity; in experiment number three, we took three input conditions which are atmospheric pressure, relative humidity, and dry and wet bulb temperature; and in experiment number four, we took four input conditions which are atmospheric pressure, relative humidity, dry and wet bulb temperature, and wind speed.Since the same meteorological premises may lead to several different conclusions, which are different meteorological levels.In those cases, we choose the most probable level.
We also took the accumulated precipitations in the next 24 h as outputs for the weather prediction models, and used the precipitation observations to verify the prediction results of Case-based FCTF Reasoning Systems'.Numbers from zero to four inclusively is given to represent light rain, moderate rain, heavy rain, rainstorm, and heavy rainstorm, respectively.Thus, precipitation values falls into five levels shown in Table 4.

Precipitation Rating
Precipitation Value (mm) Light rain (0,10.0)Moderate rain [10.0,24.9)Heavy rain [24.9,49.9)Rainstorm [49.9,99.9)Heavy rainstorm [99.9,249.0) Since people concern forecasting rainfalls more than forecasting sunny days [33,34], we defined Hitrate as: where Correctp is times of correct prediction in observed rainfall days and number of observed rainfall days as Totalp.We defined Error as: where Predictp is the predicted precipitation values and the observed precipitation values as Observp.
|Error| denotes the absolute value of Error.For the same reason as above, we also only considered observed rainfall days in calculating average |Error|.

Experiment Results and Error Analysis
After four experiments completed, we calculated their errors and hitting rates, shown in Table 5.We also drew comparison charts between predicted values and observed values (panels (a) in Figures 3-6), and time sequence diagrams of prediction errors (panels (b) in Figures 3-6).Firstly, the case-based FCTF reasoning systems with only one input condition and with two input conditions are used to predict the precipitation levels for weather forecasting, but lead to the non-accuracy of the prediction outputs.Table 5 shows that hitting rates in experiments number one and number two are both equal to zero, which means that the rates of prediction accuracy are zero.Figures 3a and 4a show that the case-based FCTF reasoning systems with only one input condition and with two input conditions never successfully forecasted any rainfalls during the experimental time period.However, they had forecast no rainfalls in all the days during the whole experiment, which makes the errors are always equal to or less than zero as shown in Figures 3b and 4b.Therefore, we believe that the case-based FCTF reasoning systems with only one input condition and with two input conditions are completely impossible to forecast precipitation.These results can also be explained on meteorology.Meteorologists point out that the conditions of rainfall formation are complex [35,36], and using only one or two kinds of input conditions cannot forecast precipitation.The case-based FCTF reasoning system with three input conditions improved heavily compared to experiments one and two, just after adding the relative humidity as the new input condition.Figure 5 shows that it can forecast some of the rainfall events.Hit rate, as shown in Table 5, which increased to 0.27, is much better than those in experiments one and two, which are both equal to zero.Average |error| plummeted from 1.52 levels to 1.25 levels, decreasing by 17.8%.This result preliminary notes that when the case-based FCTF reasoning system forecasts a complex system (such as weather system), adding a new input condition is one of the important and useful methods to increase the accuracy.This is also evident in the meteorology area.Compared with the atmospheric pressure and temperature, relative humidity has greater effect on precipitation [37][38][39].However, this forecast result is still far from our expectations.
We continued with the case-based FCTF reasoning system with four input conditions, which is the improvement of our system with three input conditions.At this time, we added wind speed as a new input condition.Table 5 shows that after average |error| dropped from 1.25 levels to 1.16 levels, there are plenty of rises in hit rate, from 0.27 to 0.36.Compared with other three experiments, the case-based FCTF reasoning system with four input conditions is the best of these four experiments.Such improvement is also very easy to explain using meteorological knowledge.That is, a larger surface wind can bring a steady stream of moisture from other place, which makes a rain sustainable and precipitation increasing [40].
However, Figure 6a shows that this system often makes mistakes at predicting the rainfall levels, especially for the high magnitude of precipitation, often erroneously forecasted as a low magnitude of precipitation; this is because the entire weather system is very complicated.The purpose of these experiments was to predict precipitation by inputting atmospheric pressure, temperature, relative humidity, and wind force is only to demonstrate that adding input conditions can increase the accuracy of the case-based FCTF reasoning systems.We just added two input conditions in experiment number four compared with experiment number two, and the forecast accuracy improved by 0.36 in hit rate.We believe that, in the practical meteorological services, we can choose more suitable input conditions to improve the accuracy of precipitation forecasts dramatically.

Analysis of Our System
Assuming that there are n features from X1 to Xn, enew is the new coming instance, enearest is the closest instance to the new coming one, and we take Euclidean distance as the similarity measure method: If X1 is not related to the problem (X1 ∉ Pf, where Pf is the set of the problem features), the hit rate would be very low regardless whether Dist is below our threshold.Otherwise, if Distnearest < α, Output enearest(Y), And we add another X2, Distnearest = sqrt((enew(X1) -enearest(X1)) 2 + (enew(X2) -enearest(X2)) 2 ) (6) Analysis: if Xi ∈ Pf and Distnearst < α, Hitting rate would increase at the ideal conditions; if Xi ∈ Pf and Distnearst > α, Hitting rate may increase through increasing the value of α.If Xi ∉ Pf and Distnearest < α, Distnearest is not influenced by adding the noisy attributes.However, the hit rate of the system would not increase; If Xi ∉ Pf and Distnearest > α, Distnearest is influenced by adding the noisy attributes, and the results would be proved as a failure.

Conclusions
This paper presents a new reasoning system that can reason new information based on case-based reasoning.Our system is based on a case-based reasoning, but unlike previous case-based reasoning, it starts reasoning with the least number of features.This model is more convenient for some applications when we do not know which feature or features are highly related to the reasoning problem.As mentioned before, Occam's razor is a principle of succinctness used for solving problems.FCTF means that the one with the fewest assumptions or features should be selected.Other more complicated solutions may ultimately prove correct, but if there is less certainty, the fewer assumptions, the better.
We show that the new system is suitable for reasoning.That is, we can reason the solution of a new example based on the previous examples.Most important of all, our experiments show that increasing the number of features would result in more accurate prediction results.However, we have to confess a fact that if a feature is not a key point to a problem, adding the feature to analyze the problem would not result in any improvement of the prediction accuracy.
As we know, case-based learning is important because most real world problems are better characterized as an unknown-feature model.Thus, developing models may better describe real world systems.
Our system is an expansion of the case-based reasoning system, thus, the problem that can be handled by the case-based reasoning system can be solved by our system too.It is suitable when we do not know the features of the problem which we use the case-based reasoning system to deal with, and not suitable when we know the exact influential factors or to any problem that cannot be solved by using case-based reasoning system.

Figure 3 .Figure 4 .Figure 5 .Figure 6 .
Figure 3. Testing results of the Case-based FCTF Reasoning System in experiment number one.(a) Comparison between Observation and Prediction; (b) Prediction error.

Table 2 .
Levels classification of input conditions.

Table 3 .
Case-based FCTF Reasoning Systems' experiments with different numbers of input conditions.

Table 5 .
Comparisons among the case-based FCTF reasoning systems with different number of input conditions.