Friday, 17 March 2017

Steps required for selecting the right machine learning algorithm.

How to choose the right algorithm

1) First you need to consider your goal. What are you trying to get out of this? What data you have or can you collect.

2) If  you’re  trying  to  predict  or  forecast  a  target  value,  then  you  need  to  look  into supervised learning.

3) If not, then unsupervised learning is the place you want to be.

4) If you’ve chosen supervised learning, what’s your target value? Is it a discrete value like Yes/No, 1/2/3, A/B/C, or Red/Yellow/Black?  If so, then you want to look into classification. If the target value can take on a number of values, say any value from 0.00 to 100.00, or -999 to 999, or +infinty to -infinty, then you need to look into regression.

5) If you’re not trying to predict a target value, then you need to look into unsupervised  learning.  Are  you  trying  to  fit  your  data  into  some  discrete  groups?  If  so  and that’s all you need, you should look into clustering.

6) Do you need to have some numerical estimate of how strong the fit is into each group? If you answer yes, then you probably should look into a density estimation algorithm.

  The  rules  I’ve  given  here  should  point  you  in  the  right  direction  but  are  not unbreakable laws. You should spend some time getting to know your data, and the more you know about  it,  the  better  you’ll  be  able  to  build  a  successful  application. 

Friday, 3 March 2017

Applications of Machine learning

1) Adaptive website
2) Affective computing
3) Bioinformatics
4) Brain machine interface
5) Classifying DNA sequence
6) Computational anatomy
7) Detecting credit card fraud
8) Economics
9) Game Playing
10) Information retrival
11) Internet fraud detection
12) Marketing
13) Medical diagnosis
14) Natural language processing (NLP)
15) Online Advertising
16) Robot locomotion
17) Search engine
18) Sentiment Analysis
19) Sequence mining
20) Stock market analysis
21) Speech and handwriting recognition
22) Software engineering
23) User behavior analytics

Thursday, 2 March 2017

Introduction to Machine learning

In machine learning, computers apply statistical learning techniques to automatically identify patterns in data. These techniques can be used to make highly accurate predictions. 

Definition: A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P improves with experience E
Example:  Learning to play checker
Task T: design a program to learn to play checker
Performance measure P: The percentage of the games won
Experience E: Playing against itself

Types of Machine learning algorithm:
1) Supervised learning: This algorithm consist of a target variable or dependent variable which is to be predicted from a given set of predictors (independent variables). Using these set of variables, we generate a function that map inputs to desired outputs. The training process continues until the model achieves a desired level of accuracy on the training data. Examples of Supervised Learning: Regression, Decision Tree, Random Forest, KNN, Logistic Regression etc. 

2) Unsupervised learning:  In this algorithm, we do not have any target or outcome variable to predict / estimate.  It is used for clustering population in different groups, which is widely used for segmenting customers in different groups for specific intervention. Examples of Unsupervised Learning: K-means.

3) Reinforcement learning: Using this algorithm, the machine is trained to make specific decisions. It works this way: the machine is exposed to an environment where it trains itself continually using trial and error. This machine learns from past experience and tries to capture the best possible knowledge to make accurate business decisions. Example of Reinforcement Learning: Markov Decision Process

Monday, 2 January 2017

C Program to Swap Two Numbers

Program:
This program is saved as Swap.c

Output:

Sunday, 1 January 2017

C Program to find greatest of three numbers

Program:
This program is saved as GreatestOfThree.c

Output:

C Program to Add n numbers

Program:
This program is saved as Add.c

Output:

C Program to Add Subtract Multiply and Divide the numbers

Program:
This program is saved as AddSubMulDiv.c 
Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a long value into a simple integer then you can type cast long to int. You can convert values from one type to another explicitly using the cast operator.

New data type should be mentioned before the variable name or value in brackets which to be typecast.

Converting an expression of a given type into another type is known as type-casting . typecasting is more use in c programming language.

It is best practice to convert lower data type to higher data type to avoid data loss.

Data will be truncated when higher data type is converted to lower. For example, if float is converted to int, data which is present after decimal point will be lost.

Output: