Danial Khosravi's Blog

Entrepreneur in the making...

Range of Convolutional Neural Networks on Fashion-MNIST Dataset

| Comments

Fashion MNIST is a drop-in replacement for the very well known, machine learning hello world, MNIST dataset. It has same number of training and test examples and the images have the same 28x28 size and there are a total of 10 classes/labels, you can read more about the dataset here : Fashion-MNIST

In this post we will be trying out different models and compare their results:

List of models

  1. 2 Layer Neural Netwoek
  2. CNN with 1 Convolutional Layer
  3. CNN with 3 Convolutional Layers
  4. VGG Like Model
  5. VGG Like Model With Batchnorm

Estimating Pi Using Monte Carlo Simulations

| Comments

Pi (3.141593) is one of the few magical numbers in Mathematics that we often trust, accept and use in our calculations. However, you might be curious to know where it comes from. Pi can be obtained analytically which gives us a value equal to 3.141593 but here we’re going to find the value of pi numerically by running Monte Carlo simulations.

Calculating Stocks’ Beta Using R

| Comments

According to Investopedia, Beta is a measure of the volatility, or systematic risk, of a security or a portfolio in comparison to the market as a whole. In this post, we’re going to learn how to calculate beta coefficient of our desired stocks using historical price data that is publicly available.

Below we will be covering

  • R script to calculate beta for Goldman Sachs
  • Maths behind the beta coefficient

R: Fancy Plots Using Ggplot2 and Ggthemes

| Comments

In this post I want to introduce you to a great ggplot2 add-on, ggthemes. ggthemes which is freely available on github, let you turn your current plots to professional looking plots in a matter of a couple of lines of code.

ggthemes has various of different themes such as The Economist, Excel and various other professional themes that makes your current plots much fancier.

Here is a plot that I made for one of my assignments this year using this library.

Check out more examples on its offical Github Repo

Multiline Plots in R Using Ggplot2

| Comments

With the help of ggplot2, creating beautiful charts is an easy task in R. However it can get a little bit tricky when you’re trying to plot a set of data on a single chart, over a shared x axis.

Express 4 Tutorial - Simple Server

| Comments

Express 4 was released a while ago and although the API is pretty much the same as version 3, there are some breaking changes which I recommend you to take a look at this page in case you want to move your express 3 application to express 4.

Version 4 changed to Express core and middleware system. Which means the dependency on Connect framework which was built-in Express is removed and you must separately download and add the middleware you want to your application. Also the routing system has changed and the new router has much more flexibility.

I’m planing to write a tutorial series on Express 4. In this tutorial we’re writing a very basic Express 4 app and connect it to a (dummy)Database and authenticate users.

Source Code

Arduino, ProcessingJS and SocketIO in Action

| Comments

So today I wanted to do something relatively cool(!!) with things that I had around me. There are a lot of examples out there that sends input values from Arduino to Processing and then draw something cool. I wanted to do something a bit cooler and as always I wanted to bring Javascript into the action. In this tutorial i’m showing you how I connected my Arduino to a local NodeJS server and with the use of SocketIO send the value of potentiometer to client side and draw a cool graph with ProcessingJS !!!