<?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>DEV Community: Cristopher Delgado </title>
    <description>The latest articles on DEV Community by Cristopher Delgado  (@cristopherddelgado).</description>
    <link>https://dev.to/cristopherddelgado</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%2Fuser%2Fprofile_image%2F1102298%2F3da19e34-4bfe-46c0-b69b-c95f91d31ce6.png</url>
      <title>DEV Community: Cristopher Delgado </title>
      <link>https://dev.to/cristopherddelgado</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cristopherddelgado"/>
    <language>en</language>
    <item>
      <title>Pneumonia Detection</title>
      <dc:creator>Cristopher Delgado </dc:creator>
      <pubDate>Thu, 11 Jan 2024 01:14:14 +0000</pubDate>
      <link>https://dev.to/cristopherddelgado/pneumonia-detection-5gg8</link>
      <guid>https://dev.to/cristopherddelgado/pneumonia-detection-5gg8</guid>
      <description>&lt;p&gt;Contacts: &lt;a href="https://github.com/cristopher-d-delgado"&gt;Github&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/cristopher-d-delgado/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cristopher-d-delgado/image_classification_pneumonia"&gt;Github Repository containing Project&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Throughout my journey in embracing data science, I finally decided to dive into the biomedical aspect of data science. Machine Learning is taking over the analytics in medical devices as machine learning is beginning to provide a vast amount of opportunities in medical devices. &lt;/p&gt;

&lt;p&gt;In this hypothetical scenario, I developed a Deep-learning model that can classify Pneumonia Images with 88% accuracy.  Data science is a comprehensive application and in this story, I got the chance to showcase my hard work in developing a deep-learning model &lt;/p&gt;

&lt;h2&gt;
  
  
  Data Understanding
&lt;/h2&gt;

&lt;p&gt;The X-ray images used in this git repo are of pediatric patients. The classification is a binary case on whether a patient has Pneumonia. The dataset comes from Kermany et al. on &lt;a href="https://data.mendeley.com/datasets/rscbjbr9sj/3"&gt;Mendley&lt;/a&gt;. The dataset on &lt;a href="https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia"&gt;Kaggle&lt;/a&gt; is from the original source using Version 2 that was published on January 01, 2018. The validation folder consisted on 16 images. This quantity was insufficient in my opinion to truly grasp if the deep learning model would be overfitting. Instead a custom validation folder was made by incorporating the 16 images in the val folder back into the train folder and randomly selecting 20% of the train set of each category.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tk8tMU-j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9nojom37sb11dsoty13i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tk8tMU-j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9nojom37sb11dsoty13i.png" alt="data_distribution" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Model
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Base Convolutional Model
&lt;/h3&gt;

&lt;p&gt;The model architecture was simple with one Convolutional Layer of 16 filters, one hidden Dense Layer of 256 neurons, and one output layer consisting on 1 neuron for binary classification. This model did well in training with promising generalization as seen in the Epoch vs Loss graph but, with unknown data, the model does very well in classifying Pneumonia but not Normal Images. We can see that in the metrics as in training both Precision and Recall were high in the validation and training sets. In the test set only the Recall was high at 99% and low in Precision at 71%. This is due to the small amount of Normal images in the training set in comparison to Pneumonia. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Set&lt;/th&gt;
&lt;th&gt;Loss&lt;/th&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;th&gt;Recall&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Train&lt;/td&gt;
&lt;td&gt;0.020&lt;/td&gt;
&lt;td&gt;100.00%&lt;/td&gt;
&lt;td&gt;100.00%&lt;/td&gt;
&lt;td&gt;100.00%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test&lt;/td&gt;
&lt;td&gt;1.336&lt;/td&gt;
&lt;td&gt;71.85%&lt;/td&gt;
&lt;td&gt;99.84%&lt;/td&gt;
&lt;td&gt;75.32%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;0.097&lt;/td&gt;
&lt;td&gt;98.56%&lt;/td&gt;
&lt;td&gt;97.68%&lt;/td&gt;
&lt;td&gt;97.22%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JLzW3KUT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gpff8f8dhb1j9uh31t8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JLzW3KUT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gpff8f8dhb1j9uh31t8.png" alt="cnn_metrics" width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Augmentation Model
&lt;/h3&gt;

&lt;p&gt;To combat the low availability of Normal images data augmentation was utilized to create synthetic examples of Normal images for the model to train on. Taking the pre-trained model I introduced data augmentation generators that act as brand new images to learn from. Data augmentation resulted in better performance of unknown data. The training metrics on the augmented data show how it began to do better on Normal Images as seen with the high Precision scores in the train and validations sets. The test set used a data generator that supplied unaltered images. This was done to truly grasp its performance on the actual test set.  &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Set&lt;/th&gt;
&lt;th&gt;Loss&lt;/th&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;th&gt;Recall&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Train&lt;/td&gt;
&lt;td&gt;0.228&lt;/td&gt;
&lt;td&gt;98.64%&lt;/td&gt;
&lt;td&gt;88.79%&lt;/td&gt;
&lt;td&gt;90.78%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test&lt;/td&gt;
&lt;td&gt;0.360&lt;/td&gt;
&lt;td&gt;88.43%&lt;/td&gt;
&lt;td&gt;94.10%&lt;/td&gt;
&lt;td&gt;88.62%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;0.217&lt;/td&gt;
&lt;td&gt;98.85%&lt;/td&gt;
&lt;td&gt;89.04%&lt;/td&gt;
&lt;td&gt;91.10%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1TQ1PapV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9i8dz9euuooq35xuewmq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1TQ1PapV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9i8dz9euuooq35xuewmq.png" alt="cnn_aug_metrics" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The best model was the augmented model as this model was the best-performing model across the board. It is slightly more complex than its base version but as a result, it learned from augmented data leading to better performance in Normal images. Please check out my entire project in the GitHub &lt;a href="https://github.com/cristopher-d-delgado/image_classification_pneumonia"&gt;repository&lt;/a&gt; where I try many more iterations such as Transfer Learning!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Heart Disease Prediction</title>
      <dc:creator>Cristopher Delgado </dc:creator>
      <pubDate>Mon, 25 Sep 2023 21:23:02 +0000</pubDate>
      <link>https://dev.to/cristopherddelgado/heart-disease-prediction-hgg</link>
      <guid>https://dev.to/cristopherddelgado/heart-disease-prediction-hgg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Media Profiles:&lt;/strong&gt;&lt;br&gt;
&lt;a href="//www.linkedin.com/in/cristopher-d-delgado"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/cristopher-d-delgado"&gt;Github&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Overview:
&lt;/h2&gt;

&lt;p&gt;Continuing my data science journey eventually meant I would finally reach a crossroads with Machine Learning. I am proud to say I have completed a third project that showcases my understanding of machine learning models. In this project that I want to share with everyone, I utilized six different classification models. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;LogisticClassifier()&lt;/li&gt;
&lt;li&gt;RandomForestClassfier()&lt;/li&gt;
&lt;li&gt;KNeighborsClassifier()&lt;/li&gt;
&lt;li&gt;AdaBosstClassifier()&lt;/li&gt;
&lt;li&gt;GradientBoostClassifier()&lt;/li&gt;
&lt;li&gt;XGBClassifer()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With these six classification models, I created baseline models and their optimized versions. In the end, I chose a single model that aligns the best with the project's main objective. &lt;/p&gt;

&lt;h2&gt;
  
  
  Business Problem:
&lt;/h2&gt;

&lt;p&gt;The main goal of this project was to address the idea of diagnostics in Cardiovascular Diseases (CVD). The stakeholder is a Diagnostic based Medical Device company that wants to integrate machine learning to provide continous monitoring and early detection of Cardio Vascular Disease-related symptoms into developing medical devices or already existent devices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stakeholder:&lt;/strong&gt; Diagnostic Medical Device Company&lt;/p&gt;

&lt;p&gt;The stakeholder wants to determine what related features to CVDs are the most important to monitor. Knowing that information they would like to develop medical devices for either at-home use for patients or clinical use devices and potentially use Machine Learning algorithms incorporated into their diagnostic devices and create software as a medical device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methodology
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Perform data cleaning which consists of casting columns to correct data types.&lt;/li&gt;
&lt;li&gt;Dealing with missing values accordingly. &lt;/li&gt;
&lt;li&gt;Perform data exploration and view correlations.&lt;/li&gt;
&lt;li&gt;Normalize continuous data in order to have all the data on the same scale.&lt;/li&gt;
&lt;li&gt;Create Testing and Training sets to train classification models and validate their performances.&lt;/li&gt;
&lt;li&gt;Use the recall scoring metric to optimize models&lt;/li&gt;
&lt;li&gt;Observe important features from the top-performing model.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I used the best recall score because I wanted the model's ability to correctly identify positive instances and minimize false negatives. The worst-case scenario for this model would be to classify an individual with heart disease when in reality they did have heart disease. In summary, I wanted the model to capture all positive cases and minimize false negatives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results:
&lt;/h2&gt;

&lt;p&gt;Baseline Receiving Operating Characteristic Curve:&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cKJo_VQl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ky4lg34x3wq21s2jtja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cKJo_VQl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ky4lg34x3wq21s2jtja.png" alt="base_roc" width="626" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Optimized Receiving Operating Characteristic Curve:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OIzm4Kc4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wn37o06pjfdyqn4g8hab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OIzm4Kc4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wn37o06pjfdyqn4g8hab.png" alt="op_roc" width="626" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The best-performing model was the Random Forests model which concluded the following top feature importance and confusion matrix&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VT5vrdqG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5pe1masanj5iwfqekssj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VT5vrdqG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5pe1masanj5iwfqekssj.png" alt="feature_importance" width="675" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I9KbBVU6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csdk8onvwej20jg5k7s8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I9KbBVU6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csdk8onvwej20jg5k7s8.png" alt="confusion_matrix" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this project, I concluded the following evaluations for the obtained results from my analysis:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I recommend incorporating the Random Forest model into a diagnostic medical device as software for the purposes of monitoring Cardiovascular symptoms for Cardio Vascular Diseases.&lt;/li&gt;
&lt;li&gt;I recommend developing medical devices geared towards monitoring the slope of the S-T segment of the Electrocardiogram, Exercise-induced angina, and measuring the S-T segment depression.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Overall Experience
&lt;/h2&gt;

&lt;p&gt;This was no easy task and there were times when I definitely got 'writer's block' due to the complexity of the task and the amount of models I needed to understand. There was much research that needed to be done using these classifiers. Now that I understand them I can proudly say that I can reproduce a project like this one using different features and targets. &lt;/p&gt;

&lt;p&gt;My next step would be to look into image processing and deep learning so I can analyze medical imaging and create diagnostics using that knowledge. This project was just the stepping stone to reach my next goal. &lt;/p&gt;




&lt;p&gt;To look more into this project, please look at my git repository which includes more analysis of the data and the data sources. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cristopher-d-delgado/heart_failure"&gt;Github Repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>codenewbie</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Home Value Regression Analysis</title>
      <dc:creator>Cristopher Delgado </dc:creator>
      <pubDate>Wed, 02 Aug 2023 22:01:23 +0000</pubDate>
      <link>https://dev.to/cristopherddelgado/home-value-regression-analysis-2fl7</link>
      <guid>https://dev.to/cristopherddelgado/home-value-regression-analysis-2fl7</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/cristopher-d-delgado"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As I continue my journey into data science and continue learning new data analysis methods, I am proud to have completed my second project showcasing my skills. This project is all about predicting home values located in King County Washington within the years 2021-2022. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Methodology:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Perform data cleaning which consisted of changing data types to appropriate/expected types.&lt;/li&gt;
&lt;li&gt;Normalize data and linearize continuous data accordingly.&lt;/li&gt;
&lt;li&gt;Perform exploratory data analysis to understand the correlations of the features with the price of a home.&lt;/li&gt;
&lt;li&gt;Take on an iterative approach to creating prediction models using Linear Regression.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Data Normalization:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I prepared the continous data by standardizing the distribution in order to compare it to a z-distribution. In doing so I was able to remove any outliers 3 standards deviations away from the sample mean and then convert the values back into their original values.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---UC1v756--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7g8zcg3x2036e2jdhg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---UC1v756--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7g8zcg3x2036e2jdhg5.png" alt="normalization" width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  General Trends:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;After removing outliers, correcting datatypes, and manipulating data representations I was then able to begin viewing general trends in the data with my target variable being 'price'. Price in this context refers to the home sell price. &lt;/li&gt;
&lt;li&gt;Viewing general trends then allowed me to see the features that most impact a home value.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PqXa1MIV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8o6zlyttlokc5cs58ru8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PqXa1MIV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8o6zlyttlokc5cs58ru8.png" alt="bath" width="440" height="275"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MKkc8EgF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9kqd7owpenfh7c5tg5m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MKkc8EgF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9kqd7owpenfh7c5tg5m.png" alt="cat" width="800" height="1338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Model:
&lt;/h2&gt;

&lt;p&gt;This model has the best interpretability and lowest err out of all the models I generated for this project. This model was achieved using polynomial regression. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f_5hX80d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/knmn3k13ztxrhla92197.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f_5hX80d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/knmn3k13ztxrhla92197.png" alt="model" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Location can make up for most of the price in a home's value. &lt;/li&gt;
&lt;li&gt;Home aspects such as bedrooms, bathrooms, and square footage matter. &lt;/li&gt;
&lt;li&gt;A home's construction and state matter.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenges:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A part of my data preparation was zip code extraction so I can consider visualizing how location impacts price more in depth. Unfortunately, I was not able to develop a clear graph that showcased its impact due to so many unique zip codes. I still included zip code impact in my models. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Learning Outcomes:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I managed to create predictive models and learned all about statics used in data science. &lt;/li&gt;
&lt;li&gt;I improved my data visualization abilities. &lt;/li&gt;
&lt;li&gt;Learned to draw insights from regression modeling.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please feel free to review the entire project in my GitHub &lt;a href="https://github.com/cristopher-d-delgado/Project_Linear_Regression_King_County"&gt;repository&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>learning</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Movie Analysis for Movie Production</title>
      <dc:creator>Cristopher Delgado </dc:creator>
      <pubDate>Thu, 15 Jun 2023 23:04:02 +0000</pubDate>
      <link>https://dev.to/cristopherddelgado/movie-analysis-for-movie-production-k3f</link>
      <guid>https://dev.to/cristopherddelgado/movie-analysis-for-movie-production-k3f</guid>
      <description>&lt;p&gt;Just recently I finished up my first data science driven project at &lt;a href="https://flatironschool.com/"&gt;Flatiron School&lt;/a&gt;. It was a big learning experience along with many ups and downs in tackling this project. I am so glad to say that I completed this project and created actionable insights. In this blog post I want to take the time to explain my findings. &lt;/p&gt;

&lt;h2&gt;
  
  
  Business Problem
&lt;/h2&gt;

&lt;p&gt;The problem at hand involves Microsoft deciding to create a new movie studio. Microsoft does not know anything about creating movies. Overall, Microsoft would like to findings on what films are currently doing the best at the box office. Then translate those findings into actionable insights that the head of Microsoft's new movie studio can use to help decide what type of films to create.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Business Understanding&lt;br&gt;
Microsoft wants to enter the movie production business however as a rookie in this business they need insight on audience opinions about characteristics about movies. Audience opinions impact ROI. In addition to learning about what an audience enjoys, Microsoft must also consider when to release their movies to get the most ROI.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Data
&lt;/h2&gt;

&lt;p&gt;The data is based on datasets from Box Office Mojo, IMDB, Rotten Tomatoes, TheMovieDB, and The Numbers. The Box Office Mojo dataset contains information about movie domestic gross and worldwide gross. The IMDB database contains information about movie production team, cast, basic information, and ratings. The Rotten Tomatoes dataset contains information about critic reviews along with there rating and if the movie was fresh or rotten. The TheMovieDB dataset contains information about a movies genre, vote average, vote count, and popularity score. The Numbers dataset contains information about a movies production budget, domestic gross, worldwide gross, and release date.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;TMDB has a unique attribute for movies known as the popularity score. &lt;/p&gt;

&lt;p&gt;The popularity score is the lifelong culmination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Number of votes for the day&lt;/li&gt;
&lt;li&gt;Number of views for the day&lt;/li&gt;
&lt;li&gt;Number of users who marked it as a 'favorite' for the day&lt;/li&gt;
&lt;li&gt;Release date&lt;/li&gt;
&lt;li&gt;Number of total votes&lt;/li&gt;
&lt;li&gt;Accounts for the previous days score&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was essential to consider this score from the TMDB dataset to truly factor in many factors calculated by the courtesy of TMDB. This score is a good representation of popularity over the movies lifetime since the release date. Taking this score into consideration we can determine which genres are the most popular by creating a visualization as shown below.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G4anm3Op--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pb0m2mz24x91nm47lzsp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G4anm3Op--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pb0m2mz24x91nm47lzsp.png" alt="Popularity Score Based on Genre" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sales are important in movie production as this will determine the Return of Investment (ROI). Considering a movies characteristics such as intended audience and its release date can impact its Box Office Sale. As we can see PG-13 movies and PG make the most Box Office Sales which can make the most ROI. Releasing a movie at a certain time of the year can impact the Box Office Sales as we can see below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PRF5Ewqk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqofkmvpack81i4kkr9y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PRF5Ewqk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqofkmvpack81i4kkr9y.png" alt="Sale Based on Appropriate Movie Audience" width="800" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZdEikl_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yb8hpnvc7furph3nitck.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZdEikl_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yb8hpnvc7furph3nitck.png" alt="Impact of Month on Box Office Revenue" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cbbm4Job--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vh83q9ov1zicreua7kpt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cbbm4Job--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vh83q9ov1zicreua7kpt.png" alt="Avg ROI Domestic" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G6CHDGDI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15sl1ox1fqjj33sr9p51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G6CHDGDI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15sl1ox1fqjj33sr9p51.png" alt="Avg ROI Worldwide" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This analysis has lead to three recommendations for Microsoft's new movie production studio:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Make movies with the following genres: Western, Romance, History, Animation, Family, Mystery, Thriller, Science Fiction, War, Crime, Fantasy, Action, Adventure.&lt;/strong&gt; These genres had a popularity score of 40 percent or higher which according to TMDB is considered good through excellent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make movies with the intended Audience of PG-13 and PG.&lt;/strong&gt; These intended audience ratings proved to have the higher box office sales in comparison to rated R and G movies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release movies in the summer time as well as the end of the year.&lt;/strong&gt; The time of the year matters when releasing movies. We can see this occur in the months of May, June, July, November, December and February.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Self Assessment
&lt;/h2&gt;

&lt;p&gt;This project has taught me the fundamentals of data analysis and data science. I learned so much about data cleaning and preparation. I am glad to say that I have learned about Pandas, SQLite3, Matplot.lib, Seaborn, JSON, and API which I utilized in this project.&lt;/p&gt;

&lt;p&gt;As great as this project is, there is always room for improvement. I wish I had time to merge the 'Box Office Mojo' data with the data from 'The Number'. These datasets contained similar information in regards to ROI. My code overall as of right now is very linear and not a plug and play file. The same charts can not developed if different datasets were used. If possible I would have liked to create multiple function that can clean the data for you so others can use the same functions as well. Not only would this look more professional but also make the code more readable. &lt;/p&gt;

&lt;p&gt;Feel free to check out my &lt;a href="https://github.com/cristopher-d-delgado/dsc-phase-1-project-v2-4.git"&gt;repository&lt;/a&gt; that contains all the exploratory analysis for this project  &lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Further analysis can provide additional insights for Microsoft and there new movie production studio. Other exploratory routes to take can be the following directions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explore the ROI based on director for the movie. Directors are important to any movie production as they will be the ones to organize and envision movie scenes and guide its production. The main goal is to pick the best director.&lt;/li&gt;
&lt;li&gt;Create a model where you can predict the best years to release movies. Eventually any movie studio will have to create an organized timeline for movie releases especially if sequels are made. Predicting a year to release movies can be crucial to obtain the most ROI.&lt;/li&gt;
&lt;li&gt;Merge Box Office Mojo data with The Number since they contain similar information and look at the domestic gross made on average throughout the year.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
