Int8

Logistic Regression Part Ii Evaluation

This post is a continuation of a recent post where we implemented the gradient descent method for solving logistic regression problems. Today, we will try to evaluate our algorithm to find out how it works in the wild. code Last time, the logistic regression problem was stated strictly as an optimization problem, which suggests our evaluation should consider the goal function itself—which is to some extent correct; indeed, it makes sense to check how ( J ) changes while the algorithm runs. But it is not the best idea one can have. Please recall our goal. We aimed for a parametrized labeli...

Basic visualization in Julia – Gadfly

In this post, we will walk through the basics of Gadfly – a visualization package written in Julia. Gadfly is Julia’s implementation of the layered grammar of graphics proposed by Hadley Wickham, who implemented his idea into the ggplot2 package, the main visualization library in R. Interestingly, the original inventor of the “grammar of graphics” (who inspired Wickham) is now employed by Tableau Software – a leading company in data visualization. The main motivation for the grammar of graphics is to formalize visualization for statistics. Authors use the word “grammar” so one can think of...

Solving logistic regression problem in Julia

In this post, we will try to implement gradient descent approach to solve logistic regression problem. Please note this is mainly for educational purposes and the aim here is to learn. If you want to “just apply” logistic regression in Julia, please check out this one. Let’s start with basic background. Logistic regression is a mathematical model serving to predict binary outcomes (here we consider binary case) based on a set of predictors. A binary outcome (meaning outcome with two possible values, like physiological gender, spam/not spam email, or fraud/legitimate transaction) is very ...

Reading CSV file into Julia

As someone experienced in R, I naturally look for data.frame-like structures in Julia to load a CSV file into. Luckily, it is present and seems to work pretty well. You need to install a package called DataFrames to operate on R-like dataframes: Pkg.add("DataFrames") and load it after installation: using DataFrames; The whole documentation is available here. For now, we will try to load a simple CSV file and play with it. You can use the iris dataset. It is a toy dataset meant for various machine learning tasks. Let’s download it and read it into a variable called iris: iris = readta...

© int8.io