# Discussion about Math Kernal Machine Library?

249 views

**What is Math Kernal Library?**
Math Kernel Library (Intel MKL) is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, sparse solvers, fast Fourier transforms, and vector math. The routines in MKL are hand-optimized specifically for Intel processors.

The library supports Intel processors and is available for Windows, Linux and macOS operating systems.

Main Categories for Math Kernal Library

• Linear algebra: BLAS routines are vector-vector (Level 1),    matrix-vector(Level 2) and matrix matrix(Level 3) operations for real and complex single and double precision data. LAPACK consists of tuned LU, Cholesky and QR factorizations, eigenvalue and least squares solvers.
• MKL includes a variety of Fast Fourier Transforms   (FFTs) from 1D to multidimensional, complex to complex, real to    complex, and real to real transforms of arbitrary lengths.
• Vector math functions include computationally intensive core mathematical operations for single and double precision real and complex data types. These are similar to libm functions from compiler libraries but operate on vectors rather than scalars to provide better performance. There are various controls for setting accuracy, error mode and denormalized number handling to customize the behavior of the routines.
• Statistics functions include random number generators and probability distributions. optimized for multicore processors.    Also included are compute-intensive in and out-of-core routines to    compute basic statistics, estimation of dependencies etc.
• Data fitting functions include splines (linear, quadratic, cubic, look-up,    stepwise constant) for 1-dimensional interpolation that can be used in data analytics, geometric modeling and surface approximation applications.
• Deep Neural Network
• Partial Differential Equations
• Nonlinear Optimization Problem Solvers

Video for Math Kernal Library

#### References

https://en.wikipedia.org/wiki/Math_Kernel_Library
posted Aug 31, 2018

## Related Articles

What is Linear regression?

Linear regression is a linear system and the coefficients can be calculated analytically using linear algebra. ...

Linear regression does provide a useful exercise for learning stochastic gradient descent which is an important algorithm used for minimizing cost functions by machine learning algorithms.

Linear regression is a very simple approach for supervised learning. Though it may seem somewhat dull compared to some of the more modern algorithms, linear regression is still a useful and widely used statistical learning method. Linear regression is used to predict a quantitative response Y from the predictor variable X.
Linear Regression is made with an assumption that there’s a linear relationship between X and Y.

Linear regression is a linear model, e.g. a model that assumes a linear relationship between the input variables (x) and the single output variable (y). More specifically, that y can be calculated from a linear combination of the input variables (x).

When there is a single input variable (x), the method is referred to as simple linear regression. When there are multiple input variables, literature from statistics often refers to the method as multiple linear regression.

Video for Linear Regression

What is H2O in Machine Learning?
H2O.ai is a leader in the 2018 Gartner Magic Quadrant for Data Science and Machine Learning Platforms.

H2O is open-source software for big-data analysis. It is produced by the company H2O.ai. H2O allows users to fit thousands of potential models as part of discovering patterns in data.

The H2O software runs can be called from the statistical package R, Python, and other environments. It is used for exploring and analyzing datasets held in cloud computing systems and in the Apache Hadoop Distributed File System as well as in the conventional operating-systems Linux, macOS, and Microsoft Windows.

The H2O software is written in Java, Python, and R. Its graphical-user-interface is compatible with four browsers: Chrome, Safari, Firefox, and Internet Explorer.

H2O is a Java-based software for data modeling and general computing. The H2O software is many things, but the primary purpose of H2O is as a distributed (many machines), parallel (many CPUs), in memory (several hundred GBs Xmx) processing engines.

There are two levels of parallelism:

- within node
- across (or between) nodes
The goal of H2O is to allow simple horizontal scaling to a given problem in order to produce a solution faster. The conceptual paradigm MapReduce, along with a good concurrent application structure,  enable this type of scaling in H2O.

Video for H2O

What is Machine Learning?

Machine learning is an application of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed. Machine learning focuses on the development of computer programs that can access data and use it learn for themselves.

Machine learning is a field of computer science that gives computers the ability to learn without being explicitly programmed

Machine learning is closely related to (and often overlaps with) computational statistics, which also focuses on prediction-making through the use of computers. It has strong ties to mathematical optimization, which delivers methods, theory and application domains to the field. Machine learning is sometimes conflated with data mining, where the latter subfield focuses more on exploratory data analysis and is known as unsupervised learning.Machine learning can also be unsupervised and be used to learn and establish baseline behavioral profiles for various entities and then used to find meaningful anomalies.

The process of learning begins with observations or data, such as examples, direct experience, or instruction, in order to look for patterns in data and make better decisions in the future based on the examples that we provide. The primary aim is to allow the computers learn automatically without human intervention or assistance and adjust actions accordingly.

Some machine learning methods

• Supervised machine learning algorithms
• unsupervised machine learning algorithms
• Semi-supervised machine learning algorithms
• Reinforcement machine learning algorithms

What is MLlib?

MLlib (Spark) is Apache Spark’s machine learning library. Its goal is to make practical machine learning scalable and easy. It consists of common learning algorithms and utilities, including classification, regression, clustering, collaborative filtering, dimensionality reduction, as well as lower-level optimization primitives and higher-level pipeline APIs.

Main Benefits

• Ease of Use
• Performance
• Runs Everywhere

MLlib contains many algorithms and utilities.

ML algorithms include:

• Classification: logistic regression, naive Bayes,...
• Regression: generalized linear regression, survival regression,...
• Decision trees, random forests, and gradient-boosted trees
• Recommendation: alternating least squares (ALS)
• Clustering: K-means, Gaussian mixtures (GMMs),...
• Topic modeling: latent Dirichlet allocation (LDA)
• Frequent itemsets, association rules, and sequential pattern mining

Spark revolves around the concept of a resilient distributed dataset (RDD), which is a fault-tolerant collection of elements that can be operated on in parallel. There are two ways to create RDDs: parallelizing an existing collection in your driver program, or referencing a dataset in an external storage system, such as a shared filesystem, HDFS, HBase, or any data source offering a Hadoop InputFormat.

Video for MLib

What is Lasagne?

Lasagne is a lightweight library to build and train neural networks in Theano.

Features:

• Supports feed-forward networks such as Convolutional Neural Networks (CNNs), recurrent networks including Long Short-Term Memory (LSTM), and any combination thereof
• Allows architectures of multiple inputs and multiple outputs, including auxiliary classifiers
• Many optimization methods including Nesterov momentum, RMSprop and ADAM
• Freely definable cost function and no need to derive gradients due to Theano's symbolic differentiation
• Transparent support of CPUs and GPUs due to Theano's expression compiler

Main Principles

• Simplicity: Be easy to use, easy to understand and easy to extend, to facilitate use in research
• Transparency: Do not hide Theano behind abstractions, directly process and return Theano expressions or Python / numpy data types
• Modularity: Allow all parts (layers, regularizers, optimizers, ...) to be used independently of Lasagne
• Pragmatism: Make common use cases easy, do not overrate uncommon cases
• Restraint: Do not obstruct users with features they decide not to use
• Focus: "Do one thing and do it well"

How to Install

pip install -r https://raw.githubusercontent.com/Lasagne/Lasagne/master/requirements.txt
pip install https://github.com/Lasagne/Lasagne/archive/master.zip

Video for Lasagne

What is Keras?

Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.

Features

• 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.

Main Benefits

• User friendliness. Keras is an API designed for human beings, not machines. It puts user experience front and center. Keras follows best practices for reducing cognitive load: it offers consistent & simple APIs, it minimizes the number of user actions required for common use cases, and it provides clear and actionable feedback upon user error.
• Modularity. A model is understood as a sequence or a graph of standalone, fully-configurable modules that can be plugged together with as few restrictions as possible. In particular, neural layers, cost functions, optimizers, initialization schemes, activation functions, regularization schemes are all standalone modules that you can combine to create new models.
• Easy extensibility. New modules are simple to add (as new classes and functions), and existing modules provide ample examples. To be able to easily create new modules allows for total expressiveness, making Keras suitable for advanced research.
• Work with Python. No separate models configuration files in a declarative format. Models are described in Python code, which is compact, easier to debug, and allows for ease of extensibility

Python Install

pip install keras

Video for Keras

What is MLlib?

MLlib stands for Machine Learning Library (MLlib)

MLlib is Spark’s scalable machine learning library consisting of common learning algorithms and utilities, including classification, regression, clustering, collaborative filtering, dimensionality reduction, as well as underlying optimization primitives, as outlined below:

• Data types
• Basic statistics
• Classification and regression
• Collaborative filtering
• Clustering
• Dimensionality reduction
• Feature extraction and transformation
• Optimization

Spark Core is the foundation of the overall project. It provides distributed task dispatching, scheduling, and basic I/O functionalities, exposed through an application programming interface  centered on the RDD abstraction  This interface mirrors a functional/higher-order model of programming: a "driver" program invokes parallel operations such as map, filter or reduce on an RDD by passing a function to Spark, which then schedules the function's execution in parallel on the cluster.

These operations, and additional ones such as joins, take RDDs as input and produce new RDDs. RDDs are immutable and their operations are lazy; fault-tolerance is achieved by keeping track of the "lineage" of each RDD so that it can be reconstructed in the case of data loss. RDDs can contain any type of Python, Java, or Scala objects.​

The Video for MLlib Spark