{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## LabDS03 ##\n", "\n", "\n", "Suppose you have two datasets with information about movies played in theatres in Portugal (https://github.com/masterfloss/datamovies/raw/main/moviesPT3.xlsx) and ratings of movies obtained from IMDB (https://github.com/masterfloss/datamovies/raw/main/movies_ratings.tsv).\n", "\n", "Create a model and assess it. Try to have the best accuracy.\n", "\n", " 1. Business Undertanding \n", " 2. Data understanding. Correlation data. Import data and merge two dataframes \n", " 3. Data Preparation. Clean data. \n", " 4. Modelling/ model assessment\n", " 5. Results Evaluation\n", " 6. Deployment" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import seaborn as sn \n", "import matplotlib.pyplot as plt \n", "corrMatrix = XY.corr() \n", "sn.heatmap(corrMatrix, annot=True) \n", "plt.show() " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import statsmodels.api as sm\n", "model = sm.OLS(Y, Xfeatures)\n", "result = model.fit()\n", "result.summary()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.12" } }, "nbformat": 4, "nbformat_minor": 2 }