My Profile Photo

Coder Spirit

I'm Andrés Correa Casablanca. I work as a software engineer, but I have a scientist in my heart. I love mathematics, algorithms, AI, and machine learning.

PHP-SDS First Thoughts

Some days have passed since my last contribution to PHP-SDS, but today I’ve returned, and my first step will be telling something about this project.

The name of this PHP library isn’t very imaginative: “Scientific Data Structures”. The data structures aren’t scientific or unscientific :s , but there is an extension called “PHP-DS” (PHP Data Structures), which provides basic data structures, and PHP-SDS aims to provide “data-science related data structures”… so, that’s it.

My idea was to port some features from three interesting Python projects to PHP: Pandas, Numpy and TensorFlow. The basic data structures that will be implemented are Matrix, DataFrame and Tensor (the “same” as Numpy’s ndarray).

As today, almost all the meaningful features of the Tensor data structure have been developed in pure PHP, plus some basic features of the Matrix class.

So? Well, the actual code is pure PHP, but it is a sort of prototype/polyfill. I want to implemenet a PHP extension to boost performance for certain data related operations, and I want to implement that extension using Rust.

There are a lot of things to do, finishing the Matrix and DataFrame classes in the polyfill library, add some data importing/exporting features, and then start coding the extension using Rust. You’re welcome if you want to become involved :) .

These are the main sources I’m using to obtain inspiration:

comments powered by Disqus