How to calculate Poisson distribution probabilities in R

We provide effective and economically affordable online training courses for R and Python, click here for more details and course registration ! Poisson distribution is used to model the random number (x) of event occurrence during a Poisson process, which focus on the occurrence of same random events during a fixed time period (t) with a constant occurring rate (lambda). The calculation formula of the probability x can be expressed as: In R programming, function Read more…

How to calculate Geometric distribution probabilities in R

We provide effective and economically affordable online training courses for R and Python, click here for more details and course registration ! Geometric distribution is to model the random trial number X until a first success, in Bernoulli trial experiments, with constant success rate p. The probability of x can be calculated as Geometric distribution is a special case of Negative Binomial distribution, which models the X trial is the n success trial. R programming Read more…

How to read csv file using Numpy in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. Numpy module has a function genfromtxt() that is used to read tabular data format into an array. The option for the function is the file name in working directory, delimiter and first line as variable name. The following example shows how to read a csv file into an structured array. You can see Numpy Read more…

How to save and read Numpy array in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. When you are doing data analysis with Numpy module in Python, it is not uncommon that the array data information needs to be stored on local driver, then it is possible to read it again later into working session. Numpy provides two functions on this purpose. save() function is used to save an Numpy Read more…

How to create structured arrays in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. We know Numpy arrays are data objects that store same type of data in one object. However, this statement is not strictly correct. Numpy provides also availability to create array that allows different data types in it. This kind of array is called structured array. Let us see an example. We have seen, A1 Read more…

Broadcasting of Numpy arrays in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. If two Numpy arrays may having different shapes take operations, e.g. addition or subtraction, and their shapes are compatible for such operation. This is called broadcasting. The prerequisite of broadcasting is that either two arrays have the same shapes, or at least one axis of an array is 1. In the latter case, this Read more…

Views and copy of Numpy array in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. Same as with Python lists, simply using equal symbol to assign an array to a new object will make two arrays referring to the same array. Unlike lists, in which slicing of a list returns an independent list, slicing a Numpy array is also a view of the original array. If you really want Read more…

How to split Numpy array in python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. A Numpy array can be divided into several arryas in Pyhton, and these kinds of operation are called splitting. In terms of row-wise or coloum-wise splitting, Numpy provide two operations in this respect,hsplit() and vsplit(). hsplit() will divide an original array into parts, with the option for how many parts to be splitted to. Read more…

Joining Numpy arrays using stacking operations in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. Two or more arrays with at least one dimension has the same shape, can be joined together to formulate a new array. These kinds of operations are called stacking. Stacking can be performed either row-wise or column-wise. vstack() is used to stack arrays vertically, such that the resulting array combines all the inputting arrays Read more…

Numpy array shape manipulation, using reshape(),ravel() and transpose() in Python

We provide affordable online training course(via ZOOM meeting) for Python and R programming at fundamental level, click here for more details. Python Numpy module provides a series functions that can reshape Numpy arrays. When an array is created via Numpy, it has a shape and dimension. reshape() is used to rearrange all elements of the array with another specified shape. Comparatively, ravel() will reshape the object to an one-dimensional array, If the original array has Read more…