https://apphp.gitbook.io/artificial-intelligence-with-php/
The code examples provided for the book Artificial Intelligence with PHP are intended for educational purposes only. These examples are designed to illustrate concepts and techniques in artificial intelligence and machine learning using PHP. They are not suitable for production use and should not be deployed on live servers or systems that handle sensitive data.
The demo code has not been subjected to rigorous security testing and may contain inaccuracies, vulnerabilities, inefficiencies, or other issues that could pose security risks if used in production environments. As such, it may not be 100% accurate or reflect best practices. We strongly advise readers to thoroughly review, test, and secure any implementation of the techniques demonstrated in this book before using them in real-world applications.
The author and publisher are not responsible for any security breaches, data losses, or other damages that may result from using these examples on production servers.
To install these examples, follow these steps:
- Clone the repository:
git clone [email protected]:apphp/ai-with-php-examples.git
- Navigate to the project directory:
cd ai-with-php-examples
- Run following command. It will prepare and run docker containers with all required applications.
make init
- After installation is complete, type in your browser: http://localhost:8088/
- If everything is OK, you should see the website with examples of code.
You may find live demo for these examples on official website: https://aiwithphp.org/examples/
- Rubix ML https://rubixml.com
- RubixML/Tensor https://github.com/RubixML/Tensor
- PHP-ML https://php-ml.readthedocs.io/en/latest/
- MathPHP https://github.com/markrogoyski/math-php
- OpenAI PHP Client https://github.com/openai-php/client
- LLM Agents PHP SDK https://github.com/llm-agents-php/agents
- Chart.js https://www.chartjs.org/
- Plotly.js https://plotly.com/javascript/
- Mermaid.js https://mermaid.js.org/
- MathJax https://www.mathjax.org/
- Regression-js https://tom-alexander.github.io/regression-js/
- React and ReactDOM https://legacy.reactjs.org/docs/cdn-links.html
- Babel for JSX transformation https://babeljs.io/
-
Artificial Intelligence
- Problem Solving
- Uninformed (Blind) Search
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Iterative Deepening Depth-First Search (IDDFS)
- Uniform Cost Search (UCS)
- Bidirectional Search (BDS)
- Depth-Limited Search (DLS)
- Random Walk Search (RWS)
- Informed (Heuristic) Search
- Greedy Search
- A* Tree Search
- A* Graph Search
- Iterative Deepening A*
- Beam Search
- Hill Climbing Search
- Simulated Annealing Search
- Practical Applications
- Traveling Salesman Problem
- Simulated Annealing Process
- Uninformed (Blind) Search
- Knowledge & Uncertainty in AI
- Knowledge-Based Agents
- Logical Representation
- Propositional
- Predicate Logic
- AI Agents
- LLM Agents
- Site Status Checker Agent
- Sales Analyst Agent
- LLM Agents
- Problem Solving
-
Machine Learning
- Mathematics for ML
- Scalar
- Scalar Operations with MathPHP
- Scalar Operations with Pure PHP
- Vector
- Vector Operations with Rubix
- Vector Operations with Rubix/Tensor
- Vector Operations with MathPHP
- Vector Operations with Pure PHP
- Matrices
- Matrix Operations with Rubix
- Matrix Operations with Rubix/Tensor
- Matrix Operations with MathPHP
- Matrix Operations with Pure PHP
- Tensors
- Linear Transformations
- Scale Transformation
- Simple Linear Layer
- Fully Connected Layer
- ReLU Activation
- Eigenvalues and Eigenvectors
- Scalar
- Data Fundamentals
- Big Data Techniques in PHP
- Chunked Processing
- Dataset Generator
- Big Data Techniques in PHP
- Stages of Data Processing
- Data Cleaning
- Data Cleaning
- Data Normalization
- Data Standardization
- Data Transformation
- Encoding Categorical Variables
- Normalizing and Scaling Numerical Features
- Reshaping Data Structures
- Data Cleaning
- ML Algorithms
- Linear Regression
- Simple Linear Regression
- Multiple Linear Regression
- Regularized Linear Regression (Lasso)
- Polynomial Regression
- Linear Regression
- Mathematics for ML
-
Neural Networks
- Types of NN
- Basic Neural Network
- Simple Perceptron
- Basic Neural Network
- Types of NN