<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Catalysts ReachOut</title>
    <description>The latest articles on Forem by Catalysts ReachOut (@catalysts_reachout).</description>
    <link>https://forem.com/catalysts_reachout</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F6018%2Fb6a7ed91-f112-47c8-aaf4-423e55b068e7.png</url>
      <title>Forem: Catalysts ReachOut</title>
      <link>https://forem.com/catalysts_reachout</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/catalysts_reachout"/>
    <language>en</language>
    <item>
      <title>Diabetes Prediction Using SVM - Interesting Machine Learning Projects</title>
      <dc:creator>Prakash Singh</dc:creator>
      <pubDate>Mon, 19 Sep 2022 20:45:19 +0000</pubDate>
      <link>https://forem.com/catalysts_reachout/diabetes-prediction-using-svm-interesting-machine-learning-projects-p18</link>
      <guid>https://forem.com/catalysts_reachout/diabetes-prediction-using-svm-interesting-machine-learning-projects-p18</guid>
      <description>&lt;h2&gt;
  
  
  Domain Knowledge&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;In this case, we train our model with several medical informations such as the &lt;em&gt;blood glucose level, insulin level&lt;/em&gt; of patients along with whether the person has diabetes or not so this act as labels whether that person is diabetic or non-diabetic so this will be label for this case.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So once, we feed this data to our support vector machine model. What happens is our model tries to plot the data in a graph.&lt;br&gt;
Once it plots the data, it tries to find a hyperplane so in this image you can see a hyper plane. So, what happens is that this hyperplane separates these two datas.&lt;br&gt;&lt;br&gt;
Then once, we feed  new data to this model, it tries to put that particular data in either of these two groups. With that, it can predict whether the person will be diabetic or non-diabetic. &lt;br&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;"Okay so in this case, we use several medical information such as bmi, blood glucose level, insulin level of patient and etc."&lt;/strong&gt;&lt;/em&gt; &lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements for this project&lt;/strong&gt;&lt;br&gt;
→ Python&lt;br&gt;
→ Support Vector Machine&lt;br&gt;
&lt;br&gt; &lt;br&gt;
First of all, we will talk about &lt;strong&gt;Support Vector Machine&lt;/strong&gt;. &lt;br&gt;
&lt;strong&gt;SVM&lt;/strong&gt; is one of the most popular Supervised Learning algorithms, which is used for Classification as well as Regression problems. &lt;br&gt;
However, primarily, it is used for Classification problems in Machine Learning.&lt;br&gt;&lt;br&gt;
The goal of the SVM algorithm is to create the best line or decision boundary that can segregate n-dimensional space into classes so that we can easily put the new data point in the correct category in the future. This best decision boundary is called a hyperplane.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqdsp2mtvs94v7y06nh93.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqdsp2mtvs94v7y06nh93.png" alt="SVM"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frx5crefvf879w0znupyy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frx5crefvf879w0znupyy.png" alt="workflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Diabetes Data&lt;/u&gt;&lt;/strong&gt;→ Take data from hospitals or patients.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Data Preprocessing&lt;/u&gt;&lt;/strong&gt; → We need to preprocess data where we will try to analyze the data and this data won't be very suitable to feed to the machine learning model and we need to standardize this data at first because there is a lot of medical information and we want all these data to be on the same bridge. So, what we do is to standardize all of this data so that all this data will lie in the same range.&lt;br&gt;
And all these things will be done in the data pre-processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Train-test-split&lt;/u&gt;&lt;/strong&gt; → We will train our machine learning model with training data and then we will try to find the accuracy score of our model with the help of test data. So simply, it will tell us how well our model is performing.&lt;br&gt;
So once, we had done with splitting of data into training and testing data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Support Vector Machine Classifier&lt;/u&gt;&lt;/strong&gt; → Now, we will feed data to our SVM classifier model. We will be using a classifier model where this model will classify whether the patient is diabetic or non-diabetic. &lt;br&gt;
Once, we have trained it. We'll have a trained SVM classifier. So, when we give a new data. So, it can now predict whether the patient is diabetic or non-diabetic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n1dmpgl817yqb36shkd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n1dmpgl817yqb36shkd.png" alt="conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Summary :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Importing Dependencies
&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn.preprocessing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;StandardScaler&lt;/span&gt; &lt;span class="c1"&gt;#(standardize data to common range)
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn.model_selection&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;train_test_split&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;svm&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn.metrics&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;accuracy_score&lt;/span&gt;

&lt;span class="c1"&gt;# Loading the diabetes dataset to pandas dataframe
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;diabetes.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# all data except labels
&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;columns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Outcome&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Outcome&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# train test split
&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;train_test_split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;test_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;stratify&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;random_state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Model Training
&lt;/span&gt;&lt;span class="n"&gt;classifier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;svm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SVC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;linear&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;classifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Github Link for Jupyter File and Dataset&lt;/strong&gt; : &lt;a href="https://github.com/CatalystsReachOut/Diabetes-Prediction-Using-SVM" rel="noopener noreferrer"&gt;Click Here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>datascience</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How To Name Classes in HTML and CSS using BEM</title>
      <dc:creator>Anand Doddamani</dc:creator>
      <pubDate>Sat, 10 Sep 2022 19:22:19 +0000</pubDate>
      <link>https://forem.com/catalysts_reachout/how-to-name-classes-in-html-and-css-using-bem-4aod</link>
      <guid>https://forem.com/catalysts_reachout/how-to-name-classes-in-html-and-css-using-bem-4aod</guid>
      <description>&lt;p&gt;Hello Buddies,&lt;/p&gt;

&lt;p&gt;In Today's story we are discussing about naming convention in HTML and CSS. &lt;/p&gt;

&lt;p&gt;We are Discussing about BEM naming convention where B - Body, E - Element, M - Modifier. You may had a glance of naming classes similar as mentioned below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Wrong
.catlystNavbar{ ... }
.catlystNavbarLogo{ ... }
.catlystNavbarBg{ ... }

//Correct
.catalyst-navbar {  ...}
.catalyst-navbar__logo{  ...}
.catalyst-navbar--bg{  ...}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BEM attempts to divide the overall user interface into small reusable components.&lt;/p&gt;

&lt;p&gt;To understand efficiently let us take an example of our a navbar&lt;br&gt;
Catalysts Navbar&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wSfHXsui--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dyiriiwcew4xon9nhi01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wSfHXsui--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dyiriiwcew4xon9nhi01.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above navbar represents as element, such as a block of design.&lt;/p&gt;

&lt;p&gt;Which represents the first letter of BEM that is &lt;strong&gt;Block&lt;/strong&gt; and the component styled similarly as shown below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.catalyst-navbar{  ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;E - Element&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;E stands for Element in BEM&lt;/p&gt;

&lt;p&gt;For instance, the catalyst-navbar a logo and links&lt;/p&gt;

&lt;p&gt;The logo and links are all elements within the component. They may be seen as child components, i.e. children of the overall parent component.&lt;/p&gt;

&lt;p&gt;Using the BEM naming convention, element class names are derived by adding two underscores, followed by the element name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.catalyst-navbar__logo{  ... }
.catalyst-navbar__content{  ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;M - Modifier&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;M stands for Modifier in BEM&lt;/p&gt;

&lt;p&gt;What if the navbar was modified and we could have a blue or a red background&lt;/p&gt;

&lt;p&gt;In the real world, this could be a red button or blue button. These are modifications of the component in question.&lt;/p&gt;

&lt;p&gt;Using BEM, modifier class names are derived by adding two hyphens followed by the element name.&lt;/p&gt;

&lt;p&gt;For Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.catalyst-navbar--bg{  ... }
.catalyst-navbar--red{  ... }
.catalyst-navbar--blue{  ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the final code I wrote for this navbar&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vu5n59v7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nd1peuvpio7shjjsocbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vu5n59v7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nd1peuvpio7shjjsocbh.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now the question arrise , Why naming convention is required ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Naming things is hard. We're trying to make things easier, and save ourselves time in the future with more maintainable code.&lt;/p&gt;

&lt;p&gt;Naming things correctly in CSS will make your code easier to read and maintain.&lt;/p&gt;

&lt;p&gt;If you choose to use the BEM naming convention, it will become easier to see the relationship between your design components/blocks just by looking at the markup.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
