Basic concepts used in AI

Renjith Ms
7 min readMar 21, 2018

--

Traditional Programming: Data and program is run on the computer to produce the output.

Machine Learning: Data and output is run on the computer to create a program. This program can be used in traditional programming.

Some of the applications are of ML are in Web search,Computational biology,Finance,E-commerce,Space exploration,Robotics,Information extraction,Social networks,Debugging

Artificial intelligence: A specific field of computer engineering that focuses on creating systems capable of gathering data and making decisions and/or solving problems. An example of basic AI is a computer that can take 1000 photos of cats for input, determine what makes them similar, and then find photos of cats on the Internet. The computer has learned, as best as it can, what a photo of a cat looks like and uses this new intelligence to find things that are similar.Machine learning is the process by which an AI uses algorithms to perform artificial intelligence functions. It’s the result of applying rules to create outcomes through an AI.machine learning is incredibly powerful to make predictions or calculated suggestions based on large amounts of data.

Machine learning algorithms can be divided into 3 broad categories — supervised learning, unsupervised learning, and reinforcement learning.Supervised learning is useful in cases where a property (label) is available for a certain dataset (training set), but is missing and needs to be predicted for other instances. Unsupervised learning is useful in cases where the challenge is to discover implicit relationships in a given unlabeled dataset (items are not pre-assigned). Reinforcement learning falls between these 2 extremes — there is some form of feedback available for each predictive step or action, but no precise label or error message.

Supervised Learning

  1. Decision Tree is the minimum number of yes/no questions that one has to ask, to assess the probability of making a correct decision, most of the time. As a method, it allows you to approach the problem in a structured and systematic way to arrive at a logical conclusion.

2. Naive Bayes Classification: Naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Bayes’ theorem with strong (naive) independence assumptions between the features. The featured image is the equation — with P(c|x) is posterior probability, P(x|c) is likelihood, P(c) is class prior probability, and P(x) is predictor prior probability.

3. Ordinary Least Squares Regression: Linear regression is the task of fitting a straight line through a set of points. There are multiple possible strategies to do this, and “ordinary least squares” strategy go like this — You can draw a line, and then for each of the data points, measure the vertical distance between the point and the line, and add these up; the fitted line would be the one where this sum of distances is as small as possible.Linear refers the kind of model you are using to fit the data, while least squares refers to the kind of error metric you are minimizing over

4. Logistic Regression: Logistic regression is a powerful statistical way of modeling a binomial outcome with one or more explanatory variables. It measures the relationship between the categorical dependent variable and one or more independent variables by estimating probabilities using a logistic function, which is the cumulative logistic distribution.

Linear regression is basically a regression model which means its will give a non discreet/continuous output of a function. So this approach gives the value. For example : given x what is f(x). For example given a training set of different factors and the price of a property after training we can provide the required factors to determine what will be the property price.

Logistic regression is basically a binary classification algorithm which means that here there will be discreet valued output for the function . For example : for a given x if f(x)>threshold classify it to be 1 else classify it to be 0.For example given a set of brain tumor size as training data we can use the size as input to determine whether its a benign or malignant tumor. Therefore here the output is discreet either 0 or 1.

5. Support Vector Machines: SVM is binary classification algorithm. Given a set of points of 2 types in N dimensional place, SVM generates a (N — 1) dimensional hyperplane to separate those points into 2 groups. Say you have some points of 2 types in a paper which are linearly separable. SVM will find a straight line which separates those points into 2 types and situated as far as possible from all those points.

6. Ensemble Methods: Ensemble methods are learning algorithms that construct a set of classifiers and then classify new data points by taking a weighted vote of their predictions. The original ensemble method is Bayesian averaging, but more recent algorithms include error-correcting output coding, bagging, and boosting.

They are unlikely to over-fit: If you have individual models that didn’t over-fit, and you are combining the predictions from each model in a simple way (average, weighted average, logistic regression), then there’s no room for over-fitting.

They reduce the variance: The aggregate opinion of a bunch of models is less noisy than the single opinion of one of the models. In finance, this is called diversification — a mixed portfolio of many stocks will be much less variable than just one of the stocks alone. This is why your models will be better with more data points rather than fewer.

Unsupervised Learning

7. Clustering Algorithms: Clustering is the task of grouping a set of objects such that objects in the same group (cluster) are more similar to each other than to those in other groups.Every clustering algorithm is different, and here are a couple of them:

  • Centroid-based algorithms
  • Connectivity-based algorithms
  • Density-based algorithms
  • Probabilistic
  • Dimensionality Reduction
  • Neural networks / Deep Learning

8. Principal Component Analysis: PCA is a statistical procedure that uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of linearly uncorrelated variables called principal components.

9. Singular Value Decomposition: In linear algebra, SVD is a factorization of a real complex matrix. For a given m * n matrix M, there exists a decomposition such that M = UΣV, where U and V are unitary matrices and Σ is a diagonal matrix.

10. Independent Component Analysis: ICA is a statistical technique for revealing hidden factors that underlie sets of random variables, measurements, or signals. ICA defines a generative model for the observed multivariate data, which is typically given as a large database of samples. In the model, the data variables are assumed to be linear mixtures of some unknown latent variables, and the mixing system is also unknown. The latent variables are assumed non-gaussian and mutually independent, and they are called independent components of the observed data.

7 Steps to Mastering Deep Learning with Keras

Keras is a high-level neural network API,which runs on top of a number of lower-level libraries, used as backends, including TensorFlow, Theano, CNTK, and PlaidML. Keras code is portable, meaning that you can implement a neural network in Keras using Theano as a backened and then specify the backend to subsequently run on TensorFlow, and no further changes would be required to your code. Keras is an easy to use neural network library that promotes a simple and intuitive syntax.

Use Keras if you need a deep learning library that:

  • Allows for easy and fast prototyping (through user friendliness, modularity, and extensibility).
  • Supports both convolutional networks and recurrent networks, as well as combinations of the two.
  • Runs seamlessly on CPU and GPU.

Keras has enabled new startups, made researchers more productive, simplified the workflows of engineers at large companies, and opened up deep learning to thousands of people with no prior machine learning experience.

For keras cheat sheet click below

Keras Cheat Sheet

course for me

  1. https://campus.datacamp.com/courses/deep-learning-in-python/basics-of-deep-learning-and-neural-networks?ex=1

--

--

Renjith Ms
Renjith Ms

No responses yet