Steps to Create a Tensorflow Model

Steps to Create a Tensorflow Model

There are 3 fundamental steps to creating a model Create a Model -> Connect the layers of NN yourself by using Sequential or Functional API or import a previously built model(Transfer Learning)Compile a Model -> Define how a model's performance should be measured(metrics) and how to improve it by using an optimizer(Adam, SGD, etc.)Fit a Model -> Model tries to find a pattern in the data. Sequential and Functional API Sequential Model: A Sequential model is appropriate for a plain stack of layers where each layer has exactly one input tensor and one output tensor. A Sequential model is not…
Read More
How to deal with outliers

How to deal with outliers

In this Notebook, we will describe how to deal with outliers #Importing the dataset import pandas as p import numpy as n import matplotlib.pyplot as plt import seaborn as sns from sklearn.datasets import load_boston import warnings warnings.filterwarnings('ignore') boston=load_boston() #it is stored as dictionary df= p.DataFrame(boston['data'],columns=boston['feature_names']) df.head() sns.distplot(df['RM']) #As we can see outliers sns.boxplot(df['RM']) Trimming outliers from the dataset def outliers(data): IQR=data.quantile(0.75)-data.quantile(0.25) lr=data.quantile(0.25)-(1.5*IQR) #lower range hr=data.quantile(0.70)+(1.5*IQR) #higher range return data.loc[~(n.where(data<lr,True,n.where(data>hr,True,False)))] outliers(df['RM']) #as we csn there is no outliers sns.boxplot(outliers(df['RM'])) #We can find outlier with using mean and standard deviation in case of IQR def outliers(data,k): lr=data.mean()-(data.std()*k) #where n is number hr=data.mean()+(data.std()*k)…
Read More
What is data leakage in Machine Learning

What is data leakage in Machine Learning

When training a machine learning model, we normally prefer selecting a generalized model which is performing well both on training and validation/test data. However, there can be a situation where the model performs well during testing but fails to achieve the same level of performance with real-world (production data) usage. For example, your model is giving 95% accuracy on test data but as soon as it productized and acts on real data, it fails to achieve the same or nearby performance. Such a discrepancy between test performance and real-world performance is often referred to as Leakage. What is Train/Test bleed?…
Read More
Most Popular SQL Commands everyone should know

Most Popular SQL Commands everyone should know

SQL Commands:SQL Commands are instructions. It is used to communicate with the database. It is also used to perform specific tasks, functions, and queries of data. SQL can perform various tasks like creating a table. add data to tables, drop the table modify the table. set permission for users.Types of SQL Commands: There are five types of SQL Commands: Data Definition Language (DDL) DDL changes the table's structure like creating a table deleting a table, altering a table, etc.All the commands of DDL are auto-committed. That means it permanently saves all the changes in the databaseHere are some commands that…
Read More
Five Courses that can be finished in one week to advance Pandas skills

Five Courses that can be finished in one week to advance Pandas skills

𝟏. 𝐖𝐫𝐒𝐭𝐒𝐧𝐠 π„πŸπŸπ’πœπ’πžπ§π­ π‚π¨ππž 𝐰𝐒𝐭𝐑 𝐩𝐚𝐧𝐝𝐚𝐬: This course will build on your knowledge of Python and the panda's library and introduce you to efficient built-in pandas functions to perform tasks faster. Link:- Get the course here 𝟐. 𝐉𝐨𝐒𝐧𝐒𝐧𝐠 πƒπšπ­πš 𝐰𝐒𝐭𝐑 𝐩𝐚𝐧𝐝𝐚𝐬: In this course, you will learn to handle multiple DataFrames by combining, organizing, joining, and reshaping them using pandas. Get this course here πŸ‘. π’π­π«πžπšπ¦π₯𝐒𝐧𝐞𝐝 πƒπšπ­πš 𝐈𝐧𝐠𝐞𝐬𝐭𝐒𝐨𝐧 𝐰𝐒𝐭𝐑 𝐩𝐚𝐧𝐝𝐚𝐬: This course teaches you how to build pipelines to import data kept in common storage formats. You’ll use pandas to get data from a variety of sources, from spreadsheets of…
Read More
Find out the Longest Path in a matrix

Find out the Longest Path in a matrix

Given an m-by-n matrix with positive integers, determine the length of the longest path of increasing within the matrix. For example, consider the input matrix:[1 2 34 5 67 8 9] The answer should be 5 since the longest path would be 1-2-5-6-9 def isValid(mat, i, j): return 0 <= i < len(mat) and 0 <= j < len(mat) def findLongestPath(mat, i, j): if not isValid(mat, i, j): return [] path = [] if i > 0 and mat[i - 1][j] - mat[i][j] == 1: path = findLongestPath(mat, i - 1, j) if j + 1 < len(mat) and mat[i][j…
Read More
Explain the central limit theorem and give examples of when you can use it in a real-world problem.

Explain the central limit theorem and give examples of when you can use it in a real-world problem.

The center limit theorem states that if any random variable, regardless of the distribution, is sampled a large enough time, the sample mean will be approximately normally distributed. This allows for studying the properties of any statistical distribution as long as there is a large enough sample size. Important remark fromΒ Adrian Olszewski:⚠️ we can rely on the CLT with means (because it applies to any unbiased statistic) only if expressing data in this way makes sense. And it makes sense *ONLY* in the case of unimodal and symmetric data, coming from additive processes. So forget skewed, multi-modal data with mixtures of…
Read More
What are the motivation behind random forests and mention two reasons why they are better than individual decision trees?

What are the motivation behind random forests and mention two reasons why they are better than individual decision trees?

The motivation behind random forest or ensemble models in general in layman's terms, Let's say we have a question/problem to solve we bring 100 people and ask each of them the question/problem and record their solution. Next, we prepare a solution which is a combination/ a mixture of all the solutions provided by these 100 people. We will find that the aggregated solution will be close to the actual solution. This is known as the "Wisdom of the crowd" and this is the motivation behind Random Forests. We take weak learners (ML models) specifically, Decision Trees in the case of…
Read More
Dripshop.live is hiring for a Senior Full Stack Engineer

Dripshop.live is hiring for a Senior Full Stack Engineer

Description About Dripshop.live: Drip (dripshop.live)Β is a fast-growing, VC-backed live shopping platform and community for collectibles and NFTs. Drip enables collectors to buy, sell, and stream with their communities. We closed a $23M Series A at a $100M+ valuation to build our team and power our development of next-generation experiences and expansion into more categories! Our Values: We are sellers first We are customers obsessed and Engaged with the community we build for Embrace radical ownership Value radical candor Strive to be excellent Make the case for optimism Who you are: Passionate about (or excited to learn about) our core collectible…
Read More
5 Amazing Python Tricks you should Know

5 Amazing Python Tricks you should Know

In this post, we'll talk about some tricks which come in handy when we're in urgent need. QR Code with Python pip install pyqrcode pip install pypng import pyqrcode from pyqrcode import QRCode import png # String which represents the QR code S= "www.geeksforgeeks.org" # Generate QR code url.pyqrcode.create(s) # Create and save the svg file naming "myqr.svg" url.svg("myqr.svg", scale = 8) # Create and save the png file naming "myqr.png" url.png ('myqr.png', scale = 6) Convert Images with Python pip install fpdf from fpdf import FPDF pdf = FPDF () # imagelist is the list with all image for…
Read More