Posts

Showing posts with the label Machine learning

Rule based Vs ML based example-2

Let us continue our discussion. As we saw in our rule based approach our outcome is totally determined by what new rule we create. It has less to do with what our earlier rules were. In case of learning our next prediction takes into account all the data we gathered so far. This boundary is not very crisp and we are free to adjust our learning where it gives more weight to one type of data and less to other and similarly we can define a rule which says that we ‘ll act according to our learning and rule can simply to apply one type of learning. But the difference is apparent from this context also. Focus of rules is more on taking decision based on answer of concrete question while learning forms a continuous trajectory which you need to follow to decide your point of interest. Now let us formally define our rule that we followed in our onion example: It was like: Rule : If you paid $y for x kg of onion then price of onion per kg is $(y/x) Learning ap...

Rule based Vs ML based example

Machine learning based system  vs Rule based system  Lets take an example of determining what is the amount you have to spend on buying 4 kg of onions. You have few options to determine that. You need some initial data like what is the price of 1 kg onion now.once you have that you can easily calculate amount you need for any quantity of onion say 10 kg or 20 kg or whatever. Suppose you found that onion price is 2 $ per kg. Here is how you ll program to get value of x kg onion in python   def get_amount(weigh):     return 2*weight Interesting. isn’t it?  What you have just done is defined a rule to calculate. This rule is sufficient to give you value of any quantity of onion you need to buy from market today. In contrast to this to a machine learning based system you give some data and ask the system find a correlation between those data and predict next set of data based on those correlations : Lets take the same example of dete...