<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shreshth Yash on Medium]]></title>
        <description><![CDATA[Stories by Shreshth Yash on Medium]]></description>
        <link>https://medium.com/@shreshthyash?source=rss-aa50e532347------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*FUWPlv7Y1Jii4OLQUND1yg.jpeg</url>
            <title>Stories by Shreshth Yash on Medium</title>
            <link>https://medium.com/@shreshthyash?source=rss-aa50e532347------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:10:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shreshthyash/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding LendingClub with Databricks]]></title>
            <link>https://medium.com/analytics-vidhya/understanding-lendingclub-with-databricks-e8795506ca2a?source=rss-aa50e532347------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8795506ca2a</guid>
            <category><![CDATA[lending-club]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[eda]]></category>
            <dc:creator><![CDATA[Shreshth Yash]]></dc:creator>
            <pubDate>Wed, 08 Jul 2020 17:17:11 GMT</pubDate>
            <atom:updated>2020-07-13T22:10:29.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*LtsWRCh2DUEx8liqH-uUTg.png" /></figure><p><strong>Introduction to Databricks</strong></p><p>Databricks is a managed platform for running Apache Spark — that means that you do not have to learn complex cluster management concepts nor perform tedious maintenance tasks to take advantage of Spark. Databricks also provides a host of features to help its users be more productive with Spark. It’s a point and click platform for those that prefer a user interface like data scientists or data analysts. Follow this <a href="https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/346304/2168141618055043/484361/latest.html">link</a> to get a gentle introduction of data bricks and Apache Spark environment.</p><p><strong>Amazing things what Spark offers</strong>:</p><p>· Fast Processing of data</p><p>· Use Python and its libraries</p><p>· If you are good with SQL or Scala, simultaneously use that as well</p><p>We’ll be covering Python and SQL both and typical functions that Databricks can offer for analysis.</p><p>Easy and simple steps to set up the Databricks environment for Lending Club Analysis</p><p>1. Fire up a cluster</p><p>2. Upload the data</p><p>3. Initiate a notebook</p><p><strong>How does Lending Club operate?</strong></p><p>Lending Club is a peer to peer lending company based in the United States in which investors provide funds to potential borrowers and investors earn profits depending on the risk they take (credit score of borrowers). Lending Club plays like a third party between investors and borrowers. Borrowers profile is shared with the investors and they decide to invest after checking the risk involved. After the loan is received to the borrower then it is repaid in monthly installments with the interest they agreed on.</p><p><strong>Dataset</strong></p><p>The data set is taken from <a href="https://www.kaggle.com/wordsforthewise/lending-club">Kaggle</a></p><p>For now, we’ve taken one-quarter of data to perform data cleaning and further analysis. Setting up a spark data frame by reading the CSV file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*gaP4hh1tM0ZIulZbs0IlwA.png" /></figure><p>Let’s check the schema of the data frame to analyze the datatypes of all the features</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*p5JCBzZ5DOxQbn1XFnUtlA.png" /></figure><p>To start using the SQL query, we first need to create a table and start using SQL the same and easy way, just by adding ‘%sql’ on the start of the column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcaKi0o1_gwWKJ_XI0OE0g.png" /></figure><p><strong>What are our important features mean(data dictionary)</strong></p><p>· term — The number of payments on the loan.</p><p>· homeOwnership-homeownership status RENT, OWN, MORTGAGE, OTHER.</p><p>· grade — LC assigned loan grade</p><p>· purpose — A category provided by the borrower for the loan request.</p><p>· intRate — Interest Rate on the loan</p><p>· addrState — The state provided by the borrower in the loan application</p><p>· loan_status — Current status of the loan</p><p>· application_type — loan is an individual application or a joint application</p><p>· loan_amnt — The listed amount of the loan applied for by the borrower.</p><p>· emp_length — Employment length in years.</p><p>· annual_inc — The self-reported annual income provided by the borrower.</p><p>· dti — borrower’s total monthly debt payments on the total debt obligations.</p><p>· dti_joint-co-borrowers’ total monthly payments on the total debt obligations</p><p>· delinq_2yrs — The number of 30+ days past-due incidences of delinquency in the borrower’s credit file for the past 2 years</p><p>· revol_util — Revolving line utilization rate</p><p>· total_acc — The total number of credit lines currently in the borrower’s</p><p>· num_tl_90g_dpd_24m — Number of accounts 90 or more days past due.</p><p>Collecting all the important features in another data frame</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sEx9ZL-acK7-_S8nS79ctw.png" /></figure><p>Describe functions gives the mean, median, stdev, min, max, count of the features selected from the data frame</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fNhtcUuaGgf3GwNi-yaDOQ.png" /></figure><p><strong>Data Cleaning</strong></p><p>It is the most tedious process and takes almost 75% of the time in order to generate good analysis.</p><p>Cleaning Employment length and term column of the borrower using <strong>regular expression</strong> and making a separate column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-t0zhoDtVRwEEW7iQ5e1Wg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lvm3r-t5Cjm-a7oQB3V0mA.png" /></figure><p>Comparing the cleaned columns with the original columns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*TMtka0UQwPrVOjqifOpYgg.png" /></figure><p>We saw above the data types of majority columns are string, so converting some of them to double using cast function</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*besVEG8rscoGFSDsPOnSeQ.png" /></figure><p>Checking our target column “loan status”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*fkfKyO6-7yDCwkfeGuDmMA.png" /></figure><p>Here we can see that status like Late(31–120 days), In Grace period, Late(16–30 days), Charged off suggests that customer loan is getting bad. We’ll merge these into a single function by creating a new column “bad_loan”. Values which are in Current, FullyPaid are “No” and the rest of others will be in “Yes” status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZp3SWGnzqrWiDlUSmZvkg.png" /></figure><p>Final bad loan column can be seen like this. There is a lot more data cleaning done and multiple columns are dropped after cleaning. A whole notebook can be found on my Github repo.</p><h4><strong>Exploratory Data Analysis</strong></h4><p>Try to analyze the bad_loan with respect to grade column using cross tab function to very similar to the pivot table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*hE_PK4Gz9c8BTvjm5_q2Iw.png" /></figure><p>It can be seen that as the grade increases, the count of bad_loan also increases.</p><p>Next is to check for what purposes does the loan is used by the borrower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*FWsz6-BJ8tXzlqvto_2abw.png" /></figure><p>What customers do can be clearly seen above that to cover up other debts of the borrower, consolidated and credit card bills are paid through loans in the majority. The reason is not to get a credit score impacted.</p><p><strong>Databricks</strong> gives an option to visualize data at the same time. So we’ll check the total loan amount given to borrowers based on grades.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xrWItq94STfWyY88DWEp0A.png" /></figure><p>Checking the state-wise total loan amount</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*fekDHxOxB_L9pw58eij2DA.png" /></figure><p>Here we can see that <strong>Florida, California, Texas</strong> are some states where most of the loans are taken. Iowa has no loan at all.</p><p>Now let’s check which states have the maximum bad loans</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*joA2svGub1xfWokVtxvVSQ.png" /></figure><p>It can be seen that California has the maximum number of <strong>defaulters</strong>, followed by <strong>Florida and NewYork</strong>.</p><p>Let’s check the below graph, Grade A and B are with less defaulters as compared to F and G grade</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWvj3bq1sweDjGKMpDPE8w.png" /></figure><p>Loan amount distribution</p><p>Let’s check how much loan is usually taken by customers. Here is a histogram of the loan_amount to see the distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DuuZ18383LqVUlPBXAsTJg.png" /></figure><p>The majority of loan amount given to borrowers is the range of 10k -15k. We can also see the distribution is also rightly skewed.</p><p>For checking the outliers we can use the box plot and getting more insights about the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymt-5I3PKZxqKsyEnu04sA.png" /></figure><p>Seeing the box plot it can be said that if the loan is Good then the media is around 13k but when the loan is Bad then the mean of the loan amount is 23k. So, we can infer that increasing the loan amount can lead to bad loans, there are many other factors that also should be taken into account.</p><p>Now checking the interest rate with respect to Bad loans</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmtJed7ScaSiqTwiTwsuew.png" /></figure><p>For the bad loans, interest rates are pretty much on the higher side.</p><p>We can see what type of homeownership of the customer with respect to loan is bad or not. This can tell the behavior of the customers and stability of the customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7y-AqALI6X5D-CksJk_LQ.png" /></figure><p>To Conclude here,</p><p>Databricks platform is really fast for large datasets and give more features for exploratory data analysis with multiple graph options. Multiple language support like Python, SQL, Scala is very handy to use according to the comfort zone. Spark data frames are very similar to the pandas&#39; data frame and visualization with Python libraries like Matplotlib, Seaborn can also be used to perform EDA with amazing graphs.</p><p>Thanks for your time. You can post me your feedback on comments or directly on shreshthyash@gmail.com or else connect me on <a href="https://www.linkedin.com/in/shreshth-yash">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8795506ca2a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/understanding-lendingclub-with-databricks-e8795506ca2a">Understanding LendingClub with Databricks</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Patient will not show up for the Hospital appointment Machine Learning in Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@shreshthyash/a-patient-will-not-show-up-for-the-hospital-appointment-machine-learning-in-python-cc7ce37a6595?source=rss-aa50e532347------2"><img src="https://cdn-images-1.medium.com/max/800/1*Y5r0lXMjWwIa2U22zKJl8A.png" width="800"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/@shreshthyash/a-patient-will-not-show-up-for-the-hospital-appointment-machine-learning-in-python-cc7ce37a6595?source=rss-aa50e532347------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@shreshthyash/a-patient-will-not-show-up-for-the-hospital-appointment-machine-learning-in-python-cc7ce37a6595?source=rss-aa50e532347------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc7ce37a6595</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[hospital]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Shreshth Yash]]></dc:creator>
            <pubDate>Wed, 19 Feb 2020 01:52:55 GMT</pubDate>
            <atom:updated>2020-03-17T20:22:19.074Z</atom:updated>
        </item>
    </channel>
</rss>