Member-only story

Predict on survivors of the Titanic using SVM classifier made in Jax

Crystal X
4 min readOct 1, 2023

--

In my last post I covered the dynamics of the Support Vector Machine and went into detail into how it is coded in Python and the Jax library. It is important for an aspiring data scientist to know how to code in Jax and other libraries because one never knows what library he is going to be asked to code in. In addition, Jax is slated to overtake Tensorflow, for research purposes at least.

One thing that I have discovered whilst working with Jax is that it seems to be much slower than numpy. In addition, while Jax closely resembles numpy’s API, it is not an exact replica of the library. Therefore, there are some things that numpy can do but Jax cannot. For example, Jax arrays are immutable so alternative programming methods need to be utilised to work around this.

I have written this machine learning project in Google Colab, which is a free online Jupyter Notebook hosted by Google. Google Colab is a great website to use to write code in Python, but it does not have an undo function, so care needs to be taken not to accidentally delete or overwrite valuable code, which I have done in the past.

I have used the Titanic dataset to prove the SVM classifier that I have translated from numpy to Jax.

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet