avatarNaina Chaturvedi

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

27386

Abstract

-machine-learning-with-projects-series-cd975641da0a?sk=09cf1f30e912774cba6501c8bac5edde">Applied Machine Learning with Projects Series</a>, <a href="https://readmedium.com/30-days-of-pytorch-with-projects-series-737941e5aa4f?sk=d0ead140034be9f1fff27d059b525221">PyTorch with Projects Series</a>, <a href="https://readmedium.com/30-days-of-tensorflow-and-keras-with-projects-series-f52e0815d696?sk=945bb73c32bc967b7e056f894fab7626">Tensorflow and Keras with Projects Series</a>, <a href="https://readmedium.com/day-1-of-30-days-of-scikit-learn-series-with-projects-76341935e5fd?sk=44a6845c53109c2482c368bdb7924e46">Scikit Learn Series with Projects</a>, <a href="https://readmedium.com/day-1-of-15-days-of-time-series-analysis-and-forecasting-with-projects-series-5ba3b6cf7528?sk=7a5826927d95b8fd22deae9ee53bc54d">Time Series Analysis and Forecasting with Projects Series</a>, <a href="https://readmedium.com/day-1-of-ml-system-design-case-studies-series-ml-system-design-basics-dbf7765b3c0c?sk=9ce5aee0a8b5208be05ac5284872e91b">ML System Design Case Studies Series</a> videos will be published on our youtube channel ( just launched).</i></b></p><p id="4b19"><b><i>Subscribe today!</i></b></p><div id="1520" class="link-block"> <a href="https://www.youtube.com/@ignito5917/about"> <div> <div> <h2>Ignito</h2> <div><h3>Excited to share that we have launched our Youtube channel — Ignito to cover all the projects and coding exercise for …</h3></div> <div><p>www.youtube.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*N9OmxhpEw0AuQEey)"></div> </div> </div> </a> </div><h1 id="9923">Tech Newsletter —</h1><blockquote id="de9c"><p>If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to <b>Tech Brew :</b></p></blockquote><div id="a490" class="link-block"> <a href="https://naina0405.substack.com/"> <div> <div> <h2>Ignito</h2> <div><h3>Data Science, ML, AI and more… Click to read Ignito, by Naina Chaturvedi, a Substack publication with hundreds of…</h3></div> <div><p>naina0405.substack.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*CLFDCm7k-HnlDOPA)"></div> </div> </div> </a> </div><p id="822c">Let’s get started with the part 2!</p><h1 id="d849">Support Vector Regression</h1><figure id="1307"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*qAg5rI-YlfUTbmPQ.png"><figcaption>Pic credits : eduCBA</figcaption></figure><p id="87bd">The Linear Regression method is basically a linear approach for modeling the relationship between a scalar dependent variable y and one or more explanatory variables (or independent variables) as it just minimizes the least squares error: for one object target y = x^T * w, where w is model’s weights.</p><blockquote id="110e"><p><i>Loss(w) = Sum_1_N(x_n^T * w — y_n) ^ 2 → min(w)</i></p></blockquote><p id="71fa">In this, we try to minimize the errors between the prediction and data. In Support Vector Regression (SVR) the goal is that the errors do not exceed the threshold and it uses the same concept as SVM, instead for the regression problems. It supports the presence of non-linearity in the data and provides an efficient prediction model.</p><p id="f7ca">Two most important features of Support Vector Regression:</p><ul><li>Maximum margin</li><li>Hyperplane</li></ul><p id="4ca2"><b>To build a SVR:</b></p><ul><li>Collect a training set and choose a kernel and it’s parameters</li><li>Define the correlation matrix.</li><li>Train and figure out the contraction coefficients to create an estimator.</li><li>Compute the correlation vector.</li></ul><div id="0492"><pre>from sklearn.svm <span class="hljs-keyword">import</span> <span class="hljs-type">SVR</span> <span class="hljs-variable">regressor</span> <span class="hljs-operator">=</span> SVR(kernel = <span class="hljs-string">'rbf'</span>) regressor.fit(X, y) y_pred = regressor.predict(<span class="hljs-number">3.7</span>) y_pred = ss_y.inverse_transform(y_pred)</pre></div><p id="22ab">where kernel can be linear, Gaussian etc.</p><h1 id="602b">Decision Tree Regression</h1><p id="a345">Decision Tree are widely used in both in classification and regression problems. These are basically predictive models that use binary rules to calculate an output/target value. Each tree has branches, nodes and leaves where the root node represents the entire population or sample.</p><figure id="7bf5"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*LvcdEqP1tg8ONPgd.png"><figcaption>Pic credits : ResearchGate</figcaption></figure><p id="2ed8"><a href="https://scikit-learn.org/stable/auto_examples/tree/plot_tree_regression.html">Here</a> is the great resource to study how does it work.</p><div id="7383"><pre>from sklearn.tree <span class="hljs-keyword">import</span> <span class="hljs-type">DecisionTreeRegressor</span> <span class="hljs-variable">regressor</span> <span class="hljs-operator">=</span> DecisionTreeRegressor(random_state = <span class="hljs-number">0</span>) regressor.fit(X, y) y_pred = regressor.predict(<span class="hljs-number">6.5</span>)</pre></div><h1 id="2cea">Random Forest Regression</h1><p id="c6e7">It’s a supervised machine learning algorithm that is constructed from decision tree algorithms ( it predicts the outcome by taking the average or mean of the output from the different trees) and Is used to solve both regression and classification problems. It mainly used ensemble learning, a technique in which many classifiers are combined together to provide solutions to complex problems. It’s very efficient as it reduces the overfitting of datasets, provides an effective way of handling missing data, runs efficiently on large databases, achieves extremely high accuracies, increases precision and scales really well when new features are added to the dataset..</p><figure id="94b4"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*jKRO03RVYtq1aKwE.png"><figcaption>Pic credits : ResearchGate</figcaption></figure><p id="e34f">It works well with both categorical and numerical input variables, which in-turn minimizes the time spent on one-hot encoding or labeling data.</p><div id="27bf"><pre>from sklearn.ensemble <span class="hljs-keyword">import</span> <span class="hljs-type">RandomForestRegressor</span> <span class="hljs-variable">regressor</span> <span class="hljs-operator">=</span> RandomForestRegressor(n_estimators=<span class="hljs-number">10</span>, random_state=<span class="hljs-number">0</span>) regressor.fit(X, y)
y_pred = regressor.predict(<span class="hljs-number">4.2</span>)</pre></div><h1 id="efa1">Project</h1><p id="b861">Let’s dive in!</p><h1 id="4932">Load the data</h1><div id="1e46"><pre><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd <span class="hljs-keyword">import</span> seaborn <span class="hljs-keyword">as</span> sns <span class="hljs-keyword">from</span> matplotlib <span class="hljs-keyword">import</span> pyplot <span class="hljs-keyword">as</span> plt <span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np</pre></div><div id="e396"><pre>main_file_path = <span class="hljs-string">'../path to file/data.csv'</span> Iowadata = pd.read_csv(main_file_path) Iowadata.<span class="hljs-built_in">head</span>()</pre></div><p id="5c5c"><b>Output —</b></p><figure id="783c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*OhMXYmkd5Yc5Kw-rQ9gkQA.png"><figcaption></figcaption></figure><h1 id="fc86">Get to know your Data better</h1><div id="8a4e"><pre><span class="hljs-comment"># Get details about your data</span> Iowadata.info()</pre></div><p id="dd94"><b>Output —</b></p><div id="5a58"><pre><span class="hljs-string"><class</span> <span class="hljs-string">'pandas.core.frame.DataFrame'</span><span class="hljs-string">></span> <span class="hljs-attr">RangeIndex:</span> <span class="hljs-number">1460 </span><span class="hljs-string">entries,</span> <span class="hljs-number">0</span> <span class="hljs-string">to</span> <span class="hljs-number">1459</span> <span class="hljs-string">Data</span> <span class="hljs-string">columns</span> <span class="hljs-string">(total</span> <span class="hljs-number">81</span> <span class="hljs-string">columns):</span> <span class="hljs-string">Id</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">MSSubClass</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">MSZoning</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">LotFrontage</span> <span class="hljs-number">1201 </span><span class="hljs-string">non-null</span> <span class="hljs-string">float64</span> <span class="hljs-string">LotArea</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">Street</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Alley</span> <span class="hljs-number">91</span> <span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">LotShape</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">LandContour</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Utilities</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">LotConfig</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">LandSlope</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Neighborhood</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Condition1</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Condition2</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BldgType</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">HouseStyle</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">OverallQual</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">OverallCond</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">YearBuilt</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">YearRemodAdd</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">RoofStyle</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">RoofMatl</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Exterior1st</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Exterior2nd</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">MasVnrType</span> <span class="hljs-number">1452 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">MasVnrArea</span> <span class="hljs-number">1452 </span><span class="hljs-string">non-null</span> <span class="hljs-string">float64</span> <span class="hljs-string">ExterQual</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">ExterCond</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Foundation</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BsmtQual</span> <span class="hljs-number">1423 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BsmtCond</span> <span class="hljs-number">1423 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BsmtExposure</span> <span class="hljs-number">1422 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BsmtFinType1</span> <span class="hljs-number">1423 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BsmtFinSF1</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">BsmtFinType2</span> <span class="hljs-number">1422 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">BsmtFinSF2</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">BsmtUnfSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">TotalBsmtSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">Heating</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">HeatingQC</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">CentralAir</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Electrical</span> <span class="hljs-number">1459 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">1stFlrSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">2ndFlrSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">LowQualFinSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">GrLivArea</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">BsmtFullBath</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">BsmtHalfBath</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">FullBath</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">HalfBath</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">BedroomAbvGr</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">KitchenAbvGr</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">KitchenQual</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">TotRmsAbvGrd</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">Functional</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Fireplaces</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">FireplaceQu</span> <span class="hljs-number">770</span> <span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">GarageType</span> <span class="hljs-number">1379 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">GarageYrBlt</span> <span class="hljs-number">1379 </span><span class="hljs-string">non-null</span> <span class="hljs-string">float64</span> <span class="hljs-string">GarageFinish</span> <span class="hljs-number">1379 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">GarageCars</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">GarageArea</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">GarageQual</span> <span class="hljs-number">1379 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">GarageCond</span> <span class="hljs-number">1379 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">PavedDrive</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">WoodDeckSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">OpenPorchSF</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">EnclosedPorch</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">3SsnPorch</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">ScreenPorch</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">PoolArea</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">PoolQC</span> <span class="hljs-number">7</span> <span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">Fence</span> <span class="hljs-number">281</span> <span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">MiscFeature</span> <span class="hljs-number">54</span> <span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">MiscVal</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">MoSold</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">YrSold</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-string">SaleType</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">SaleCondition</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">object</span> <span class="hljs-string">SalePrice</span> <span class="hljs-number">1460 </span><span class="hljs-string">non-null</span> <span class="hljs-string">int64</span> <span class="hljs-attr">dtypes:</span> <span class="hljs-string">float64(3),</span> <span class="hljs-string">int64(35),</span> <span class="hljs-string">object(43)</span> <span class="hljs-attr">memory usage:</span> <span class="hljs-number">924.0</span><span class="hljs-string">+</span> <span class="hljs-string">KB</span></pre></div><p id="de5d">You can see there are many null/missing values which we need to take care of. Also see which columns ( features) we would be exploring more and finally would be using in our model.</p><div id="deea"><pre>column_of_interest= ['SalePrice'] column_data=Iowadata[column_of_interest] column_data.describe()</pre></div><p id="d5ba"><b>Output —</b></p><figure id="727b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*2GyqTKBmVaVURftaHZNXLA.png"><figcaption></figcaption></figure><div id="9642"><pre>col_of_interest=[<span class="hljs-string">'LotArea'</span>,<span class="hljs-string">'SalePrice'</span>] col_data=Iowadata[col_of_interest] col_data.describe()</pre></div><p id="d70c"><b>Output —</b></p><figure id="fb04"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*O08efeARMZv7HsNbKzU6tA.png"><figcaption></figcaption></figure><h1 id="aa44">Data Visualization</h1><div id="9694"><pre><span class="hljs-comment"># Plot Sale Prices by Sale Condition</span> plt.figure(figsize=(<span class="hljs-number">8</span>,<span class="hljs-number">6</span>),dpi=<span class="hljs-number">100</span>)sns.barplot(x=Iowadata[<span class="hljs-string">'SaleCondition'</span>].sort_values(ascending=<span class="hljs-literal">True</span>),y=Iowadata[<span class="hljs-string">'SalePrice'</span>].sort_values(ascending = <span class="hljs-literal">True</span>),data=Iowadata,orient=<span class="hljs-string">'v'</span>,palette=<span class="hljs-string">'Set3'</span>) plt.title(<span class="hljs-string">"Sale Prices by Sale Condition"</span>) plt.xlabel(<span class="hljs-string">'Sale Condition'</span>) plt.ylabel(<span class="hljs-string">'Sale Price'</span>) plt.xticks(rotation=<span class="hljs-number">45</span>) plt.show()</pre></div><p id="f2f4"><b>Output —</b></p><figure id="b5e7"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*WfvhEgDnrdcV6fW8g7wvdQ.png"><figcaption></figcaption></figure><div id="e343"><pre><span class="hljs-comment"># Pair plot to Plot pairwise relationships in a dataset</span></pre></div><div id="3c9c"><pre>plt.figure(figsize=(<span class="hljs-number">8</span>,<span class="hljs-number">6</span>),dpi=<span class="hljs-number">100</span>) sns.pairplot(Iowadata, x_vars=[<span class="hljs-string">"LotArea"</span>, <span class="hljs-string">"YearBuilt"</span>, <span class="hljs-string">"1stFlrSF"</span>, <span class="hljs-string">"2ndFlrSF"</span>, <span class="hljs-string">"FullBath"</span>,<span class="hljs-string">"GrLivArea"</span>, <span class="hljs-string">"BedroomAbvGr"</span>, <span class="hljs-string">"TotRmsAbvGrd"</span>,<span class="hljs-string">'SalePrice'</span>],y_vars=[<span class="hljs-string">"LotArea"</span>, <span class="hljs-string">"YearBuilt"</span>, <span class="hljs-string">"1stFlrSF"</span>, <span class="hljs-string">"2ndFlrSF"</span>, <span class="hljs-string">"FullBath"</span>,<span class="hljs-string">"GrLivArea"</span>, <span class="hljs-string">"BedroomAbvGr"</span>, <span class="hljs-string">"TotRmsAbvGrd"</span>,<span class="hljs-string">'SalePrice'</span>] ) plt.<span class="hljs-keyword">show</span>()</pre></div><p id="e804"><b>Output —</b></p><figure id="ec11"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*XIAAoxfkZGeeP7Pbkzguow.png"><figcaption></figcaption></figure><div id="cdaa"><pre>sns.regplot(<span class="hljs-keyword">data</span> = Iowadata, x= <span class="hljs-string">'LotArea'</span>,y=<span class="hljs-string">'SalePrice'</span> )</pre></div><p id="c20e"><b>Output —</b></p><figure id="669c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*1eQz9BKGdOIGsR4yWy6D9w.png"><figcaption></figcaption></figure><div id="5397"><pre>sns.regplot(<span class="hljs-keyword">data</span> = Iowadata, x=<span class="hljs-string">'1stFlrSF'</span> ,y=<span class="hljs-string">'SalePrice'</span>,color=<span class="hljs-string">'green'</span> )</pre></div><p id="ee0f"><b>Output —</b></p><figure id="6090"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*GvvU2sqme1YHvoeQOTBdnw.png"><figcaption></figcaption></figure><div id="5286"><pre>sns.regplot(<span class="hljs-keyword">data</span> = Iowadata, x= <span class="hljs-string">'GrLivArea'</span>,y=<span class="hljs-string">'SalePrice'</span>,color=<span class="hljs-string">'cyan'</span> )</pre></div><p id="36f3"><b>Output —</b></p><figure id="c4f9"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*njBQPBo8pNtZWwcV9a5Wo

Options

Q.png"><figcaption></figcaption></figure><div id="929d"><pre><span class="hljs-comment">#saleprice correlation matrix</span></pre></div><div id="5316"><pre>n = 10 corrmat = Iowadata.corr() f, ax = plt.subplots(figsize=(12, 9)) cols = corrmat.nlargest(n, <span class="hljs-string">'SalePrice'</span>)[<span class="hljs-string">'SalePrice'</span>].index cm = np.corrcoef(Iowadata[cols].values.T) sns.<span class="hljs-built_in">set</span>(<span class="hljs-attribute">font_scale</span>=1) hm = sns.heatmap(cm, <span class="hljs-attribute">cbar</span>=<span class="hljs-literal">True</span>, <span class="hljs-attribute">annot</span>=<span class="hljs-literal">True</span>, <span class="hljs-attribute">square</span>=<span class="hljs-literal">True</span>, <span class="hljs-attribute">fmt</span>=<span class="hljs-string">'.2f'</span>, annot_kws={<span class="hljs-string">'size'</span>: 10}, <span class="hljs-attribute">yticklabels</span>=cols.values, <span class="hljs-attribute">xticklabels</span>=cols.values) plt.show()</pre></div><p id="32ec"><b>Output —</b></p><figure id="abe6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*_mOueqHdC8u9HHfuyFJVOg.png"><figcaption></figcaption></figure><p id="db7a">So the conclusion is ‘OverallQual’, ‘GrLivArea’ and ‘TotalBsmtSF’ are strongly correlated with ‘SalePrice’.</p><h1 id="3f1b">Decision Tree and Random Forest Regressor</h1><div id="9ee8"><pre><span class="hljs-keyword">from</span> sklearn.<span class="hljs-property">tree</span> <span class="hljs-keyword">import</span> <span class="hljs-title class_">DecisionTreeRegressor</span> <span class="hljs-keyword">from</span> sklearn.<span class="hljs-property">ensemble</span> <span class="hljs-keyword">import</span> <span class="hljs-title class_">RandomForestRegressor</span></pre></div><div id="ac3f"><pre><span class="hljs-attr">predictor_cols</span> = [<span class="hljs-string">'LotArea'</span>, <span class="hljs-string">'OverallQual'</span>, <span class="hljs-string">'GrLivArea'</span>,<span class="hljs-string">'YearBuilt'</span>, <span class="hljs-string">'TotRmsAbvGrd'</span>,<span class="hljs-string">'TotalBsmtSF'</span>]</pre></div><div id="3b41"><pre><span class="hljs-comment"># Create training predictors data</span> <span class="hljs-attr">train_X</span> = Iowadata[predictor_cols] <span class="hljs-attr">train_y</span> = Iowadata.SalePrice</pre></div><div id="190b"><pre>Iowa_model_d=DecisionTreeRegressor(max_depth=2) Iowa_model_d.fit(train_X,train_y)</pre></div><div id="e6b7"><pre>Iowa_model_rr = RandomForestRegressor() Iowa_model_rr.fit(train_X, train_y)</pre></div><div id="c225"><pre><span class="hljs-comment"># Read the test data</span> <span class="hljs-attr">test</span> = pd.read_csv(<span class="hljs-string">'../path to file/test.csv'</span>) <span class="hljs-attr">test_X</span> = test[predictor_cols].head()</pre></div><div id="9252"><pre><span class="hljs-comment"># Use the model to make predictions</span> <span class="hljs-attr">predicted_prices_rr</span> = Iowa_model_rr.predict(test_X) <span class="hljs-attr">predicted_prices_d</span> = Iowa_model_d.predict(test_X)</pre></div><div id="b435"><pre><span class="hljs-built_in">print</span>(<span class="hljs-string">"Predicted prices ( Decision Tree Regressor):"</span>,np.<span class="hljs-built_in">round</span>(predicted_prices_d)) <span class="hljs-built_in">print</span>(<span class="hljs-string">"Predicted Prices ( RandomForest Regressor):"</span>,predicted_prices_rr)</pre></div><p id="46be"><b>Output —</b></p><div id="3d45"><pre>Predicted <span class="hljs-title function_">prices</span> <span class="hljs-params">( Decision Tree Regressor)</span>: [<span class="hljs-number">140384.</span> <span class="hljs-number">140384.</span> <span class="hljs-number">140384.</span> <span class="hljs-number">140384.</span> <span class="hljs-number">274736.</span>] Predicted <span class="hljs-title function_">Prices</span> <span class="hljs-params">( RandomForest Regressor)</span>: [<span class="hljs-number">134940.</span> <span class="hljs-number">149790.</span> <span class="hljs-number">155664.</span> <span class="hljs-number">180490.</span> <span class="hljs-number">218350.</span>]</pre></div><h2 id="251d">That’s it for now.</h2><h2 id="e53e">Find Day 30 Below:</h2><div id="306c" class="link-block"> <a href="https://readmedium.com/day-30-of-30-days-of-data-engineering-series-with-projects-f73681fa0e2"> <div> <div> <h2>Day 30 of 30 days of Data Engineering Series with Projects</h2> <div><h3>Welcome back peeps to Day 30 of Data Engineering Series with Projects!</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*f8KVYC08o3wHgYIy)"></div> </div> </div> </a> </div><p id="00f9"><i>Let me know if you have questions in the comment section below. Subscribe/ Follow, Like/Clap as it would encourage me to write more in my free time</i></p><p id="6bdd"><i>Stay Tuned!!</i></p><h2 id="1275">Read More —</h2><h1 id="e6db">11 most important System Design Base Concepts</h1><blockquote id="07c4"><p><a href="https://readmedium.com/complete-system-design-series-part-1-45bf9c8654bc"><b>1. System design basics</b></a></p></blockquote><blockquote id="5e90"><p><a href="https://readmedium.com/complete-system-design-series-part-2-922f45f2faaf"><b>2. Horizontal and vertical scaling</b></a></p></blockquote><blockquote id="e615"><p><a href="https://readmedium.com/part-3-complete-system-design-series-e1362baa8a4c"><b>3. Load balancing and Message queues</b></a></p></blockquote><blockquote id="ba0d"><p><a href="https://readmedium.com/part-4-complete-system-design-series-138bc9fbcfc0"><b>4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture</b></a></p></blockquote><blockquote id="9480"><p><a href="https://readmedium.com/part-5-complete-system-design-series-4b9b04f23608"><b>5. Caching, Indexing, Proxies</b></a></p></blockquote><blockquote id="786d"><p><a href="https://readmedium.com/part-6-complete-system-design-series-59a2d8bbf1ed"><b>6. Networking, How Browsers work, Content Network Delivery ( CDN)</b></a></p></blockquote><blockquote id="1e02"><p><a href="https://readmedium.com/part-7-complete-system-design-series-1bef528923d6"><b>7. Database Sharding, CAP Theorem, Database schema Design</b></a></p></blockquote><blockquote id="ed73"><p><a href="https://readmedium.com/part-8-complete-system-design-series-57bc88433c8e"><b>8. Concurrency, API, Components + OOP + Abstraction</b></a></p></blockquote><blockquote id="6213"><p><a href="https://readmedium.com/part-9-complete-system-design-series-df975c85ec51"><b>9. Estimation and Planning, Performance</b></a></p></blockquote><blockquote id="c502"><p><b>10. <a href="https://readmedium.com/part-10-complete-system-design-series-523b4dd978bf?sk=741f92929c8639a2e4cf218521e8cc4a">Map Reduce, Patterns and Microservices</a></b></p></blockquote><blockquote id="967c"><p><b>11. <a href="https://naina0412.medium.com/part-11-complete-system-design-series-9c8efbc0237a?sk=5bddf2adc78ea4947ae88ab21c94af1c">SQL vs NoSQL and Cloud</a></b></p></blockquote><blockquote id="767e"><p><a href="https://readmedium.com/most-popular-system-design-questions-mega-compilation-45218129fe26"><b>12. Most Popular System Design Questions</b></a></p></blockquote><blockquote id="33a4"><p><b>13. <a href="https://readmedium.com/day-3-of-system-design-case-studies-series-875df4b766b9?sk=1133c9135f849f4497400a6b9caf5c2e">System Design Template — How to solve any System Design Question</a></b></p></blockquote><blockquote id="7526"><p><a href="https://readmedium.com/quick-roundup-solved-system-design-case-studies-6ad776d437cf?sk=e42f56968e1b592382f484c222e7c111"><b>14. Quick RoundUp : Solved System Design Case Studies</b></a></p></blockquote><h1 id="9ae4">System Design Case Studies — In Depth</h1><blockquote id="f5c2"><p><a href="https://readmedium.com/day-4-of-system-design-case-studies-series-design-instagram-part-1-10943440f29c?sk=38e68a213058e169e71754e00c501813"><b>Design Instagram</b></a></p></blockquote><blockquote id="4c87"><p><a href="https://readmedium.com/day-5-of-system-design-case-studies-series-design-messenger-app-7b73c589f4a?sk=4a53b122e8f02836c17fa35622aa0309"><b>Design Messenger App</b></a></p></blockquote><blockquote id="ca00"><p><a href="https://readmedium.com/day-7-of-system-design-case-studies-series-design-twitter-fd0722d7bb7c?sk=cdfc23d38edd5f48dc30efdcc0801c3e"><b>Design Twitter</b></a></p></blockquote><blockquote id="52bb"><p><a href="https://readmedium.com/day-8-of-system-design-case-studies-series-design-url-shortener-91c812a08e0b?sk=5e20d426c91ebaacfe43031bc43642da"><b>Design URL Shortener</b></a></p></blockquote><blockquote id="dcc2"><p><a href="https://readmedium.com/day-9-of-system-design-case-studies-series-design-dropbox-ead523ccccfa?sk=03b3b4ea3633051f7a9a7d379b1066b8"><b>Design Dropbox</b></a></p></blockquote><blockquote id="25bf"><p><a href="https://readmedium.com/day-10-of-system-design-case-studies-series-design-youtube-58bc4ad09c4b?sk=18560ffcc3d7174566d38d60c99d4914"><b>Design Youtube</b></a></p></blockquote><blockquote id="6d16"><p><a href="https://readmedium.com/day-11-of-system-design-case-studies-series-design-api-rate-limiter-8627993c5a92?sk=fad32cada40f414aef47b7928dfb7e67"><b>Design API Rate Limiter</b></a></p></blockquote><blockquote id="3942"><p><a href="https://readmedium.com/day-12-of-system-design-case-studies-series-design-web-crawler-efba93f40030?sk=185e88e37fbc3d30dcaf41bc3863a868"><b>Design Web Crawler</b></a></p></blockquote><blockquote id="80bf"><p><a href="https://naina0412.medium.com/day-13-of-system-design-case-studies-series-design-facebooks-newsfeed-e96294c7d871?sk=f0956b536721902c7da6a1ec8e2f0880"><b>Design Facebook’s Newsfeed</b></a></p></blockquote><blockquote id="2353"><p><a href="https://readmedium.com/day-14-of-system-design-case-studies-series-design-yelp-af432d13e838?sk=55e19b7d8ad43c4109e9b1694678c177"><b>Design Yelp</b></a></p></blockquote><blockquote id="dcb7"><p><a href="https://readmedium.com/day-15-of-system-design-case-studies-series-design-uber-2adc612701d?sk=d1c5481fcfd4f30e84074e5a5d7c548e"><b>Design Uber</b></a></p></blockquote><blockquote id="580e"><p><a href="https://readmedium.com/day-16-of-system-design-case-studies-series-design-tinder-a0867163f449?sk=6313f0b9760c3d78a17443a98bdb3330"><b>Design Tinder</b></a></p></blockquote><blockquote id="6b84"><p><a href="https://readmedium.com/day-17-of-system-design-case-studies-series-design-tiktok-58e5a93bcfb5?sk=5eed7cbac7af8b6506951417514ec8e0"><b>Design Tiktok</b></a></p></blockquote><blockquote id="1a51"><p><a href="https://readmedium.com/day-18-of-system-design-case-studies-series-design-whatsapp-38ec39f32b44?sk=89cc7003e78917fd65330ad56a7ed8f0"><b>Design Whatsapp</b></a></p></blockquote><blockquote id="86fc"><p><a href="https://readmedium.com/most-popular-system-design-questions-mega-compilation-45218129fe26?sk=6432dd01c067dd28bc81da1dfceccdab"><b>Most Popular System Design Questions</b></a></p></blockquote><blockquote id="a7f7"><p><a href="https://readmedium.com/quick-roundup-solved-system-design-case-studies-6ad776d437cf?sk=e42f56968e1b592382f484c222e7c111"><b>Mega Compilation : Solved System Design Case studies</b></a></p></blockquote><h1 id="c325">Complete Data Structures and Algorithm Series</h1><blockquote id="c8f1"><p><a href="https://readmedium.com/day-4-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-83d4c90d9115?sk=8ab3d284915f8f28534651d1c9cf41e5"><b>Complexity Analysis</b></a></p></blockquote><blockquote id="c155"><p><a href="https://readmedium.com/day-5-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-backtracking-f7de93dbe72d?sk=08c8ce11404387e46fdd73013aec267f"><b>Backtracking</b></a></p></blockquote><blockquote id="66fd"><p><a href="https://readmedium.com/day-3-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-af62dc4aec9c?sk=704354dbc4c0048ac0a0b5c97f1eef0e"><b>Sliding Window</b></a></p></blockquote><blockquote id="da37"><p><a href="https://readmedium.com/day-6-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-greedy-technique-4b219a8488d0?sk=540b74ce2d13f345dd00cbbfb252815f"><b>Greedy Technique</b></a></p></blockquote><blockquote id="d262"><p><a href="https://readmedium.com/day-8-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-two-pointer-7c513302dfa9?sk=cc32bc3ce22139845c64d195553859e0"><b>Two pointer Technique</b></a></p></blockquote><blockquote id="43b9"><p><a href="https://readmedium.com/day-11-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-arrays-bf7045a3c98b?sk=42ad70a29aa9f7891794d7feaa63bea9"><b>Arrays</b></a></p></blockquote><blockquote id="8dbb"><p><a href="https://readmedium.com/day-13-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-linked-list-6536f0041153?sk=952899c3d2e2bd5b4dbd6c8ad7debf05"><b>Linked List</b></a></p></blockquote><blockquote id="29e2"><p><a href="https://readmedium.com/day-12-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-strings-fa27c45a5fd6?sk=f6b3fc7bf5c770d2d04107667be1c446"><b>Strings</b></a></p></blockquote><blockquote id="95aa"><p><a href="https://readmedium.com/day-14-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-stack-b26d68eb3477?sk=ed28cc4e45134ad3562a3594ddea4017"><b>Stack</b></a></p></blockquote><blockquote id="d072"><p><a href="https://readmedium.com/day-15-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-queue-db38d5477cd5?sk=44ae516bf0f1da510ee9618b7f135995"><b>Queues</b></a></p></blockquote><blockquote id="0e08"><p><a href="https://readmedium.com/day-17-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-hash-ddfe72657211?sk=a457b598d5f5f3d2572029693c587198"><b>Hash Table/Hashing</b></a></p></blockquote><blockquote id="b6d3"><p><a href="https://readmedium.com/day-16-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-binary-search-8799ce6321cb?sk=e4ee1b96f1cd2f9531b5e739539d8b7e"><b>Binary Search</b></a></p></blockquote><blockquote id="5586"><p><a href="https://readmedium.com/day-7-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-1-d-dynamic-2560f585499?sk=0756b6bd798238d9a96fe3d161690350"><b>1- D Dynamic Programming</b></a></p></blockquote><blockquote id="be69"><p><a href="https://readmedium.com/day-10-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-divide-and-a00f7375507?sk=3d52023dade6f37c396b58e039ca29f2"><b>Divide and Conquer Technique</b></a></p></blockquote><blockquote id="b173"><p><a href="https://readmedium.com/day-9-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-recursion-ed6f7f41742?sk=bf98ce6abdb3e3f2fa71213c6ed8caa9"><b>Recursion</b></a></p></blockquote><h1 id="c583">Some of the other best Series —</h1><blockquote id="ca4e"><p><a href="https://readmedium.com/day-1-day-60-quick-recap-of-60-days-of-data-science-and-ml-6fc021643d1?sk=4e75e043b7630a9f963562ebac94e129"><b>60 days of Data Science and ML Series with projects</b></a></p></blockquote><blockquote id="1ff6"><p><a href="https://readmedium.com/quick-recap-30-days-of-natural-language-processing-nlp-with-projects-series-ceb674e3c09b?sk=ca09b27b3d5867f23ab4dc367b6c0c32"><b>30 Days of Natural Language Processing ( NLP) Series</b></a></p></blockquote><blockquote id="c2cf"><p><a href="https://readmedium.com/day-1-of-30-days-of-machine-learning-ops-7c299e4b09be?sk=4ab48350a5c359fc157109e48b1d738f"><b>30 days of Machine Learning Ops</b></a></p></blockquote><blockquote id="5c01"><p><a href="https://readmedium.com/day-1-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-dsa-and-system-965e860ec677?sk=aa49bdbc46a72f600cb51774f0aea6b6"><b>30 days of Data Structures and Algorithms and System Design Simplified</b></a></p></blockquote><blockquote id="f2fd"><p><a href="https://readmedium.com/day-1-of-60-days-of-deep-learning-with-projects-series-4a5caa305cf6?sk=89f3d43dd450035546bf3a8cf85bb125"><b>60 Days of Deep Learning with Projects Series</b></a></p></blockquote><blockquote id="b8a0"><p><a href="https://readmedium.com/day-1-of-30-days-of-data-engineering-894822fcb128?sk=76ba558bfe2d9f85cbe741e505295531"><b>30 days of Data Engineering with projects Series</b></a></p></blockquote><blockquote id="9d85"><p><a href="https://readmedium.com/day-1-data-science-and-ml-research-papers-simplified-a68b00a3b1c4?sk=56136229ff738bd734f19d2b6953f78c"><b>Data Science and Machine Learning Research ( papers) Simplified</b></a><b> **</b></p></blockquote><blockquote id="fb06"><p><a href="https://readmedium.com/100-days-your-data-science-and-ml-degree-part-3-c621ecfdf711?sk=1a8c7b0c204d73432d56b7d1a3a26474"><b>100 days : Your Data Science and Machine Learning Degree Series with projects</b></a></p></blockquote><blockquote id="5203"><p><a href="https://ai.plainenglish.io/23-data-science-techniques-you-should-know-61bc2c9d1b3a?sk=1680c36193eb22198974c9008d62a33c"><b>23 Data Science Techniques You Should Know</b></a></p></blockquote><blockquote id="ac12"><p><a href="https://readmedium.com/mega-post-tech-interview-the-only-list-of-questions-you-need-to-practice-ee349ea197bb?sk=fac3614684daff4b50a70c0a71e4d528"><b>Tech Interview Series — Curated List of coding questions</b></a></p></blockquote><blockquote id="dede"><p><a href="https://readmedium.com/system-design-made-easy-quick-recap-of-complete-system-design-34af7e3aedfb?sk=bdd6a19edc1f3ce4a5064923f5b68721"><b>Complete System Design with most popular Questions Series</b></a></p></blockquote><blockquote id="6508"><p><a href="https://readmedium.com/complete-data-preprocessing-and-data-visualization-with-projects-mega-compilation-part-2-41584ef0920e?sk=842390da51689b8d43148c3980570db0"><b>Complete Data Visualization and Pre-processing Series with projects</b></a></p></blockquote><blockquote id="409a"><p><a href="https://readmedium.com/complete-python-and-projects-mega-compilation-7ec8f7adfe71?sk=ee0ecf43f23c6dd44dd35d984b3e5df4"><b>Complete Python Series with Projects</b></a></p></blockquote><blockquote id="67e0"><p><a href="https://readmedium.com/complete-advanced-python-with-projects-mega-compilation-part-6-729c1826032b?sk=7faffe20f8039fa57099f7a372b6d665"><b>Complete Advanced Python Series with Projects</b></a></p></blockquote><blockquote id="4ded"><p><a href="https://readmedium.com/my-list-of-kaggle-best-notebooks-topic-wise-data-science-and-machine-learning-part-2-84772863e9ae?sk=5ed02e419854a6c11add3ddc1e52947f"><b>Kaggle Best Notebooks that will teach you the most</b></a></p></blockquote><blockquote id="4b2e"><p><a href="https://medium.datadriveninvestor.com/the-complete-developers-guide-to-git-6a23125996e1?sk=e30479bbe713930ea93018e1a46d9185"><b>Complete Developers Guide to Git</b></a></p></blockquote><blockquote id="732e"><p><a href="https://readmedium.com/6-exceptional-github-repos-for-all-developers-part-1-21e8fa04e150?sk=9140b249af6fe73d45717185fad48962"><b>Exceptional Github Repos</b></a><b> — Part 1</b></p></blockquote><blockquote id="7079"><p><a href="https://readmedium.com/6-exceptional-github-repos-for-all-developers-part-2-3eec9a68c31c?sk=8e31d0eb7eb1d2d0bbbcecaa66bd4e7e"><b>Exceptional Github Repos</b></a><b> — Part 2</b></p></blockquote><blockquote id="d9c6"><p><a href="https://medium.datadriveninvestor.com/best-resources-for-data-science-and-machine-learning-full-list-5ceb9a2791bf?sk=cf85b2cef95560c58509877a794577ff"><b>All the Data Science and Machine Learning Resources</b></a></p></blockquote><blockquote id="b2cb"><p><a href="https://medium.datadriveninvestor.com/210-machine-learning-projects-with-source-code-that-you-can-build-today-721b035649e0?sk=da5f593572a0261a6314afad99a0356c"><b>210 Machine Learning Projects</b></a></p></blockquote><h2 id="9083">Tech Newsletter —</h2><blockquote id="f86c"><p>If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to <b>Tech Brew :</b></p></blockquote><div id="8d5c" class="link-block"> <a href="https://naina0405.substack.com/"> <div> <div> <h2>Ignito</h2> <div><h3>Data Science, ML, AI and more… Click to read Ignito, by Naina Chaturvedi, a Substack publication. Launched 7 months…</h3></div> <div><p>naina0405.substack.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*_ER1J-h50iqAjH70)"></div> </div> </div> </a> </div><p id="eb48"><b><i>For Python Projects —</i></b></p><div id="22a4" class="link-block"> <a href="https://readmedium.com/complete-python-and-projects-mega-compilation-7ec8f7adfe71"> <div> <div> <h2>Complete Python And Projects — Mega Compilation</h2> <div><h3>Everything that you need to know in Python with Projects…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*NnCSMN6etFjjw4Jn.jpg)"></div> </div> </div> </a> </div><div id="471c" class="link-block"> <a href="https://medium.datadriveninvestor.com/analyzing-video-using-python-opencv-and-numpy-5471cab200c4"> <div> <div> <h2>Analyzing Video using Python, OpenCV and NumPy</h2> <div><h3>With Code Implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*PYNCDW3IXI2BcT5f.jpg)"></div> </div> </div> </a> </div><p id="f199"><b><i>For complete 60 days of Data Science and ML : Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML</i></b></p><div id="9d77" class="link-block"> <a href="https://readmedium.com/day-1-day-60-quick-recap-of-60-days-of-data-science-and-ml-6fc021643d1"> <div> <div> <h2>Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML</h2> <div><h3>Connect the ML dots…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*ZfJ1yKIzPLGABAI_.png)"></div> </div> </div> </a> </div><p id="1253"><b><i>Follow for more updates. Stay tuned and keep coding!</i></b></p><h1 id="21c3">For other projects, tune to —</h1><p id="b31f"><b>Build Machine Learning Pipelines( With Code)</b></p><div id="5b37" class="link-block"> <a href="https://medium.datadriveninvestor.com/build-machine-learning-pipelines-with-code-part-1-bd3ed7152124"> <div> <div> <h2>Build Machine Learning Pipelines( With Code) — Part 1</h2> <div><h3>Complete implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*KdToBD8RDMBH4jXM.png)"></div> </div> </div> </a> </div><p id="946c"><b>Recurrent Neural Network with Keras</b></p><div id="f317" class="link-block"> <a href="https://medium.datadriveninvestor.com/recurrent-neural-network-with-keras-b5b5f6fe5187"> <div> <div> <h2>Recurrent Neural Network with Keras</h2> <div><h3>Project Implementation and cheatsheet…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*xs3Dya3qQBx6IU7C.png)"></div> </div> </div> </a> </div><p id="8018"><b>Clustering Geolocation Data in Python using DBSCAN and K-Means</b></p><div id="2b3e" class="link-block"> <a href="https://medium.datadriveninvestor.com/clustering-geolocation-data-in-python-using-dbscan-and-k-means-3705d9f44522"> <div> <div> <h2>Clustering Geolocation Data in Python using DBSCAN and K-Means</h2> <div><h3>Project Implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*0uPCZnohdaPCO4NN.png)"></div> </div> </div> </a> </div><p id="a29c"><b>Facial Expression Recognition using Keras</b></p><div id="ccaa" class="link-block"> <a href="https://medium.datadriveninvestor.com/facial-expression-recognition-using-keras-cbdd661a0a54"> <div> <div> <h2>Facial Expression Recognition using Keras</h2> <div><h3>Project Implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*CGch7hzdjg1fpgKy.jpg)"></div> </div> </div> </a> </div><p id="0db7"><b>Hyperparameter Tuning with Keras Tuner</b></p><div id="6dff" class="link-block"> <a href="https://medium.datadriveninvestor.com/hyperparameter-tuning-with-keras-tuner-3a609d3fd85b"> <div> <div> <h2>Hyperparameter Tuning with Keras Tuner</h2> <div><h3>Project Implementation….</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*jlaEz8AZaptNWHEr.png)"></div> </div> </div> </a> </div><p id="fed8"><b>Custom Layers in Keras</b></p><div id="e4fd" class="link-block"> <a href="https://medium.datadriveninvestor.com/custom-layers-in-keras-de5f793217aa"> <div> <div> <h2>Custom Layers in Keras</h2> <div><h3>Code implementation …</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*1IH67KJadqeqeO01.png)"></div> </div> </div> </a> </div></article></body>

Day 29 of 30 days of Data Analytics with Projects Series — Regression( Part 2 )

Pic credits : ResearchGate

Welcome back peep. Hope all’s well. This is Day 29 of 30 days of data analytics where we will be covering Regression ( Part 2).

1.Linear Regression

2. Multi Linear Regression

3. Polynomial Regression

Part 2

4. Support Vector Regression

5. Decision Tree Regression

6. Random Forest Regression

7.Project

Let’s cover the most important concepts in brief —

  1. Linear Regression: a statistical method used to analyze the relationship between one dependent variable and one or more independent variables by fitting a linear equation to the observed data.
  2. Multi Linear Regression: a statistical method used to analyze the relationship between one dependent variable and two or more independent variables by fitting a linear equation to the observed data.
  3. Polynomial Regression: a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modeled as an nth degree polynomial.
  4. Support Vector Regression: a type of support vector machine that is used for regression problems. It uses the same basic idea as SVM for classification, but the algorithm is adapted for regression.
  5. Decision Tree Regression: a type of decision tree used for regression problems. It creates a model that predicts a value for a given input.
  6. Random Forest Regression: a type of ensemble learning method for regression problems, where a number of decision trees are created and combined to make a final prediction.

Example Code Implementation —

import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import MultiTaskLasso, Lasso
from sklearn.preprocessing import PolynomialFeatures
from sklearn.svm import SVR
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor

# Generate sample data for regression
X = np.random.rand(100, 1) * 10
y = 2 * X + np.random.randn(100, 1)

# Linear Regression
linear_model = LinearRegression()
linear_model.fit(X, y)
linear_predictions = linear_model.predict(X)

# Multi-Linear Regression
multi_linear_model = MultiTaskLasso(alpha=0.1)
multi_linear_model.fit(X, y)
multi_linear_predictions = multi_linear_model.predict(X)

# Polynomial Regression
polynomial_features = PolynomialFeatures(degree=2)
X_poly = polynomial_features.fit_transform(X)
polynomial_model = LinearRegression()
polynomial_model.fit(X_poly, y)
polynomial_predictions = polynomial_model.predict(X_poly)

# Support Vector Regression
svr_model = SVR(kernel='linear')
svr_model.fit(X, y.flatten())
svr_predictions = svr_model.predict(X)

# Decision Tree Regression
dt_model = DecisionTreeRegressor()
dt_model.fit(X, y)
dt_predictions = dt_model.predict(X)

# Random Forest Regression
rf_model = RandomForestRegressor(n_estimators=100)
rf_model.fit(X, y.flatten())
rf_predictions = rf_model.predict(X)

# Plotting the results
plt.scatter(X, y, color='blue', label='Actual Data')
plt.plot(X, linear_predictions, color='red', label='Linear Regression')
plt.plot(X, multi_linear_predictions, color='green', label='Multi-Linear Regression')
plt.plot(X, polynomial_predictions, color='orange', label='Polynomial Regression')
plt.plot(X, svr_predictions, color='purple', label='Support Vector Regression')
plt.plot(X, dt_predictions, color='brown', label='Decision Tree Regression')
plt.plot(X, rf_predictions, color='magenta', label='Random Forest Regression')
plt.xlabel('X')
plt.ylabel('y')
plt.title('Regression Models')
plt.legend()
plt.show()
  • Linear Regression: We use the LinearRegression class from scikit-learn to fit a linear equation to the data and predict the values.
  • Multi-Linear Regression: We use the MultiTaskLasso class from scikit-learn to fit a linear equation with multiple targets (in this case, only one target) and predict the values.
  • Polynomial Regression: We use the PolynomialFeatures class to transform the original features into polynomial features, and then fit a linear equation using LinearRegression to predict the values.
  • Support Vector Regression: We use the SVR class from scikit-learn to perform Support Vector Regression with a linear kernel and predict the values.
  • Decision Tree Regression: We use the DecisionTreeRegressor class from scikit-learn to fit a decision tree model and predict the values.
  • Random Forest Regression: We use the RandomForestRegressor class from scikit-learn to fit an ensemble of decision trees and predict the values.

Snippet —

What’s covered in 30 days of Data Analytics Series till now —

Day 1 : Data Analytics basics and kickstart of Data analytics with projects series

Day 2: Business Understanding — Data Driven Decision Making, Descriptive Analysis, Predictive Analysis, Diagnostic Analysis, Prescriptive Analysis

Day 3 : Data Analytics Ecosystem — Data Life Cycle, Data Analysis complete process ( most important things)

Day 4 : Probability, Conditional Probability, Binomial Distribution, Probability Density Function, Sampling Distribution

Day 5 : Statistics

Day 6 : Basic and Advanced SQL

Day 7 : Data Collection, Data Cleaning and Python

Day 8 : Pandas and Numpy

Day 9 : Data Manipulation

Day 10 : Data Visualization — Part 1

Day 11 : Project 1 : Data Visualization — Part 2

Day 12 : Data Visualization — Part 3

Day 13: Tableau — Part 1

Day 14: Tableau — Part 2

Day 15: Tableau — Part 3

Tableau Project

Day 16 : Data Analysis Project 2

Day 17 : Data Analysis Project 3

Day 18: Data Analysis Project 4

Day 19: Data Analysis Project 5

Day 20 : Data Analysis Project 6

Categorical and Numerical Features

Missing Value Analysis

Fill the missing Values

Unique Value Analysis

Univariate Analysis

Bivariate Analysis

Multivariate Analysis

Correlation Analysis

Day 21 : Data Analysis Project 7

Data Profiling

Feature Engineering

GroupBy Features

Categorical and Numerical Features

Missing Value Analysis

Fill the missing Values

Unique Value Analysis

Univariate Analysis

Bivariate Analysis

Multivariate Analysis

Correlation Analysis

Day 22 : Data analysis Project 8

Linear Regression

Data Profiling

Feature Engineering

Sort Values

Categorical and Numerical Features

Missing Value Analysis

Unique Value Analysis

Univariate Analysis

Bivariate Analysis

Multivariate Analysis

Correlation Analysis

Correlation Coefficients

Day 25 : Data Analysis Day 11

Summary Functions

Indexing

Grouping

Sorting

Data Profiling

Categorical and Numerical Features

Missing Value Analysis

Unique Value Analysis

Data Visualization

Take Complete Hands On Tableau Course : Link

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

Let’s get started with the part 2!

Support Vector Regression

Pic credits : eduCBA

The Linear Regression method is basically a linear approach for modeling the relationship between a scalar dependent variable y and one or more explanatory variables (or independent variables) as it just minimizes the least squares error: for one object target y = x^T * w, where w is model’s weights.

Loss(w) = Sum_1_N(x_n^T * w — y_n) ^ 2 → min(w)

In this, we try to minimize the errors between the prediction and data. In Support Vector Regression (SVR) the goal is that the errors do not exceed the threshold and it uses the same concept as SVM, instead for the regression problems. It supports the presence of non-linearity in the data and provides an efficient prediction model.

Two most important features of Support Vector Regression:

  • Maximum margin
  • Hyperplane

To build a SVR:

  • Collect a training set and choose a kernel and it’s parameters
  • Define the correlation matrix.
  • Train and figure out the contraction coefficients to create an estimator.
  • Compute the correlation vector.
from sklearn.svm import SVR
regressor = SVR(kernel = 'rbf')
regressor.fit(X, y)
y_pred = regressor.predict(3.7)
y_pred = ss_y.inverse_transform(y_pred)

where kernel can be linear, Gaussian etc.

Decision Tree Regression

Decision Tree are widely used in both in classification and regression problems. These are basically predictive models that use binary rules to calculate an output/target value. Each tree has branches, nodes and leaves where the root node represents the entire population or sample.

Pic credits : ResearchGate

Here is the great resource to study how does it work.

from sklearn.tree import DecisionTreeRegressor 
regressor = DecisionTreeRegressor(random_state = 0) 
regressor.fit(X, y)
y_pred = regressor.predict(6.5)

Random Forest Regression

It’s a supervised machine learning algorithm that is constructed from decision tree algorithms ( it predicts the outcome by taking the average or mean of the output from the different trees) and Is used to solve both regression and classification problems. It mainly used ensemble learning, a technique in which many classifiers are combined together to provide solutions to complex problems. It’s very efficient as it reduces the overfitting of datasets, provides an effective way of handling missing data, runs efficiently on large databases, achieves extremely high accuracies, increases precision and scales really well when new features are added to the dataset..

Pic credits : ResearchGate

It works well with both categorical and numerical input variables, which in-turn minimizes the time spent on one-hot encoding or labeling data.

from sklearn.ensemble import RandomForestRegressor
regressor = RandomForestRegressor(n_estimators=10, random_state=0)    regressor.fit(X, y)    
y_pred = regressor.predict(4.2)

Project

Let’s dive in!

Load the data

import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
import numpy as np
main_file_path = '../path to file/data.csv'
Iowadata = pd.read_csv(main_file_path)
Iowadata.head()

Output —

Get to know your Data better

# Get details about your data
Iowadata.info()

Output —

<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1460 entries, 0 to 1459
Data columns (total 81 columns):
Id               1460 non-null int64
MSSubClass       1460 non-null int64
MSZoning         1460 non-null object
LotFrontage      1201 non-null float64
LotArea          1460 non-null int64
Street           1460 non-null object
Alley            91 non-null object
LotShape         1460 non-null object
LandContour      1460 non-null object
Utilities        1460 non-null object
LotConfig        1460 non-null object
LandSlope        1460 non-null object
Neighborhood     1460 non-null object
Condition1       1460 non-null object
Condition2       1460 non-null object
BldgType         1460 non-null object
HouseStyle       1460 non-null object
OverallQual      1460 non-null int64
OverallCond      1460 non-null int64
YearBuilt        1460 non-null int64
YearRemodAdd     1460 non-null int64
RoofStyle        1460 non-null object
RoofMatl         1460 non-null object
Exterior1st      1460 non-null object
Exterior2nd      1460 non-null object
MasVnrType       1452 non-null object
MasVnrArea       1452 non-null float64
ExterQual        1460 non-null object
ExterCond        1460 non-null object
Foundation       1460 non-null object
BsmtQual         1423 non-null object
BsmtCond         1423 non-null object
BsmtExposure     1422 non-null object
BsmtFinType1     1423 non-null object
BsmtFinSF1       1460 non-null int64
BsmtFinType2     1422 non-null object
BsmtFinSF2       1460 non-null int64
BsmtUnfSF        1460 non-null int64
TotalBsmtSF      1460 non-null int64
Heating          1460 non-null object
HeatingQC        1460 non-null object
CentralAir       1460 non-null object
Electrical       1459 non-null object
1stFlrSF         1460 non-null int64
2ndFlrSF         1460 non-null int64
LowQualFinSF     1460 non-null int64
GrLivArea        1460 non-null int64
BsmtFullBath     1460 non-null int64
BsmtHalfBath     1460 non-null int64
FullBath         1460 non-null int64
HalfBath         1460 non-null int64
BedroomAbvGr     1460 non-null int64
KitchenAbvGr     1460 non-null int64
KitchenQual      1460 non-null object
TotRmsAbvGrd     1460 non-null int64
Functional       1460 non-null object
Fireplaces       1460 non-null int64
FireplaceQu      770 non-null object
GarageType       1379 non-null object
GarageYrBlt      1379 non-null float64
GarageFinish     1379 non-null object
GarageCars       1460 non-null int64
GarageArea       1460 non-null int64
GarageQual       1379 non-null object
GarageCond       1379 non-null object
PavedDrive       1460 non-null object
WoodDeckSF       1460 non-null int64
OpenPorchSF      1460 non-null int64
EnclosedPorch    1460 non-null int64
3SsnPorch        1460 non-null int64
ScreenPorch      1460 non-null int64
PoolArea         1460 non-null int64
PoolQC           7 non-null object
Fence            281 non-null object
MiscFeature      54 non-null object
MiscVal          1460 non-null int64
MoSold           1460 non-null int64
YrSold           1460 non-null int64
SaleType         1460 non-null object
SaleCondition    1460 non-null object
SalePrice        1460 non-null int64
dtypes: float64(3), int64(35), object(43)
memory usage: 924.0+ KB

You can see there are many null/missing values which we need to take care of. Also see which columns ( features) we would be exploring more and finally would be using in our model.

column_of_interest= ['SalePrice']
column_data=Iowadata[column_of_interest]
column_data.describe()

Output —

col_of_interest=['LotArea','SalePrice']
col_data=Iowadata[col_of_interest]
col_data.describe()

Output —

Data Visualization

# Plot Sale Prices by Sale Condition
plt.figure(figsize=(8,6),dpi=100)sns.barplot(x=Iowadata['SaleCondition'].sort_values(ascending=True),y=Iowadata['SalePrice'].sort_values(ascending = True),data=Iowadata,orient='v',palette='Set3')
plt.title("Sale Prices by Sale Condition")
plt.xlabel('Sale Condition')
plt.ylabel('Sale Price')
plt.xticks(rotation=45)
plt.show()

Output —

# Pair plot to Plot pairwise relationships in a dataset
plt.figure(figsize=(8,6),dpi=100)
sns.pairplot(Iowadata, x_vars=["LotArea",
"YearBuilt",
"1stFlrSF",
"2ndFlrSF",
"FullBath","GrLivArea",
"BedroomAbvGr",
"TotRmsAbvGrd",'SalePrice'],y_vars=["LotArea",
"YearBuilt",
"1stFlrSF",
"2ndFlrSF",
"FullBath","GrLivArea",
"BedroomAbvGr",
"TotRmsAbvGrd",'SalePrice'] )
plt.show()

Output —

sns.regplot(data = Iowadata, x= 'LotArea',y='SalePrice' )

Output —

sns.regplot(data = Iowadata, x='1stFlrSF' ,y='SalePrice',color='green' )

Output —

sns.regplot(data = Iowadata, x= 'GrLivArea',y='SalePrice',color='cyan' )

Output —

#saleprice correlation matrix
n = 10 
corrmat = Iowadata.corr()
f, ax = plt.subplots(figsize=(12, 9))
cols = corrmat.nlargest(n, 'SalePrice')['SalePrice'].index
cm = np.corrcoef(Iowadata[cols].values.T)
sns.set(font_scale=1)
hm = sns.heatmap(cm, cbar=True, annot=True, square=True, fmt='.2f', annot_kws={'size': 10}, yticklabels=cols.values, xticklabels=cols.values)
plt.show()

Output —

So the conclusion is ‘OverallQual’, ‘GrLivArea’ and ‘TotalBsmtSF’ are strongly correlated with ‘SalePrice’.

Decision Tree and Random Forest Regressor

from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
predictor_cols = ['LotArea', 'OverallQual', 'GrLivArea','YearBuilt', 'TotRmsAbvGrd','TotalBsmtSF']
# Create training predictors data
train_X = Iowadata[predictor_cols]
train_y = Iowadata.SalePrice
Iowa_model_d=DecisionTreeRegressor(max_depth=2)
Iowa_model_d.fit(train_X,train_y)
Iowa_model_rr = RandomForestRegressor()
Iowa_model_rr.fit(train_X, train_y)
# Read the test data
test = pd.read_csv('../path to file/test.csv')
test_X = test[predictor_cols].head()
# Use the model to make predictions
predicted_prices_rr = Iowa_model_rr.predict(test_X)
predicted_prices_d = Iowa_model_d.predict(test_X)
print("Predicted prices ( Decision Tree Regressor):",np.round(predicted_prices_d))
print("Predicted Prices ( RandomForest Regressor):",predicted_prices_rr)

Output —

Predicted prices ( Decision Tree Regressor): [140384. 140384. 140384. 140384. 274736.]
Predicted Prices ( RandomForest Regressor): [134940. 149790. 155664. 180490. 218350.]

That’s it for now.

Find Day 30 Below:

Let me know if you have questions in the comment section below. Subscribe/ Follow, Like/Clap as it would encourage me to write more in my free time

Stay Tuned!!

Read More —

11 most important System Design Base Concepts

1. System design basics

2. Horizontal and vertical scaling

3. Load balancing and Message queues

4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture

5. Caching, Indexing, Proxies

6. Networking, How Browsers work, Content Network Delivery ( CDN)

7. Database Sharding, CAP Theorem, Database schema Design

8. Concurrency, API, Components + OOP + Abstraction

9. Estimation and Planning, Performance

10. Map Reduce, Patterns and Microservices

11. SQL vs NoSQL and Cloud

12. Most Popular System Design Questions

13. System Design Template — How to solve any System Design Question

14. Quick RoundUp : Solved System Design Case Studies

System Design Case Studies — In Depth

Design Instagram

Design Messenger App

Design Twitter

Design URL Shortener

Design Dropbox

Design Youtube

Design API Rate Limiter

Design Web Crawler

Design Facebook’s Newsfeed

Design Yelp

Design Uber

Design Tinder

Design Tiktok

Design Whatsapp

Most Popular System Design Questions

Mega Compilation : Solved System Design Case studies

Complete Data Structures and Algorithm Series

Complexity Analysis

Backtracking

Sliding Window

Greedy Technique

Two pointer Technique

Arrays

Linked List

Strings

Stack

Queues

Hash Table/Hashing

Binary Search

1- D Dynamic Programming

Divide and Conquer Technique

Recursion

Some of the other best Series —

60 days of Data Science and ML Series with projects

30 Days of Natural Language Processing ( NLP) Series

30 days of Machine Learning Ops

30 days of Data Structures and Algorithms and System Design Simplified

60 Days of Deep Learning with Projects Series

30 days of Data Engineering with projects Series

Data Science and Machine Learning Research ( papers) Simplified **

100 days : Your Data Science and Machine Learning Degree Series with projects

23 Data Science Techniques You Should Know

Tech Interview Series — Curated List of coding questions

Complete System Design with most popular Questions Series

Complete Data Visualization and Pre-processing Series with projects

Complete Python Series with Projects

Complete Advanced Python Series with Projects

Kaggle Best Notebooks that will teach you the most

Complete Developers Guide to Git

Exceptional Github Repos — Part 1

Exceptional Github Repos — Part 2

All the Data Science and Machine Learning Resources

210 Machine Learning Projects

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

For Python Projects —

For complete 60 days of Data Science and ML : Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML

Follow for more updates. Stay tuned and keep coding!

For other projects, tune to —

Build Machine Learning Pipelines( With Code)

Recurrent Neural Network with Keras

Clustering Geolocation Data in Python using DBSCAN and K-Means

Facial Expression Recognition using Keras

Hyperparameter Tuning with Keras Tuner

Custom Layers in Keras

Data Science
Machine Learning
Tech
Programming
Artificial Intelligence
Recommended from ReadMedium