MACHINE LEARNING RECIPES
DATA CLEANING PYTHON
DATA MUNGING
PANDAS CHEATSHEET
ALL TAGS
# Generate a generic 2D Gaussian like array?

# Generate a generic 2D Gaussian like array?

Generate a generic 2D Gaussian like array

So this recipe is a short example on how to generate a generic 2D Gaussian-like array. Let's get started.

```
import numpy as np
```

Let's pause and look at these imports. Numpy is generally helpful in data manipulation while working with arrays. It also helps in performing mathematical operation.

```
x, y = np.meshgrid(np.linspace(-1,1,10), np.linspace(-1,1,10))
d = np.sqrt(x*x+y*y)
sigma, mu = 1.0, 0.0
g = np.exp(-( (d-mu)**2 / ( 2.0 * sigma**2 ) ) )
```

Let's have a loop at each step one by one. One first step, we have created two, 2D arrays, using meshgrid and linespace function. Meshgrid basically creates a rectangular grid out of two given one-dimensional array. Linespace returns number spaces evenly w.r.t interval. In 2nd step, we are calculating the square-roots of squares of s and y. Finally, using exp function, we are genearating the guassian array.

```
print(g)
```

Simply using print function, we have print our gaussian array.

Once we run the above code snippet, we will see:

Scroll down to the ipython file below to visualize the output.

Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

Text data requires special preparation before you can start using it for any machine learning project.In this ML project, you will learn about applying Machine Learning models to create classifiers and learn how to make sense of textual data.

Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

Data Science Project - Build a recommendation engine which will predict the products to be purchased by an Instacart consumer again.

The goal of this data science project is to build a predictive model and find out the sales of each product at a given Big Mart store.

In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

In this project, we will use time-series forecasting to predict the values of a sensor using multiple dependent variables. A variety of machine learning models are applied in this task of time series forecasting. We will see a comparison between the LSTM, ARIMA and Regression models. Classical forecasting methods like ARIMA are still popular and powerful but they lack the overall generalizability that memory-based models like LSTM offer. Every model has its own advantages and disadvantages and that will be discussed. The main objective of this article is to lead you through building a working LSTM model and it's different variants such as Vanilla, Stacked, Bidirectional, etc. There will be special focus on customized data preparation for LSTM.

Use the Mercari Dataset with dynamic pricing to build a price recommendation algorithm using machine learning in Python to automatically suggest the right product prices.

In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

In this time series project, you will forecast Walmart sales over time using the powerful, fast, and flexible time series forecasting library Greykite that helps automate time series problems.