Skip to main content

Posts

Linear Regression Using Least Squares

Linear Regression Using Least Squares Recommended videos. For validating results: https://goodcalculators.com/linear-regression-calculator/
Recent posts

Combining Basic Statistics

Introduction Suppose you took two set of measurements from a sensor at different times. You calculated average and standard deviation of two measurement sets and lost measurement details. You want to calculate average and standard deviation of all measurements using average and standard deviations from two measurement sets. In other wards you want to combine the two average and standard deviation values. Combined Average Formula Combined Standard Deviation Formula Formula Generation

Java: Cost of Volatile Variables

Introduction Use of volatile variables is common among Java developers as a way of implicit synchronization. JIT compilers may reorder program execution to increase performance. Java memory model[1] constraints reordering of volatile variables. Thus volatile variable access should has a cost which is different than a non-volatile variable access. This article will not discuss technical details on use of volatile variables. Performance impact of volatile variables is explored by using a test application. Objective Exploring volatile variable costs and comparing with alternative approaches. Audience This article is written for developers who seek to have a view about cost of volatile variables. Test Configuration Test application runs read and write actions on java variables. A non volatile primitive integer, a volatile primitive integer and an AtomicInteger is tested. Non-volatile primitive integer access is controlled with ReentrantLock and ReentrantReadWriteLock  to compa

A General Purpose Transfer Learning Framework Based on Keras

Objective Transfer Learning technique is used when the dataset is not of sufficient size. It is common to fine tune a network which is pre-trained on large datasets like Imagenet for classification tasks. For further information, the reader is advised to refer to CS231N by Standford . A framework for general purpose transfer learning is proposed. This framework is developed for my MSc. thesis study and made publicly available to let researchers make use of it. Using this framework, the researcher will easily be able to fine-tune a network for a classification task. Audience This article can be useful for anyone seeking information about transfer learning implementation. Python knowledge is required to make use of the supplied code. Introductory information about Keras , a deep learning API, is necessary. Also in order to run the code, a proper deep learning system with a decent graphics card (GPU) with CUDA Compute Capability 3.0 or higher   is necessary is necessary. I

Obfuscating Spring Boot Projects Using Maven Proguard Plugin

Introduction Obfuscation is the act of reorganizing bytecode such that it becomes hard to decompile. Many developers rely on obfuscation to save their sensitive code from undesired eyes. Publishing jars without obfuscation may hinder competitiveness because rivals may take advantage of easily decompilable nature of java binaries. Objective Spring Boot applications make use of public interfaces, annotations which makes applications harder to obfuscate. Additionally, maven Spring Boot plugin creates a fat jar which contains all dependent jars. It is not viable to obfuscate the whole fat jar. Thus obfuscating Spring Boot applications is different than obfuscating regular java applications and requires a suitable strategy. Audience Those who use Spring Boot and Maven and wish to obfuscate their application using Proguard are the target audience for this article. Sample Application As the sample application, I will use elastic search synch application from my GitHub repository.

How To Use Keras Trained CNN Models

Introduction Keras is a popular deep learning api. It can run on top of Tensorflow , CNTK and Theano frameworks. Keras provides an easy to use interface which makes deep learning practice straight forward. It is widely used thus resources are easily accessible. Objective This article aims to give an introductory information about using a Keras trained CNN model for inference. This article does not contain information about CNN training. Audience This article assumes introductory information about python and Convolutional Neural Networks. For those who lack information may first begin with information from following resources. For python use  Python For Beginners For Convolutional Neural Networks use  CS231n Convolutional Neural Networks for Visual Recognition Software Installation Keras is a high level API. It requires a back-end framework to be installed. In this article, Tensorflow is used. Keras can transparently select CPU or GPU for processing. If use of GPU is

Using Docker Container for MySQL Service

Problem Suppose you are working on a project that relies on Mysql service but you do not want to install MySQL to your system. Using a Docker image can be a good solution. Remember that you can use many services through Docker containers. Steps 1- Install docker  Docker Community Edition can be freely downloaded from the  official page. It requires registration. https://www.docker.com/community-edition Install docker image. It may require a restart, if it does, do so. In case any problems occur that prevent Docker for Windows from starting check trouble shooting page. https://docs.docker.com/docker-for-windows/troubleshoot/ In Windows 10, hypervisor launch type needs to be "auto".  In order to check current status bcdedit command can be used via PowerShell (Administrator Mode). In order to set to "auto" following command can be used. bcdedit /set hypervisorlaunchtype auto 2- Find the Relevant Container Go to  Docker Store . Type Mysql. Sel