Data Science: Logistic Regression with SmartCore.

applied.math.coding
3 min readMar 21, 2023

This story is part of my Data Science series.

In our previous story (see here) we have looked at the theory behind logistic regression and implemented a very rudimentary version in Rust. For real productive problems this implementation though still is missing many details. For this reason, I want to quickly show you in this story how one can use the well-written crate SmartCore for this task.

The data set will be the same, that is weathercsv, and the preprocessing has been down by using pandas in order to remove some null values and create suitable dummy variables from all categorical variables. Moreover, continuous variables have been left as they are but normalized to the interval [0, 1].

If you have any sort of similar data, you can simply use these instead to create your own model.

Our task will be to predict conditional expectations of the binary outcome that indicates the next day to rain or not to rain.

The dependencies of the project look like so:

--

--

applied.math.coding

I am a Software Developer - Java, Rust, SQL, TypeScript - with strong interest doing research in pure and applied Mathematics.