{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "ZBiNdra-AOT2" }, "source": [ "# Import Library" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "id": "taECrFNE9yxz" }, "outputs": [], "source": [ "# Import necessary libraries\n", "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.preprocessing import StandardScaler\n", "from sklearn.linear_model import LinearRegression, Ridge, Lasso\n", "from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor\n", "from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score\n", "import warnings\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "markdown", "metadata": { "id": "9MK_JVsjBjM-" }, "source": [ "# Import Dataset" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 679 }, "id": "XJVoE7SgBlDG", "outputId": "0974b5a2-c0fe-469c-99a1-9b691153c687" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Dataset shape: (500, 16)\n", "\n", "First 5 rows:\n" ] }, { "data": { "text/html": [ "
\n", " | image_id | \n", "user_id | \n", "prompt | \n", "likes | \n", "shares | \n", "comments | \n", "platform | \n", "generation_time | \n", "gpu_usage | \n", "file_size_kb | \n", "resolution | \n", "style_accuracy_score | \n", "is_hand_edited | \n", "ethical_concerns_flag | \n", "creation_date | \n", "top_comment | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "77ce5c72-eb45-4651-bcb1-c0677c0fceaf | \n", "6a7adf3d | \n", "Studio Ghibli-inspired ocean with giant fish | \n", "916 | \n", "410 | \n", "555 | \n", "4.80 | \n", "49 | \n", "1684 | \n", "1024x1024 | \n", "89 | \n", "Yes | \n", "Yes | \n", "2025-03-11 | \n", "So nostalgic, feels like childhood memories. 🎥... | \n", "|
1 | \n", "7d66c67f-0d11-4ef9-895c-d865ef11fe40 | \n", "523b8706 | \n", "Ghibli-style village at sunset | \n", "2965 | \n", "1361 | \n", "417 | \n", "11.11 | \n", "81 | \n", "2808 | \n", "1024x1024 | \n", "92 | \n", "Yes | \n", "No | \n", "2025-03-11 | \n", "Absolutely stunning! Love the details. 🎨 #5729 | \n", "|
2 | \n", "d7978afd-3932-4cce-9a21-5f9bf2bc1f64 | \n", "0e02592a | \n", "A lone traveler exploring an enchanted ruin | \n", "4727 | \n", "655 | \n", "785 | \n", "5.56 | \n", "41 | \n", "1800 | \n", "2048x2048 | \n", "61 | \n", "No | \n", "No | \n", "2025-03-06 | \n", "Is this AI or hand-painted? Incredible! #8001 | \n", "|
3 | \n", "cb34636a-a15c-4b15-999c-759dbb8896fe | \n", "9ed78a42 | \n", "Spirited Away-style bustling market street | \n", "1629 | \n", "1954 | \n", "212 | \n", "TikTok | \n", "12.45 | \n", "88 | \n", "479 | \n", "2048x2048 | \n", "76 | \n", "No | \n", "No | \n", "2025-03-23 | \n", "Is this AI or hand-painted? Incredible! #5620 | \n", "
4 | \n", "7511fbb8-db05-4584-a3a4-e8bb525ed58b | \n", "69ec8f02 | \n", "Magical Ghibli forest with floating lanterns | \n", "2573 | \n", "1281 | \n", "913 | \n", "TikTok | \n", "4.80 | \n", "64 | \n", "1789 | \n", "512x512 | \n", "58 | \n", "No | \n", "Yes | \n", "2025-03-06 | \n", "This looks straight out of a Ghibli movie! 🌟 #... | \n", "