Skip to main content

Posts

Showing posts from 2019

linear regression

Introduction to linear regression: Linear regression is the first prediction algorithm taught in statistics to the students who begin their journey in the line of prediction and prescribing and doing all sorts of statistics wizardry. Being a statistics student, in this post, I will provide a introduction to linear regression for people not so into maths and go into bit by bit into the details, use of linear regression in different statistical packages and therefore try to balance it out for people looking at linear regression from statistics point of view by helping them into getting the application side. In this post, we will discuss about the following topics: what is linear regression different types of linear regression What are the applications of  linear regressions? How to interpret results of linear regressions? adjusted R-square and mean-squared-error coefficients and their significance Assumptions of linear regression assumption of multivariate-normality

10 most used pandas functions in data science

Before I start:   I am a thriving data scientist writing data science codes all day and I use pandas all day. And the most interesting thing about pandas is the large variety of optimized functions present to process and manipulate dataframes. So, I will compile the list of most used and necessary pandas functions and a small example of how to use it. The goal of this article is therefore to aid the beginners with the resources to write code faster, shorter and cleaner. Things you will learn in this post are: (1) Introduction (2) pandas basics (3) pandas read_csv (4) slicing data using pandas (5) pandas dataframe (6) pandas drop duplicate (7) pandas fillna (8) pandas merge (9) pandas concat Pandas introduction:  Pandas is written by Wes Mckinney, a great businessman and all time benevolent dictator for life for the open source project named pandas. The main github resource is pandas github . Pandas is mainly written in cython, a language made

Keras Introduction in spyder3

Introduction to Keras :   Keras is a high-level neural networks API, capable of running on top of Tensorflow , Theano, and CNTK . It enables fast experimentation through a high level, user-friendly, modular and extensible API. Keras can also be run on both CPU and GPU. Keras was developed and is maintained by Francois Chollet and is part of the Tensorflow core, which makes it Tensorflows preferred high-level API. In this article, we will go over the basics of Keras including the two most used Keras models ( Sequential and Functional ), the core layers as well as some preprocessing functionalities. Downloading keras in ubuntu(linux): First we will show how to download it. All the guidance of download is for ubuntu(linux) command line. For windows downloading of keras, follow here . You need tensorflow backend to run Keras. So, first in ubuntu 18.04, go to command, write bash. Then bash line with $ will open. Now, write pip3 install tensorflow It is gonna tak

Time series analysis

Introduction to time series analysis: Nowadays, one of the most needed skills in data science is time series. Any data, based on time stamps, is considered as and analyzed as time series. Time series analysis is a deep part of sales, offers and launches of products in industrial levels; while also it is deeply used to detect different events in physical worlds and different systems and therefore used as a general analysis tool in many parts of physics and analyzing different types of experiments and natural phenomenon. Now, that's all in air, let's dive in the basic theory and then we will discuss details of technical analysis as how to do  time series analysis with python time series analysis with R Basic theory of time series: According to Wikipedia, " A time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a s

AVL tree and other homeworks

AVL Tree: #include<stdio.h> #include<stdlib.h> // An AVL tree node struct Node {     int key;     struct Node *left;     struct Node *right;     int height; }; int max(int a, int b); // A utility function to get the height of the tree int height(struct Node *N) {     if (N == NULL)         return 0;     return N->height; } // A utility function to get maximum of two integers int max(int a, int b) {     return (a > b)? a : b; } /* Helper function that allocates a new node with the given key and     NULL left and right pointers. */ struct Node* newNode(int key) {     struct Node* node = (struct Node*)                         malloc(sizeof(struct Node));     node->key   = key;     node->left   = NULL;     node->right  = NULL;     node->height = 1;  // new node is initially added at leaf     return(node); } // A utility function to right rotate subtree rooted with y // See the diagram given above. struct Node *ri