<?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 Sabeen Fatima on Medium]]></title>
        <description><![CDATA[Stories by Sabeen Fatima on Medium]]></description>
        <link>https://medium.com/@sabeenfatimaofficial?source=rss-8c5ee2ca742e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*h1pnNd8JE_0n55lEX2ks6g@2x.jpeg</url>
            <title>Stories by Sabeen Fatima on Medium</title>
            <link>https://medium.com/@sabeenfatimaofficial?source=rss-8c5ee2ca742e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 00:40:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sabeenfatimaofficial/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[Demystifying Model Comparison: A Beginner’s Guide to Choosing the Right Statistical Modelling]]></title>
            <link>https://medium.com/@sabeenfatimaofficial/demystifying-model-comparison-a-beginners-guide-to-choosing-the-right-statistical-modelling-c84548f6668d?source=rss-8c5ee2ca742e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c84548f6668d</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistical-modeling]]></category>
            <category><![CDATA[analysis]]></category>
            <dc:creator><![CDATA[Sabeen Fatima]]></dc:creator>
            <pubDate>Thu, 25 May 2023 15:29:46 GMT</pubDate>
            <atom:updated>2023-05-25T15:29:46.168Z</atom:updated>
            <content:encoded><![CDATA[<h3>Demystifying Model Comparison: A Beginner’s Guide to Choosing the Right Statistical Modelling Technique</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*rpcV92L5MniZEhjMKQ98Ig.png" /><figcaption>Bias-Variance trade-off</figcaption></figure><h3>Overview</h3><p>Statistical modeling can be overwhelming for beginners, but model comparison is a vital process in selecting the right technique for your data. In this beginner’s guide, we will demystify model comparison and provide insights into choosing the appropriate statistical modeling technique. We’ll cover techniques like cross-validation, information criteria, Bayes factor, and Occam’s Razor.</p><h3><strong>Significance of Model Comparison</strong></h3><p>Model comparison allows you to assess and compare the performance of different statistical models. It helps you avoid overfitting, ensure generalization, and improve the accuracy of predictions for your data.</p><h3><strong>Understanding Model Comparison Techniques</strong></h3><h4>Cross-Validation</h4><p>Leave-One-Out Cross-Validation (LOOCV) is a technique that estimates a model’s performance on unseen data by iteratively leaving one data point out as a validation set. LOOCV provides valuable insights into how well your model generalizes.</p><h4>Information Criteria</h4><p>Information criteria, such as the Akaike Information Criterion (AIC) , Widely Applicable Information Criterion(WAIC) and Bayesian Information Criterion (BIC), balance model goodness-of-fit with complexity. Lower AIC, WAIC, BIC values indicate better-fitting models while penalizing excessive model complexity. Deviance Information Criterion (DIC) is somehow in the middle between AIC and WAIC. However, WAIC is recommended over DIC.</p><h4>Bayes Factor</h4><p>Bayes factor is a statistical measure used in Bayesian model comparison. It focuses on which <em>model </em>is better while WAIC (and LOO) focuses on<br>which model will give the better <em>predictions</em>.</p><p>It quantifies the relative strength of evidence for one model over another based on the observed data. Bayes factor naturally incorporates Occam’s Razor by penalizing overly complex models.</p><h3>Occam’s Razor and Bayes Factor</h3><p>Occam’s Razor, a principle of simplicity, suggests that among competing explanations, the <em>simplest </em>one is often the best. Bayes factor inherently incorporates Occam’s Razor by considering the complexity of models. It <em>penalizes </em>complex models, favoring simpler models that explain the data adequately.</p><h3>Factors Influencing Model Comparison</h3><h4><strong>Model Complexity</strong></h4><p>As a beginner, it is advisable to start with simpler models, such as linear regression, before exploring more complex techniques. Understanding the complexity of each technique and matching it to your dataset’s complexity is crucial.</p><h4><strong>Dataset Nature</strong></h4><p>Consider the characteristics of your data, such as linearity, nonlinearity, presence of outliers, and distributional assumptions. Different techniques may perform better in different scenarios.</p><h3>Case Studies and Real-world Examples</h3><h4>Predicting House Prices</h4><p>Compare linear regression, decision trees, and random forests to predict house prices. Use cross-validation, information criteria, and Bayes factor to select the most suitable model.</p><h4>Customer Churn Analysis</h4><p>Analyze customer churn (Customer loss rate) using logistic regression, naive Bayes, and support vector machines (SVM). Compare their performance using cross-validation, information criteria, and Bayes factor.</p><h3>Conclusion</h3><p>By incorporating model comparison techniques like cross-validation, information criteria, Bayes factor, and Occam’s Razor, you can confidently choose the right statistical modeling technique for your data. Remember to consider model complexity, understand your dataset’s characteristics, and evaluate models based on multiple metrics. Through practice and continued learning, you’ll develop expertise in selecting the most appropriate model.</p><blockquote>Embrace the power of model comparison, unleash the potential of your data, and embark on your journey towards better insights and impactful analysis. Remember, with each analysis, you grow as a data scientist.<br><strong>Happy modelling!— </strong><a href="http://linkedin.com/in/iamsabeenfatima/"><strong>Sabeen Fatima</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c84548f6668d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Full-Stack JavaScript Applications with AWS Amplify: A Comprehensive Guide]]></title>
            <link>https://medium.com/@sabeenfatimaofficial/building-full-stack-javascript-applications-with-aws-amplify-a-comprehensive-guide-dcd91649ca38?source=rss-8c5ee2ca742e------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcd91649ca38</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Sabeen Fatima]]></dc:creator>
            <pubDate>Sat, 20 May 2023 08:28:08 GMT</pubDate>
            <atom:updated>2023-05-20T08:39:54.906Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this article, we will explore the process of building full-stack JavaScript applications using AWS Amplify. AWS Amplify is a powerful development framework that simplifies the process of developing scalable and secure applications by providing a comprehensive set of tools and services. We will cover the key concepts, features, and benefits of AWS Amplify, along with a step-by-step guide and code examples to help you get started.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuRbGMZ9oPjw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuRbGMZ9oPjw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuRbGMZ9oPjw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/31ec0d83223272c2fba2879e0d14f774/href">https://medium.com/media/31ec0d83223272c2fba2879e0d14f774/href</a></iframe><h4><strong>Overview of AWS Amplify</strong></h4><p>AWS Amplify is a comprehensive development framework that simplifies the process of building full-stack JavaScript applications. It offers a suite of tools and services that enable developers to focus on building high-quality applications without the need to manage infrastructure or complex backend configurations.</p><h4><strong>Key Features</strong></h4><ol><li>Easy setup and integration with popular front-end frameworks like React, Angular, Vue.js, and React Native.</li><li>Scalable serverless backend with automatic scaling and high availability using AWS services like AWS Lambda, Amazon API Gateway, Amazon DynamoDB etc.</li><li>GraphQL API support for real-time data updates.</li><li>Built-in authentication and authorization capabilities.</li><li>Simplified data storage with AWS services like Amazon DynamoDB for NoSQL database needs and Amazon S3 for file storage.</li><li>Continuous deployment and CI/CD integration.</li><li>Cost optimization through serverless architecture and pay-as-you-go pricing.</li></ol><h4><strong>Setting Up AWS Amplify</strong></h4><p><em>Installing and configuring Amplify CLI:</em></p><pre>npm install -g @aws-amplify/cli<br><br>amplify configure<br><br>amplify init</pre><p><em>Configuring backend resources:</em></p><p>Add backend resources, such as authentication, API, database, or storage.</p><pre>amplify add auth</pre><h4><strong>Building the Front-End</strong></h4><p><em>Creating a React application:</em></p><pre>npx create-react-app my-app<br>cd my-app</pre><p><em>Integrating Amplify into the front-end:</em></p><pre>npm install aws-amplify</pre><h4><strong>Authentication and User Management</strong></h4><p>For instace, to display a sign-up form and handle user registration, you can use the AmplifySignUp component as follows:</p><pre>import { AmplifyAuthenticator, AmplifySignUp } from &#39;@aws-amplify/ui-react&#39;;<br><br>function App() {<br>  return (<br>    &lt;AmplifyAuthenticator&gt;<br>      &lt;AmplifySignUp<br>        slot=&quot;sign-up&quot;<br>        formFields={[<br>          { type: &#39;username&#39; },<br>          { type: &#39;password&#39; },<br>          { type: &#39;email&#39; },<br>        ]}<br>      /&gt;<br>    &lt;/AmplifyAuthenticator&gt;<br>  );<br>}</pre><h4><strong>Creating a GraphQL API</strong></h4><p>To add a GraphQL API to your Amplify project, run the following command:</p><pre>amplify add api</pre><ul><li>Follow the prompts to select the API service type, configure the schema, and define your GraphQL types and resolvers.</li><li>For example, you can define a Post type with fields like id, title, and content, and specify resolvers for queries and mutations.</li></ul><h4><strong>Interacting with the API</strong></h4><ul><li>Once the GraphQL API is set up, you can perform CRUD operations using GraphQL queries and mutations in your React app.</li><li>For example, to fetch a list of posts, you can use the Amplify.API.graphql() method as follows:</li></ul><pre>import { useEffect, useState } from &#39;react&#39;;<br>import { API } from &#39;aws-amplify&#39;;<br><br>function App() {<br>  const [posts, setPosts] = useState([]);<br><br>  useEffect(() =&gt; {<br>    const fetchPosts = async () =&gt; {<br>      try {<br>        const { data } = await API.graphql({ query: listPosts });<br>        setPosts(data.listPosts.items);<br>      } catch (error) {<br>        console.log(&#39;Error fetching posts:&#39;, error);<br>      }<br>    };<br><br>    fetchPosts();<br>  }, []);<br><br>  return (<br>    &lt;div&gt;<br>      {posts.map((post) =&gt; (<br>        &lt;div key={post.id}&gt;<br>          &lt;h2&gt;{post.title}&lt;/h2&gt;<br>          &lt;p&gt;{post.content}&lt;/p&gt;<br>        &lt;/div&gt;<br>      ))}<br>    &lt;/div&gt;<br>  );<br>}</pre><h4><strong>Managing Serverless Functions</strong></h4><p>They allow you to run custom logic and perform backend operations.</p><ol><li><em>Add a Serverless Function:</em></li></ol><pre>amplify add function</pre><p>Follow the prompts to configure the function. For example, you can choose the Node.js runtime, provide a name for your function, and specify the handler file and method.</p><p>2. <em>Implement the Serverless Function Logic:</em></p><p>Open index.js (handler file) and write your custom logic. Here’s an example of a simple serverless function that multiplies two numbers:</p><pre>exports.handler = async (event) =&gt; {<br>  const { number1, number2 } = event.arguments;<br>  const result = number1 * number2;<br><br>  return result;<br>};</pre><p>3. <em>Deploy the Serverless Function:</em></p><pre>amplify push</pre><p>Amplify will package and deploy the function to AWS Lambda, which will handle the execution and scaling of the function.</p><p>4.<em> Invoke the Serverless Function:</em></p><p>You can invoke the deployed serverless function from your front-end code using the Amplify API library. Here’s an example using JavaScript:</p><pre>import { API } from &#39;aws-amplify&#39;;<br><br>const invokeServerlessFunction = async (number1, number2) =&gt; {<br>  try {<br>    const result = await API.graphql({<br>      query: `<br>        mutation MultiplyNumbers($number1: Int!, $number2: Int!) {<br>          multiplyNumbers(number1: $number1, number2: $number2)<br>        }<br>      `,<br>      variables: {<br>        number1: number1,<br>        number2: number2,<br>      },<br>    });<br><br>    console.log(&#39;Result:&#39;, result.data.multiplyNumbers);<br>  } catch (error) {<br>    console.log(&#39;Error invoking serverless function:&#39;, error);<br>  }<br>};<br><br>// Call the function<br>invokeServerlessFunction(5, 10);</pre><h4><strong>Securing Your Application</strong></h4><p>Amplify provides built-in authentication and authorization features to secure your application’s resources. Below is a step by step methodolgy to implement it.</p><ol><li><em>Import the necessary Amplify modules in your Node.js code:</em></li></ol><pre>const Amplify = require(&#39;aws-amplify&#39;);<br>const { Auth } = Amplify;</pre><p>2.<em> Configure Amplify with your AWS credentials and region:</em></p><pre>Amplify.configure({<br>  region: &#39;your-aws-region&#39;,<br>  accessKeyId: &#39;your-access-key-id&#39;,<br>  secretAccessKey: &#39;your-secret-access-key&#39;<br>});</pre><p>3. <em>Sign up a new user using Amplify’s authentication:</em></p><pre>Auth.signUp({<br>  username: &#39;user@example.com&#39;,<br>  password: &#39;password123&#39;,<br>  attributes: {<br>    email: &#39;user@example.com&#39;<br>  }<br>})<br>  .then(data =&gt; {<br>    console.log(&#39;User sign-up successful:&#39;, data);<br>  })<br>  .catch(error =&gt; {<br>    console.error(&#39;User sign-up error:&#39;, error);<br>  });</pre><p>4. <em>Confirm the user’s sign-up by providing the confirmation code sent via email:</em></p><pre>Auth.confirmSignUp(&#39;user@example.com&#39;, &#39;123456&#39;)<br>  .then(data =&gt; {<br>    console.log(&#39;User confirmation successful:&#39;, data);<br>  })<br>  .catch(error =&gt; {<br>    console.error(&#39;User confirmation error:&#39;, error);<br>  });</pre><p>5. <em>Allow authenticated users to access protected resources by checking their session:</em></p><pre>Auth.currentSession()<br>  .then(data =&gt; {<br>    const accessToken = data.getAccessToken().getJwtToken();<br>    console.log(&#39;User access token:&#39;, accessToken);<br>    // You can use the access token to authorize requests to your APIs or resources<br>  })<br>  .catch(error =&gt; {<br>    console.error(&#39;User session error:&#39;, error);<br>  });</pre><p>When a user is authenticated and has a valid session, they are issued an access token. This access token serves as a proof of their authentication and can be used to authorize their requests to APIs or resources.</p><p>For instance, if you are making an HTTP request using a library like Axios, you can include the access token in the request headers like this:</p><pre>const accessToken = data.getAccessToken().getJwtToken();<br>axios.get(&#39;/api/resource&#39;, {<br>  headers: {<br>    &#39;Authorization&#39;: `Bearer ${accessToken}`<br>  }<br>})<br>  .then(response =&gt; {<br>    // Handle the API response<br>  })<br>  .catch(error =&gt; {<br>    // Handle the error<br>  });</pre><p>This mechanism ensures that only authenticated users with valid access tokens can access the protected resources, adding an extra layer of security to your application.</p><h4><strong>Deploying and Scaling Your Application</strong></h4><p>Once you have developed your application, you can deploy it to the cloud using Amplify.</p><pre>amplify publish</pre><p>Amplify will build and deploy your front-end, backend resources, and serverless functions to the cloud. You can also set up auto-scaling to handle increased traffic.</p><figure><img alt="AWS Amplify" src="https://cdn-images-1.medium.com/max/1024/1*xjY_r8Fu3lWDH02lO6TZ8w.jpeg" /></figure><p>Level up your application development journey with AWS Amplify. Start exploring its capabilities today and join the thriving community of developers building exceptional applications with Amplify.</p><p>Connect with me on <a href="https://www.linkedin.com/in/iamsabeenfatima/">LinkedIn </a>to stay updated with the latest insights and discussions in the world of AWS Amplify and JavaScript development.</p><p>Thank you for joining me on this journey :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcd91649ca38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>