The 7 families of artificial intelligence and their implementation in Python
Seven main approaches and applications of artificial intelligence can be distinguished:
- Expert systems: they use formal logic rules to simulate human reasoning in a specific domain, by answering questions or solving problems.
- Supervised machine learning: these algorithms learn from labelled data, i.e. where the expected answer is known in advance, to perform tasks such as pattern recognition, classification or prediction.
- Unsupervised machine learning (details to come): these algorithms discover structures or relationships in unlabelled data, without human supervision, to perform tasks such as segmentation or dimensionality reduction.
- Reinforcement learning (details to come): these algorithms learn from interactions with a dynamic environment, maximising a reward or minimising a penalty, to perform tasks such as planning or decision making.
- Artificial neural networks (details to come): these are inspired by the functioning of biological neurons and allow complex functions to be modelled from data, to perform tasks such as image recognition or natural language processing.
- Natural language processing (details to come): uses text analysis techniques to understand human language and perform tasks such as machine translation, text generation or query understanding.
- Multi-agent systems (details to come): simulate the behaviour of several agents, such as robots or people, to perform tasks cooperatively or competitively, using coordination, planning and negotiation techniques.
Expert Systems in Python
An expert system is a computer system that uses knowledge and rules to solve problems in a specific domain. They aim to mimic human reasoning by using decision rules based, on the one hand, on data and, on the other hand, on expert knowledge of a particular domain.
There are many interesting expert system projects in Python or usable from Python. They are usually based on rule engines and the Rete algorithm. Here are some examples:
- Experta: a Python library for building expert systems strongly inspired by CLIPS, a fork of Pyknow (cf. below).
- CLIPS: an expert system written in C, developed since 1985 by NASA. It is possible to use it from Python thanks to the Clispy project.
- pyknow: a rule-based expert system library for Python, easy to use and extend. This project is unfortunately not maintained since 2018.
- Nools: a JavaScript library for expert systems, but which also has a Python interface for developers who prefer to use Python. This project has not been maintained since 2018.
- pyke: a Python rules engine that provides features such as feedback, inheritance and template rules. This project has not been maintained since 2010.
- Intellect. This project has not been maintained since 2012.
These projects can be used in many fields, including medicine, law, finance and engineering. They can be used to diagnose diseases, to assist in financial decision-making, to assist in construction planning, to assist in production planning in industry, and in many other cases where human expertise is needed.
References
Supervised Machine Learning
Supervised machine learning is a branch of artificial intelligence that involves building a model from labelled data. Labelled data is data that has been previously tagged with a known answer or class, so that the model can learn to make predictions from new data.
There are many supervised machine learning projects in Python. Here is a selection:
- Scikit-learn: Scikit-learn is a popular machine learning library in Python that supports several types of supervised machine learning models, such as decision trees, random forests, SVMs, neural networks, etc.
- TensorFlow: TensorFlow is an open source deep learning library developed by Google. It provides a wide variety of supervised machine learning models, such as neural networks, SVMs, decision trees, etc.
- Keras: Keras is a high-level deep learning library that builds on TensorFlow to provide easy-to-use and easy-to-configure supervised machine learning models.
- PyTorch: PyTorch is another popular deep learning library that provides supervised machine learning models for several tasks, such as classification, segmentation, image recognition, etc.
- XGBoost: XGBoost ("eXtreme Gradient Boosting") is a performance-optimised decision tree ensemble library used for classification and regression tasks.
- LightGBM: LightGBM is a fast and efficient decision tree ensemble library for classification and regression.
- CatBoost: CatBoost is a deep learning library for classification and regression tasks (GBDT) that can be used with categorical data.
The main applications of supervised machine learning are:
- Classification: Supervised machine learning is often used to classify data into different categories or classes. For example, it can be used to classify emails as spam or non-spam, to classify images into different categories, or to predict whether a customer will buy a particular product.
- Regression: Supervised machine learning can also be used to predict numerical values from input data. For example, it can be used to predict the price of a house based on various characteristics such as size, location and amenities.
- Pattern recognition: Supervised machine learning can be used for pattern recognition, such as handwriting recognition or speech recognition.
- Anomaly detection: Supervised machine learning can be used to detect anomalies or suspicious behaviour in data, which can be useful for detecting fraud or cyber attacks.
- Recommendation: Supervised machine learning can be used to recommend products or services based on user preferences or purchase history.
These supervised machine learning projects are widely used in industry (e-commerce, health, finance, security, predictive maintenance...) and research, and are regularly updated to incorporate the latest advances in machine learning.