MOVIE SUCCESS IN RELATION TO ITS FILM DISTRIBUTION COMPANY#
Author: [Alexander Nguyen]
Course Project, UC Irvine, Math 10, S24
I would like to post my notebook on the course’s website. [Yes]
INTRODUCTION#
The movie industry is an extremely competitive environment, where production companies constantly aim to release movies that do well in the box-office while also pleasing audiences. These companies will pour hundreds of millions of dollars into these movies in hopes of achieving success. In the dataset I have chosen, I have a list of 7668 movies from 1986 to 2016. By analyzing the data, I hope to find if there are any correlations between the commercial and popularity success of a movie alongside it’s company. I also hope to look for any other correlations and create predictions based on these correlations.
EXPLORING THE DATA#
First, we load up the csv file through pandas and display the first 5 rows of the datatable
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('movies.csv.zip')
df.head()
name | rating | genre | year | released | score | votes | director | writer | star | country | budget | gross | company | runtime | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | The Shining | R | Drama | 1980 | June 13, 1980 (United States) | 8.4 | 927000.0 | Stanley Kubrick | Stephen King | Jack Nicholson | United Kingdom | 19000000.0 | 46998772.0 | Warner Bros. | 146.0 |
1 | The Blue Lagoon | R | Adventure | 1980 | July 2, 1980 (United States) | 5.8 | 65000.0 | Randal Kleiser | Henry De Vere Stacpoole | Brooke Shields | United States | 4500000.0 | 58853106.0 | Columbia Pictures | 104.0 |
2 | Star Wars: Episode V - The Empire Strikes Back | PG | Action | 1980 | June 20, 1980 (United States) | 8.7 | 1200000.0 | Irvin Kershner | Leigh Brackett | Mark Hamill | United States | 18000000.0 | 538375067.0 | Lucasfilm | 124.0 |
3 | Airplane! | PG | Comedy | 1980 | July 2, 1980 (United States) | 7.7 | 221000.0 | Jim Abrahams | Jim Abrahams | Robert Hays | United States | 3500000.0 | 83453539.0 | Paramount Pictures | 88.0 |
4 | Caddyshack | R | Comedy | 1980 | July 25, 1980 (United States) | 7.3 | 108000.0 | Harold Ramis | Brian Doyle-Murray | Chevy Chase | United States | 6000000.0 | 39846344.0 | Orion Pictures | 98.0 |
We want to drop unnecessary columns, which include the release date, director, writer, star, country, rating, runtime, and genre of the movie, as we mainly want to focus on how well the movie performed based on it’s budget, production company, etc.
df = df.drop(['released', 'director', 'writer', 'star', 'country', 'rating', 'runtime', 'genre'], axis=1)
df.head(5)
name | year | score | votes | budget | gross | company | |
---|---|---|---|---|---|---|---|
0 | The Shining | 1980 | 8.4 | 927000.0 | 19000000.0 | 46998772.0 | Warner Bros. |
1 | The Blue Lagoon | 1980 | 5.8 | 65000.0 | 4500000.0 | 58853106.0 | Columbia Pictures |
2 | Star Wars: Episode V - The Empire Strikes Back | 1980 | 8.7 | 1200000.0 | 18000000.0 | 538375067.0 | Lucasfilm |
3 | Airplane! | 1980 | 7.7 | 221000.0 | 3500000.0 | 83453539.0 | Paramount Pictures |
4 | Caddyshack | 1980 | 7.3 | 108000.0 | 6000000.0 | 39846344.0 | Orion Pictures |
print(f'Percentage of Missing Values in Budget Column: {(len(df[df['budget'].isnull()]) / 7668) * 100 :.2f}%')
print(f'Percentage of Missing Values in Gross Column: {(len(df[df['gross'].isnull()]) / 7668) * 100 :.2f}%')
print(f'Percentage of Missing Values in Score Column: {(len(df[df['score'].isnull()]) / 7668) * 100 :.2f}%')
print(f'Percentage of Missing Values in Votes Column: {(len(df[df['votes'].isnull()]) / 7668) * 100 :.2f}%')
Percentage of Missing Values in Budget Column: 28.31%
Percentage of Missing Values in Gross Column: 2.46%
Percentage of Missing Values in Score Column: 0.04%
Percentage of Missing Values in Votes Column: 0.04%
There are missing data values for most columns, but the columns that we will focus on that have missing values contain the score, votes, budget, and gross. Since the vote, score, and gross columns only have a small percentage of rows with missing values, we can easily drop them.
df_new = df
df_new.dropna(subset = ['score','votes','gross'], inplace=True)
Since 28.31% of the budget is missing, we need to use data imputation to replace the missing values. To figure out what measure of data we replace the missing data with, we have to display the budget data.
sns.boxplot(data=df_new, x="budget")
<Axes: xlabel='budget'>
We can see that there is a large number of outliers in the distribution of the budget for movies, so the best measure of spread would be the median. We can then impute the median of the budget into the missing values to fill them in.
# from sklearn.impute import SimpleImputer
budget_median = df_new['budget'].median()
print(f'Median : ${budget_median}')
# imputer = SimpleImputer(missing_values = np.nan, strategy = 'median')
# df['budget'] = imputer.fit(df['budget'])
df_new['budget'] = df_new['budget'].fillna(budget_median)
Median : $21000000.0
We want to analyze the major movie companies of this dataset, as we want to analyze major movies and compare the most well-known companies. I have decided to reduce the list to the top 5 companies, so that I can better analyze any correlation between the companies and features.
df_new['company'].value_counts().head(5)
company
Universal Pictures 376
Warner Bros. 333
Columbia Pictures 332
Paramount Pictures 319
Twentieth Century Fox 240
Name: count, dtype: int64
company = df_new['company'].value_counts()
top_5 = company.nlargest(5).index.tolist()
subset_company = df_new[df_new['company'].isin(top_5)]
subset_company['net gain/loss'] = subset_company.apply(lambda row: row['gross'] - row['budget'], axis=1)
subset_company = subset_company.reset_index(drop=True)
subset_company
/var/folders/lf/1gn2p5yn6m96gw3zn57nrkq80000gn/T/ipykernel_2457/3519137803.py:1: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
subset_company['net gain/loss'] = subset_company.apply(lambda row: row['gross'] - row['budget'], axis=1)
name | year | score | votes | budget | gross | company | net gain/loss | |
---|---|---|---|---|---|---|---|---|
0 | The Shining | 1980 | 8.4 | 927000.0 | 19000000.0 | 46998772.0 | Warner Bros. | 27998772.0 |
1 | The Blue Lagoon | 1980 | 5.8 | 65000.0 | 4500000.0 | 58853106.0 | Columbia Pictures | 54353106.0 |
2 | Airplane! | 1980 | 7.7 | 221000.0 | 3500000.0 | 83453539.0 | Paramount Pictures | 79953539.0 |
3 | Friday the 13th | 1980 | 6.4 | 123000.0 | 550000.0 | 39754601.0 | Paramount Pictures | 39204601.0 |
4 | The Blues Brothers | 1980 | 7.9 | 188000.0 | 27000000.0 | 115229890.0 | Universal Pictures | 88229890.0 |
... | ... | ... | ... | ... | ... | ... | ... | ... |
1595 | Tenet | 2020 | 7.4 | 387000.0 | 205000000.0 | 363656624.0 | Warner Bros. | 158656624.0 |
1596 | The Invisible Man | 2020 | 7.1 | 186000.0 | 7000000.0 | 143151000.0 | Universal Pictures | 136151000.0 |
1597 | Bad Boys for Life | 2020 | 6.6 | 140000.0 | 90000000.0 | 426505244.0 | Columbia Pictures | 336505244.0 |
1598 | Sonic the Hedgehog | 2020 | 6.5 | 102000.0 | 85000000.0 | 319715683.0 | Paramount Pictures | 234715683.0 |
1599 | Dolittle | 2020 | 5.6 | 53000.0 | 175000000.0 | 245487753.0 | Universal Pictures | 70487753.0 |
1600 rows × 8 columns
ANALYZING DATA#
We can begin by analyzing the data through displaying basic information about the data, searching for any patterns they may display.
subset_company.dtypes
name object
year int64
score float64
votes float64
budget float64
gross float64
company object
net gain/loss float64
dtype: object
subset_company.shape
(1600, 8)
Let’s first take a look at the score category. We can analyze the distribution of score and how it relates to the most popular film production companies.
subset_company['score'].describe()
count 1600.000000
mean 6.355375
std 0.916984
min 2.200000
25% 5.800000
50% 6.400000
75% 7.000000
max 9.000000
Name: score, dtype: float64
sns.displot(subset_company, x="score")
<seaborn.axisgrid.FacetGrid at 0x29305d520>
We see that there is a relatively normal distribution that’s slightly skewed left between the scores of movies, averaging from a score of 6-7.
sns.displot(subset_company, x="score", hue=subset_company['company'])
<seaborn.axisgrid.FacetGrid at 0x2918112b0>
We can now see the score distribution between the top 5 companies. Notably, Warner Bros. tends to have higher scores, Universal Pictures tends to be have average to higher scores, and Columbia Pictures tends to have average to lower scores.
ax = sns.scatterplot(data=subset_company, x='budget',y='gross')
Comparing the budget with the gross of movies from the top 5 production companies, we see that there are major outliers in gross that affect the visualization of the scatterplot. We can set a limit for the gross to get rid of some outliers, and get a better representation of the data
ax = sns.scatterplot(data=subset_company, x='budget',y='gross')
ax.set(ylim=(0,1000000000))
[(0.0, 1000000000.0)]
We can now see a better visualization of the budget vs gross, in which we see a slight positive correlation. We will further explore this correlation later on.
ax = sns.boxplot(subset_company, x='gross', y=subset_company['company'])
ax.set(xlabel='gross (in billions)')
[Text(0.5, 0, 'gross (in billions)')]
ax = sns.boxplot(subset_company, x='budget', y=subset_company['company'])
ax.set(xlabel='budget (by 100 million)')
[Text(0.5, 0, 'budget (by 100 million)')]
Looking at the boxplots for the top 5 companies alongside their budget and grossing, we can once again see that there are extreme outliers for both. This makes sense, as each movie production company has very few successful movies that reach such high grossing, and certain movies receive major budgets depending on the promise of the movie or projected grossing. However, we see that Warner Bros. has spent the most on movies in terms of budget, yet Twentieth Century Fox seems to have had the most commercially successful movies, revealing that even if the movie company spends a lot on budget, they may not receive the most success in the box-office.
corr = subset_company[["gross", "budget", "score", "votes", 'net gain/loss']].corr()
sns.heatmap(corr, annot=True)
<Axes: >
Using a heatmap, we now see the correlation between the different features we have in our dataset. Budget and gross have the strongest correlation, which helps prove our prediction that the more money you put into a movie, the better commercial success you receive. We also have a strong correlation between gross and votes, which also makes sense. As more people view a movie, the revenue of a movie increases.
MACHINE LEARNING#
After looking through the data and searching for patterns, we can attempt to make predictions based on the data. We can start with making predictions on the specific movie company based on the features “gross”, “budget”, “score”, and “votes”, to see if there are any differing featuristics between the top 5 movie companies we have chosen.
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import LogisticRegression
features = ['budget','gross','score','votes']
subset_company['company'] = subset_company['company'].replace({'Universal Pictures': 0, 'Warner Bros.': 1, 'Columbia Pictures': 2, 'Paramount Pictures' : 3, 'Twentieth Century Fox' : 4})
for feature in features:
lm = LinearRegression()
lm.fit(subset_company[[feature]], subset_company['company'])
score = lm.score(subset_company[[feature]], subset_company['company'])
print(f'{feature} R^2 Value: {score}')
budget R^2 Value: 0.00011393137092130523
gross R^2 Value: 5.438703912674647e-06
score R^2 Value: 0.003058345288662001
votes R^2 Value: 0.0003162757310316566
/var/folders/lf/1gn2p5yn6m96gw3zn57nrkq80000gn/T/ipykernel_2457/2064163978.py:2: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
subset_company['company'] = subset_company['company'].replace({'Universal Pictures': 0, 'Warner Bros.': 1, 'Columbia Pictures': 2, 'Paramount Pictures' : 3, 'Twentieth Century Fox' : 4})
I started with single variable linear regression, and fit each feature into a linear regression model to see which was the best predictor of the company, using the \(R^2\) value to determine how well the model was. Unfortunately, none of the features can predict the company as shown by the scores. This shows us that none of the top 5 companies stand out in terms of commercial or populairty success, which we were starting to see through the analyzation of the data earlier. Although there are no correlations between any of the features and the company, we did learn that there was a strong correlation between budget and gross, which can try further exploring through a linear regression.
lm = LinearRegression()
lm.fit(subset_company[['budget']], subset_company['gross'])
score = lm.score(subset_company[['budget']], subset_company['gross'])
print(f'R2 = {score}')
R2 = 0.46757209877600703
After fitting the model, we get an \(R^2\) value of .46, which is pretty weak, revealing that there isn’t a strong linear relationship between the budget and gross of a movie.
We can also take a look at the relationship between votes and net gain/loss, which we saw a slightly strong correlation in earlier. Logically, a movie’s votes and score will have an affect on the net gain/loss, as the more popular a movie is, the more people there will be to watch it, increasing box office. We can first try fitting it onto a linear regression, but this time validating the \(R^2\) value using 5-fold validation.
from sklearn.model_selection import cross_val_score, KFold
from sklearn.preprocessing import MinMaxScaler
features = ['votes']
X = subset_company[features]
y = subset_company['net gain/loss']
# Setup 5-fold cross-validation
kf = KFold(n_splits=5, shuffle=True, random_state=1)
# Perform cross-validation
r2_scores = cross_val_score(lm, X, y, cv=kf, scoring='r2')
# Calculate average and standard deviation of R-squared scores
average_r2 = np.mean(r2_scores)
std_r2 = np.std(r2_scores)
print(f'Average R-squared: {average_r2:.5f}')
print(f'Standard Deviation of R-squared: {std_r2:.5f}')
Average R-squared: 0.38664
Standard Deviation of R-squared: 0.09345
Again, we find a weak average \(R^2\) value between votes and net gain/loss. However, we can instead try and fit the data onto a logistic regression model using classification. First, I wanted to see all the titles that had a negative revenue.
titles = []
for i in range(len(subset_company['net gain/loss'])):
if subset_company.loc[i,'net gain/loss'] < 0:
titles.append(subset_company.loc[i,'name'])
print(len(titles))
432
We want to have two classes, whether a movie has a net gain or net loss in the box-office. I created a for-loop to create class 0, for when a movie has a net loss, and a class 1, if a movie has a positive net gain.
for i in range(len(subset_company['net gain/loss'])):
if subset_company.loc[i,'net gain/loss'] < 0:
subset_company.loc[i,'net gain/loss'] = 0
elif subset_company.loc[i,'net gain/loss'] > 0:
subset_company.loc[i,'net gain/loss'] = 1
subset_company
name | year | score | votes | budget | gross | company | net gain/loss | |
---|---|---|---|---|---|---|---|---|
0 | The Shining | 1980 | 8.4 | 927000.0 | 19000000.0 | 46998772.0 | 1 | 1.0 |
1 | The Blue Lagoon | 1980 | 5.8 | 65000.0 | 4500000.0 | 58853106.0 | 2 | 1.0 |
2 | Airplane! | 1980 | 7.7 | 221000.0 | 3500000.0 | 83453539.0 | 3 | 1.0 |
3 | Friday the 13th | 1980 | 6.4 | 123000.0 | 550000.0 | 39754601.0 | 3 | 1.0 |
4 | The Blues Brothers | 1980 | 7.9 | 188000.0 | 27000000.0 | 115229890.0 | 0 | 1.0 |
... | ... | ... | ... | ... | ... | ... | ... | ... |
1595 | Tenet | 2020 | 7.4 | 387000.0 | 205000000.0 | 363656624.0 | 1 | 1.0 |
1596 | The Invisible Man | 2020 | 7.1 | 186000.0 | 7000000.0 | 143151000.0 | 0 | 1.0 |
1597 | Bad Boys for Life | 2020 | 6.6 | 140000.0 | 90000000.0 | 426505244.0 | 2 | 1.0 |
1598 | Sonic the Hedgehog | 2020 | 6.5 | 102000.0 | 85000000.0 | 319715683.0 | 3 | 1.0 |
1599 | Dolittle | 2020 | 5.6 | 53000.0 | 175000000.0 | 245487753.0 | 0 | 1.0 |
1600 rows × 8 columns
I then scaled the features using a standard scaler, with a mean of 0 and standard deviation of 1. I then fit the data onto a logistic regression model.
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
features = ['votes']
subset_company[features] = scaler.fit_transform(subset_company[features])
from sklearn.linear_model import LogisticRegression
X = subset_company[features]
y = subset_company['net gain/loss']
clf = LogisticRegression(multi_class='multinomial', penalty=None)
clf.fit(X, y)
print(f'R^2 value: {clf.score(X, y)}')
R^2 value: 0.811875
After fitting the model, we get a stronger \(R^2\) value of 0.812, which reveals that with our model, we have a strong probability of predicting whether a movie will have a positive or negative revenue in the box-office based on how popular the movie is among viewers.
EXTRA#
For this portion, we will be using a different machine learning tool to create a model fitting votes to predict the net gain/loss. I downloaded the package TensorFlow, as it allows for efficient deep learning that’s quick and reproducible.
from sklearn.model_selection import train_test_split
First, we’re going to split our data into training and testing data, in order to have a data set dedicated towards training our model, and a set of data to test it on for accuracy.
X = X = subset_company[features]
y = subset_company['net gain/loss']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=.2)
import tensorflow as tf
import keras as keras
from sklearn.metrics import accuracy_score
From Tensorflow, we want to create a model using tf.keras.Sequential(), which will be our main model class that we fit our data onto. The Dense feature is a layer that allows us to build hidden layers within our model, which in this case is 2 hidden layers. The first hidden layer takes our raw data and passes it through a relu activation function, which takes our data and converts the output to a minimum of zero and an unlimited upward value. Our second hidden layer determines a true or false output, which in this case is whether a movie has a positive or negative net gain. We use the Sigmoid function to convert the value to 0 or 1, with 0 being that the movie had a negative gain and 1 being that the movie had a positive gain.
model = tf.keras.Sequential()
Dense = tf.keras.layers.Dense
model.add(Dense(units=32, activation='relu', input_dim=len(X_train.columns)))
model.add(Dense(units=64, activation='relu'))
model.add(Dense(units=1, activation='sigmoid'))
/Users/alexnguyen/anaconda3/envs/math9/lib/python3.12/site-packages/keras/src/layers/core/dense.py:87: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.
super().__init__(activity_regularizer=activity_regularizer, **kwargs)
We want to determine how well our fit is, so we want to know the binary cross entropy loss as well as the \(R^2\) value.
model.compile(loss='binary_crossentropy', optimizer='sgd', metrics=['accuracy'])
model.fit(X_train, y_train, epochs=500, batch_size=32)
Epoch 1/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 364us/step - accuracy: 0.6043 - loss: 0.6867
Epoch 2/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 364us/step - accuracy: 0.7258 - loss: 0.6465
Epoch 3/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 325us/step - accuracy: 0.7390 - loss: 0.6126
Epoch 4/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.7478 - loss: 0.5833
Epoch 5/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 280us/step - accuracy: 0.7269 - loss: 0.5764
Epoch 6/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.7455 - loss: 0.5560
Epoch 7/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.7368 - loss: 0.5490
Epoch 8/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.7449 - loss: 0.5331
Epoch 9/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.7216 - loss: 0.5420
Epoch 10/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.7161 - loss: 0.5373
Epoch 11/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.7310 - loss: 0.5223
Epoch 12/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.7408 - loss: 0.5146
Epoch 13/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.7254 - loss: 0.5131
Epoch 14/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.7397 - loss: 0.4971
Epoch 15/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.7287 - loss: 0.4989
Epoch 16/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 278us/step - accuracy: 0.7081 - loss: 0.5126
Epoch 17/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.7375 - loss: 0.4788
Epoch 18/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.7322 - loss: 0.4817
Epoch 19/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.7304 - loss: 0.4804
Epoch 20/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 320us/step - accuracy: 0.7118 - loss: 0.4940
Epoch 21/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 329us/step - accuracy: 0.7553 - loss: 0.4544
Epoch 22/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.7546 - loss: 0.4566
Epoch 23/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.7286 - loss: 0.4683
Epoch 24/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.7331 - loss: 0.4602
Epoch 25/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.7222 - loss: 0.4679
Epoch 26/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.7236 - loss: 0.4626
Epoch 27/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.7313 - loss: 0.4510
Epoch 28/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.7534 - loss: 0.4320
Epoch 29/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.7359 - loss: 0.4467
Epoch 30/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.7000 - loss: 0.4681
Epoch 31/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 339us/step - accuracy: 0.7290 - loss: 0.4496
Epoch 32/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 354us/step - accuracy: 0.7420 - loss: 0.4478
Epoch 33/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 329us/step - accuracy: 0.7282 - loss: 0.4290
Epoch 34/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 370us/step - accuracy: 0.7392 - loss: 0.4380
Epoch 35/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 399us/step - accuracy: 0.7621 - loss: 0.4323
Epoch 36/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 358us/step - accuracy: 0.7967 - loss: 0.4345
Epoch 37/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 462us/step - accuracy: 0.7913 - loss: 0.4234
Epoch 38/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 491us/step - accuracy: 0.7953 - loss: 0.4428
Epoch 39/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 423us/step - accuracy: 0.8095 - loss: 0.4180
Epoch 40/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 311us/step - accuracy: 0.8085 - loss: 0.4105
Epoch 41/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 896us/step - accuracy: 0.8119 - loss: 0.4181
Epoch 42/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 375us/step - accuracy: 0.7946 - loss: 0.4228
Epoch 43/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 337us/step - accuracy: 0.8015 - loss: 0.4352
Epoch 44/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 345us/step - accuracy: 0.8021 - loss: 0.4225
Epoch 45/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 395us/step - accuracy: 0.7972 - loss: 0.4337
Epoch 46/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 410us/step - accuracy: 0.7972 - loss: 0.4285
Epoch 47/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 349us/step - accuracy: 0.8047 - loss: 0.4098
Epoch 48/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 394us/step - accuracy: 0.7991 - loss: 0.4247
Epoch 49/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 368us/step - accuracy: 0.8174 - loss: 0.4171
Epoch 50/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.7978 - loss: 0.4312
Epoch 51/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 377us/step - accuracy: 0.8260 - loss: 0.4054
Epoch 52/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 356us/step - accuracy: 0.8136 - loss: 0.4062
Epoch 53/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 345us/step - accuracy: 0.8033 - loss: 0.4235
Epoch 54/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 354us/step - accuracy: 0.8181 - loss: 0.4177
Epoch 55/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 332us/step - accuracy: 0.8238 - loss: 0.4149
Epoch 56/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 374us/step - accuracy: 0.7962 - loss: 0.4248
Epoch 57/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 338us/step - accuracy: 0.7827 - loss: 0.4319
Epoch 58/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 332us/step - accuracy: 0.8059 - loss: 0.4217
Epoch 59/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 360us/step - accuracy: 0.8075 - loss: 0.4123
Epoch 60/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 331us/step - accuracy: 0.8099 - loss: 0.4135
Epoch 61/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.8163 - loss: 0.4016
Epoch 62/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8046 - loss: 0.4176
Epoch 63/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.8236 - loss: 0.3956
Epoch 64/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.7753 - loss: 0.4391
Epoch 65/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.8127 - loss: 0.4040
Epoch 66/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8155 - loss: 0.3969
Epoch 67/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.7985 - loss: 0.4285
Epoch 68/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8174 - loss: 0.4076
Epoch 69/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.7966 - loss: 0.4171
Epoch 70/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8145 - loss: 0.4152
Epoch 71/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.7889 - loss: 0.4238
Epoch 72/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8156 - loss: 0.4173
Epoch 73/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8074 - loss: 0.4279
Epoch 74/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 296us/step - accuracy: 0.8131 - loss: 0.4076
Epoch 75/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 307us/step - accuracy: 0.8144 - loss: 0.4122
Epoch 76/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.8094 - loss: 0.4030
Epoch 77/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8104 - loss: 0.4092
Epoch 78/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.8354 - loss: 0.3959
Epoch 79/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8166 - loss: 0.4151
Epoch 80/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.7984 - loss: 0.4371
Epoch 81/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 312us/step - accuracy: 0.7928 - loss: 0.4274
Epoch 82/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 289us/step - accuracy: 0.7929 - loss: 0.4389
Epoch 83/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8075 - loss: 0.4155
Epoch 84/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.8246 - loss: 0.3789
Epoch 85/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8113 - loss: 0.4031
Epoch 86/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 344us/step - accuracy: 0.8062 - loss: 0.4237
Epoch 87/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 285us/step - accuracy: 0.8243 - loss: 0.4075
Epoch 88/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.7996 - loss: 0.4437
Epoch 89/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.8093 - loss: 0.4096
Epoch 90/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.7928 - loss: 0.4303
Epoch 91/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8109 - loss: 0.4054
Epoch 92/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8239 - loss: 0.3882
Epoch 93/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8173 - loss: 0.4055
Epoch 94/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.8150 - loss: 0.3961
Epoch 95/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 288us/step - accuracy: 0.8102 - loss: 0.4116
Epoch 96/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 332us/step - accuracy: 0.7976 - loss: 0.4181
Epoch 97/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.8049 - loss: 0.4013
Epoch 98/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.8117 - loss: 0.4213
Epoch 99/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8079 - loss: 0.4066
Epoch 100/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.8076 - loss: 0.4260
Epoch 101/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 353us/step - accuracy: 0.8229 - loss: 0.3868
Epoch 102/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8194 - loss: 0.3921
Epoch 103/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.8122 - loss: 0.4052
Epoch 104/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 353us/step - accuracy: 0.8078 - loss: 0.3993
Epoch 105/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 377us/step - accuracy: 0.7982 - loss: 0.4348
Epoch 106/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 409us/step - accuracy: 0.8052 - loss: 0.3946
Epoch 107/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 359us/step - accuracy: 0.8027 - loss: 0.4198
Epoch 108/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.7809 - loss: 0.4348
Epoch 109/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 531us/step - accuracy: 0.8022 - loss: 0.4245
Epoch 110/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8031 - loss: 0.4022
Epoch 111/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 327us/step - accuracy: 0.7925 - loss: 0.4209
Epoch 112/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 334us/step - accuracy: 0.7967 - loss: 0.4155
Epoch 113/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 339us/step - accuracy: 0.8312 - loss: 0.3936
Epoch 114/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 356us/step - accuracy: 0.8061 - loss: 0.4132
Epoch 115/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 350us/step - accuracy: 0.8039 - loss: 0.4139
Epoch 116/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 377us/step - accuracy: 0.7990 - loss: 0.4273
Epoch 117/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 334us/step - accuracy: 0.7988 - loss: 0.4339
Epoch 118/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 381us/step - accuracy: 0.8089 - loss: 0.4101
Epoch 119/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 474us/step - accuracy: 0.7918 - loss: 0.4152
Epoch 120/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 359us/step - accuracy: 0.8005 - loss: 0.4271
Epoch 121/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 324us/step - accuracy: 0.8010 - loss: 0.4052
Epoch 122/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8085 - loss: 0.4029
Epoch 123/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 329us/step - accuracy: 0.8120 - loss: 0.4026
Epoch 124/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 349us/step - accuracy: 0.8126 - loss: 0.4145
Epoch 125/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.8118 - loss: 0.4151
Epoch 126/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.7974 - loss: 0.4114
Epoch 127/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8090 - loss: 0.4060
Epoch 128/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8160 - loss: 0.4193
Epoch 129/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8038 - loss: 0.4209
Epoch 130/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 288us/step - accuracy: 0.8007 - loss: 0.4073
Epoch 131/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.7978 - loss: 0.4190
Epoch 132/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8098 - loss: 0.4179
Epoch 133/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 325us/step - accuracy: 0.8057 - loss: 0.4174
Epoch 134/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 290us/step - accuracy: 0.8071 - loss: 0.4086
Epoch 135/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8066 - loss: 0.4081
Epoch 136/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8248 - loss: 0.3841
Epoch 137/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8273 - loss: 0.4016
Epoch 138/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8018 - loss: 0.4245
Epoch 139/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8251 - loss: 0.4060
Epoch 140/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.8088 - loss: 0.4109
Epoch 141/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8224 - loss: 0.3890
Epoch 142/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 330us/step - accuracy: 0.8186 - loss: 0.4066
Epoch 143/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8103 - loss: 0.4178
Epoch 144/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 311us/step - accuracy: 0.7878 - loss: 0.4287
Epoch 145/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.7902 - loss: 0.4304
Epoch 146/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8050 - loss: 0.4092
Epoch 147/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8228 - loss: 0.4028
Epoch 148/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8095 - loss: 0.4007
Epoch 149/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8045 - loss: 0.4073
Epoch 150/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.8030 - loss: 0.4147
Epoch 151/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8077 - loss: 0.4113
Epoch 152/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 405us/step - accuracy: 0.7973 - loss: 0.4097
Epoch 153/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8037 - loss: 0.4214
Epoch 154/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8173 - loss: 0.4003
Epoch 155/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 338us/step - accuracy: 0.8152 - loss: 0.3920
Epoch 156/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8226 - loss: 0.3949
Epoch 157/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 344us/step - accuracy: 0.8216 - loss: 0.3991
Epoch 158/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.8048 - loss: 0.4028
Epoch 159/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8017 - loss: 0.4179
Epoch 160/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8038 - loss: 0.4144
Epoch 161/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8115 - loss: 0.3974
Epoch 162/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8099 - loss: 0.4256
Epoch 163/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.7999 - loss: 0.4195
Epoch 164/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8060 - loss: 0.4293
Epoch 165/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8105 - loss: 0.4022
Epoch 166/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.7990 - loss: 0.4192
Epoch 167/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8067 - loss: 0.3969
Epoch 168/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8263 - loss: 0.4049
Epoch 169/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 296us/step - accuracy: 0.8281 - loss: 0.3977
Epoch 170/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8174 - loss: 0.4007
Epoch 171/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.8066 - loss: 0.4311
Epoch 172/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8301 - loss: 0.3868
Epoch 173/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8217 - loss: 0.4091
Epoch 174/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8223 - loss: 0.4101
Epoch 175/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8084 - loss: 0.4249
Epoch 176/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.8198 - loss: 0.3929
Epoch 177/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 307us/step - accuracy: 0.8035 - loss: 0.4157
Epoch 178/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.8171 - loss: 0.3939
Epoch 179/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 290us/step - accuracy: 0.8181 - loss: 0.3889
Epoch 180/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 294us/step - accuracy: 0.7959 - loss: 0.4203
Epoch 181/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8205 - loss: 0.4106
Epoch 182/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 291us/step - accuracy: 0.7965 - loss: 0.4188
Epoch 183/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8019 - loss: 0.4091
Epoch 184/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 371us/step - accuracy: 0.8002 - loss: 0.4357
Epoch 185/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8034 - loss: 0.4154
Epoch 186/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8163 - loss: 0.4077
Epoch 187/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8217 - loss: 0.4038
Epoch 188/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.7873 - loss: 0.4229
Epoch 189/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 296us/step - accuracy: 0.8047 - loss: 0.4069
Epoch 190/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8143 - loss: 0.4244
Epoch 191/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.7850 - loss: 0.4389
Epoch 192/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 290us/step - accuracy: 0.8241 - loss: 0.3963
Epoch 193/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 290us/step - accuracy: 0.8041 - loss: 0.4201
Epoch 194/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.7989 - loss: 0.4228
Epoch 195/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 294us/step - accuracy: 0.8379 - loss: 0.3889
Epoch 196/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8214 - loss: 0.3854
Epoch 197/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8176 - loss: 0.3940
Epoch 198/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 421us/step - accuracy: 0.8037 - loss: 0.4284
Epoch 199/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 508us/step - accuracy: 0.8048 - loss: 0.4135
Epoch 200/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 324us/step - accuracy: 0.8016 - loss: 0.4053
Epoch 201/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 356us/step - accuracy: 0.8118 - loss: 0.4169
Epoch 202/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 345us/step - accuracy: 0.8203 - loss: 0.3969
Epoch 203/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.7933 - loss: 0.4368
Epoch 204/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8285 - loss: 0.3801
Epoch 205/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 311us/step - accuracy: 0.8185 - loss: 0.4096
Epoch 206/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 293us/step - accuracy: 0.8077 - loss: 0.4186
Epoch 207/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 335us/step - accuracy: 0.8180 - loss: 0.4012
Epoch 208/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.8054 - loss: 0.4171
Epoch 209/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 330us/step - accuracy: 0.8260 - loss: 0.3872
Epoch 210/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8016 - loss: 0.4293
Epoch 211/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 291us/step - accuracy: 0.8030 - loss: 0.4086
Epoch 212/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8256 - loss: 0.3912
Epoch 213/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8107 - loss: 0.4149
Epoch 214/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8047 - loss: 0.4105
Epoch 215/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.7889 - loss: 0.4238
Epoch 216/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8131 - loss: 0.4053
Epoch 217/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 294us/step - accuracy: 0.8098 - loss: 0.4157
Epoch 218/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8234 - loss: 0.3920
Epoch 219/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8162 - loss: 0.4018
Epoch 220/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 286us/step - accuracy: 0.8003 - loss: 0.4252
Epoch 221/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.8035 - loss: 0.4141
Epoch 222/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 290us/step - accuracy: 0.8197 - loss: 0.3888
Epoch 223/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8325 - loss: 0.3919
Epoch 224/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8290 - loss: 0.3994
Epoch 225/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 291us/step - accuracy: 0.7981 - loss: 0.4125
Epoch 226/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8341 - loss: 0.3889
Epoch 227/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8127 - loss: 0.3957
Epoch 228/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8163 - loss: 0.4028
Epoch 229/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.7965 - loss: 0.4092
Epoch 230/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8295 - loss: 0.3871
Epoch 231/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8155 - loss: 0.3956
Epoch 232/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.8279 - loss: 0.3792
Epoch 233/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8222 - loss: 0.3946
Epoch 234/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8158 - loss: 0.3990
Epoch 235/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 289us/step - accuracy: 0.8033 - loss: 0.3893
Epoch 236/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8249 - loss: 0.3854
Epoch 237/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8064 - loss: 0.4085
Epoch 238/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8114 - loss: 0.4054
Epoch 239/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 338us/step - accuracy: 0.7938 - loss: 0.4180
Epoch 240/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 320us/step - accuracy: 0.8170 - loss: 0.3935
Epoch 241/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8098 - loss: 0.4099
Epoch 242/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 457us/step - accuracy: 0.8014 - loss: 0.4194
Epoch 243/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 338us/step - accuracy: 0.7884 - loss: 0.4236
Epoch 244/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8053 - loss: 0.4174
Epoch 245/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 379us/step - accuracy: 0.8229 - loss: 0.3829
Epoch 246/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 344us/step - accuracy: 0.8035 - loss: 0.4169
Epoch 247/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 325us/step - accuracy: 0.8043 - loss: 0.4277
Epoch 248/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 344us/step - accuracy: 0.8034 - loss: 0.4042
Epoch 249/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.7941 - loss: 0.4294
Epoch 250/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 288us/step - accuracy: 0.8052 - loss: 0.4083
Epoch 251/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.8214 - loss: 0.4146
Epoch 252/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 316us/step - accuracy: 0.8102 - loss: 0.4097
Epoch 253/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 332us/step - accuracy: 0.8128 - loss: 0.3995
Epoch 254/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.8023 - loss: 0.4086
Epoch 255/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 334us/step - accuracy: 0.8043 - loss: 0.4168
Epoch 256/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.7920 - loss: 0.4470
Epoch 257/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 355us/step - accuracy: 0.8173 - loss: 0.3811
Epoch 258/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8038 - loss: 0.4272
Epoch 259/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.7909 - loss: 0.4291
Epoch 260/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 930us/step - accuracy: 0.8069 - loss: 0.4140
Epoch 261/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 602us/step - accuracy: 0.8246 - loss: 0.3982
Epoch 262/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 296us/step - accuracy: 0.7822 - loss: 0.4277
Epoch 263/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.7971 - loss: 0.4310
Epoch 264/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.7943 - loss: 0.4301
Epoch 265/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8012 - loss: 0.4207
Epoch 266/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 286us/step - accuracy: 0.8067 - loss: 0.4072
Epoch 267/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.7934 - loss: 0.4099
Epoch 268/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.7783 - loss: 0.4396
Epoch 269/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 321us/step - accuracy: 0.8092 - loss: 0.4054
Epoch 270/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 381us/step - accuracy: 0.8188 - loss: 0.4025
Epoch 271/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.8067 - loss: 0.4237
Epoch 272/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8223 - loss: 0.4074
Epoch 273/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 312us/step - accuracy: 0.7781 - loss: 0.4411
Epoch 274/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 369us/step - accuracy: 0.8101 - loss: 0.3983
Epoch 275/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 362us/step - accuracy: 0.8116 - loss: 0.3873
Epoch 276/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.7933 - loss: 0.4333
Epoch 277/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 404us/step - accuracy: 0.7964 - loss: 0.4113
Epoch 278/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 379us/step - accuracy: 0.8052 - loss: 0.4239
Epoch 279/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 365us/step - accuracy: 0.8084 - loss: 0.4003
Epoch 280/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.8236 - loss: 0.3937
Epoch 281/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 341us/step - accuracy: 0.8048 - loss: 0.4118
Epoch 282/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.8083 - loss: 0.4083
Epoch 283/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8031 - loss: 0.4090
Epoch 284/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.8176 - loss: 0.3952
Epoch 285/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8313 - loss: 0.3855
Epoch 286/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8069 - loss: 0.4126
Epoch 287/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 290us/step - accuracy: 0.8086 - loss: 0.4139
Epoch 288/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8097 - loss: 0.4041
Epoch 289/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 294us/step - accuracy: 0.8067 - loss: 0.4053
Epoch 290/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 365us/step - accuracy: 0.8057 - loss: 0.4066
Epoch 291/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 269us/step - accuracy: 0.8273 - loss: 0.3879
Epoch 292/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8084 - loss: 0.4024
Epoch 293/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8044 - loss: 0.4213
Epoch 294/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 988us/step - accuracy: 0.7974 - loss: 0.4056
Epoch 295/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 384us/step - accuracy: 0.8192 - loss: 0.3893
Epoch 296/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.8063 - loss: 0.4122
Epoch 297/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8047 - loss: 0.4155
Epoch 298/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8130 - loss: 0.4021
Epoch 299/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.8162 - loss: 0.4029
Epoch 300/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.8088 - loss: 0.4012
Epoch 301/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.8030 - loss: 0.4064
Epoch 302/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 307us/step - accuracy: 0.8059 - loss: 0.4080
Epoch 303/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 342us/step - accuracy: 0.8266 - loss: 0.3878
Epoch 304/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8099 - loss: 0.4060
Epoch 305/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 337us/step - accuracy: 0.8066 - loss: 0.4071
Epoch 306/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 339us/step - accuracy: 0.8184 - loss: 0.3973
Epoch 307/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.8148 - loss: 0.4042
Epoch 308/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 312us/step - accuracy: 0.8019 - loss: 0.4051
Epoch 309/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 336us/step - accuracy: 0.8166 - loss: 0.3770
Epoch 310/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8096 - loss: 0.4210
Epoch 311/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 474us/step - accuracy: 0.8081 - loss: 0.4034
Epoch 312/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 399us/step - accuracy: 0.8284 - loss: 0.4067
Epoch 313/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.7880 - loss: 0.4165
Epoch 314/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 673us/step - accuracy: 0.8084 - loss: 0.3951
Epoch 315/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 702us/step - accuracy: 0.8076 - loss: 0.4101
Epoch 316/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 882us/step - accuracy: 0.8015 - loss: 0.4272
Epoch 317/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 711us/step - accuracy: 0.7905 - loss: 0.4219
Epoch 318/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 451us/step - accuracy: 0.8085 - loss: 0.3973
Epoch 319/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 425us/step - accuracy: 0.8075 - loss: 0.4020
Epoch 320/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 600us/step - accuracy: 0.8255 - loss: 0.3903
Epoch 321/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.7965 - loss: 0.4179
Epoch 322/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 548us/step - accuracy: 0.8061 - loss: 0.4220
Epoch 323/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8087 - loss: 0.4058
Epoch 324/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 316us/step - accuracy: 0.8262 - loss: 0.3933
Epoch 325/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 418us/step - accuracy: 0.8180 - loss: 0.4009
Epoch 326/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 360us/step - accuracy: 0.7865 - loss: 0.4278
Epoch 327/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 373us/step - accuracy: 0.8104 - loss: 0.4082
Epoch 328/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 355us/step - accuracy: 0.8294 - loss: 0.4028
Epoch 329/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 354us/step - accuracy: 0.8228 - loss: 0.3927
Epoch 330/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 365us/step - accuracy: 0.8035 - loss: 0.4129
Epoch 331/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.8221 - loss: 0.4002
Epoch 332/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8211 - loss: 0.4028
Epoch 333/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.7993 - loss: 0.4129
Epoch 334/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 807us/step - accuracy: 0.8121 - loss: 0.4145
Epoch 335/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8105 - loss: 0.4132
Epoch 336/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 445us/step - accuracy: 0.8036 - loss: 0.4154
Epoch 337/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 320us/step - accuracy: 0.8193 - loss: 0.4019
Epoch 338/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 592us/step - accuracy: 0.8158 - loss: 0.3840
Epoch 339/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 551us/step - accuracy: 0.8172 - loss: 0.3963
Epoch 340/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8133 - loss: 0.4012
Epoch 341/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 747us/step - accuracy: 0.8004 - loss: 0.4281
Epoch 342/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 404us/step - accuracy: 0.8065 - loss: 0.4119
Epoch 343/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 343us/step - accuracy: 0.8167 - loss: 0.3890
Epoch 344/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 311us/step - accuracy: 0.8264 - loss: 0.3803
Epoch 345/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8160 - loss: 0.3952
Epoch 346/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.8068 - loss: 0.4151
Epoch 347/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 655us/step - accuracy: 0.7916 - loss: 0.4282
Epoch 348/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8093 - loss: 0.4068
Epoch 349/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 358us/step - accuracy: 0.8147 - loss: 0.3965
Epoch 350/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8144 - loss: 0.4116
Epoch 351/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 373us/step - accuracy: 0.8098 - loss: 0.4248
Epoch 352/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 422us/step - accuracy: 0.8074 - loss: 0.4011
Epoch 353/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.8138 - loss: 0.3893
Epoch 354/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8147 - loss: 0.3992
Epoch 355/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8153 - loss: 0.4072
Epoch 356/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 337us/step - accuracy: 0.7988 - loss: 0.4298
Epoch 357/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 332us/step - accuracy: 0.8278 - loss: 0.3830
Epoch 358/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 346us/step - accuracy: 0.8003 - loss: 0.4114
Epoch 359/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.7993 - loss: 0.3998
Epoch 360/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.8049 - loss: 0.4075
Epoch 361/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 750us/step - accuracy: 0.8195 - loss: 0.3952
Epoch 362/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 353us/step - accuracy: 0.8088 - loss: 0.4127
Epoch 363/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 319us/step - accuracy: 0.8118 - loss: 0.4128
Epoch 364/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8006 - loss: 0.4081
Epoch 365/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8147 - loss: 0.3941
Epoch 366/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 279us/step - accuracy: 0.8003 - loss: 0.4175
Epoch 367/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8089 - loss: 0.3828
Epoch 368/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 528us/step - accuracy: 0.8112 - loss: 0.3950
Epoch 369/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 338us/step - accuracy: 0.8073 - loss: 0.4148
Epoch 370/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 518us/step - accuracy: 0.7954 - loss: 0.4047
Epoch 371/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 392us/step - accuracy: 0.8131 - loss: 0.3940
Epoch 372/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 395us/step - accuracy: 0.8075 - loss: 0.4046
Epoch 373/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 355us/step - accuracy: 0.8164 - loss: 0.3978
Epoch 374/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 379us/step - accuracy: 0.7992 - loss: 0.4254
Epoch 375/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 761us/step - accuracy: 0.8117 - loss: 0.4078
Epoch 376/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 348us/step - accuracy: 0.7971 - loss: 0.4344
Epoch 377/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.8277 - loss: 0.3985
Epoch 378/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 321us/step - accuracy: 0.8148 - loss: 0.4064
Epoch 379/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8129 - loss: 0.3993
Epoch 380/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 297us/step - accuracy: 0.7994 - loss: 0.4286
Epoch 381/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.8169 - loss: 0.4095
Epoch 382/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.7954 - loss: 0.4350
Epoch 383/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 324us/step - accuracy: 0.7998 - loss: 0.4024
Epoch 384/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 312us/step - accuracy: 0.8093 - loss: 0.3983
Epoch 385/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 347us/step - accuracy: 0.8012 - loss: 0.4239
Epoch 386/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.8105 - loss: 0.4091
Epoch 387/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8046 - loss: 0.4225
Epoch 388/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 336us/step - accuracy: 0.7902 - loss: 0.4137
Epoch 389/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 878us/step - accuracy: 0.8202 - loss: 0.3974
Epoch 390/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 340us/step - accuracy: 0.8158 - loss: 0.4011
Epoch 391/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.8213 - loss: 0.3818
Epoch 392/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 331us/step - accuracy: 0.8137 - loss: 0.4040
Epoch 393/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8002 - loss: 0.4159
Epoch 394/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 327us/step - accuracy: 0.8014 - loss: 0.4084
Epoch 395/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8188 - loss: 0.3975
Epoch 396/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 336us/step - accuracy: 0.8197 - loss: 0.3974
Epoch 397/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8051 - loss: 0.4011
Epoch 398/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 361us/step - accuracy: 0.8324 - loss: 0.4015
Epoch 399/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 410us/step - accuracy: 0.8050 - loss: 0.4125
Epoch 400/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 362us/step - accuracy: 0.8001 - loss: 0.4164
Epoch 401/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.8251 - loss: 0.3884
Epoch 402/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8164 - loss: 0.4053
Epoch 403/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 383us/step - accuracy: 0.8080 - loss: 0.3963
Epoch 404/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.7979 - loss: 0.4200
Epoch 405/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 403us/step - accuracy: 0.8141 - loss: 0.4059
Epoch 406/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8294 - loss: 0.3942
Epoch 407/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 460us/step - accuracy: 0.8146 - loss: 0.4027
Epoch 408/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 354us/step - accuracy: 0.7897 - loss: 0.4178
Epoch 409/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.8110 - loss: 0.4185
Epoch 410/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 321us/step - accuracy: 0.7970 - loss: 0.4188
Epoch 411/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 384us/step - accuracy: 0.8149 - loss: 0.3989
Epoch 412/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8121 - loss: 0.4069
Epoch 413/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 322us/step - accuracy: 0.8149 - loss: 0.4072
Epoch 414/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 276us/step - accuracy: 0.8036 - loss: 0.4122
Epoch 415/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 283us/step - accuracy: 0.8136 - loss: 0.3821
Epoch 416/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8134 - loss: 0.3947
Epoch 417/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 330us/step - accuracy: 0.8103 - loss: 0.3916
Epoch 418/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.7996 - loss: 0.4300
Epoch 419/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 752us/step - accuracy: 0.8076 - loss: 0.4177
Epoch 420/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 348us/step - accuracy: 0.7799 - loss: 0.4525
Epoch 421/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 347us/step - accuracy: 0.8073 - loss: 0.4171
Epoch 422/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 311us/step - accuracy: 0.8097 - loss: 0.3879
Epoch 423/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 330us/step - accuracy: 0.8074 - loss: 0.4190
Epoch 424/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 304us/step - accuracy: 0.8204 - loss: 0.3781
Epoch 425/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 314us/step - accuracy: 0.8136 - loss: 0.4079
Epoch 426/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 431us/step - accuracy: 0.7959 - loss: 0.4224
Epoch 427/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 382us/step - accuracy: 0.8060 - loss: 0.4036
Epoch 428/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 411us/step - accuracy: 0.8074 - loss: 0.3994
Epoch 429/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8106 - loss: 0.4004
Epoch 430/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 600us/step - accuracy: 0.7967 - loss: 0.4236
Epoch 431/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 337us/step - accuracy: 0.8129 - loss: 0.3896
Epoch 432/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.8051 - loss: 0.4168
Epoch 433/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8159 - loss: 0.4010
Epoch 434/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 307us/step - accuracy: 0.8008 - loss: 0.4127
Epoch 435/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8052 - loss: 0.4089
Epoch 436/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8103 - loss: 0.4110
Epoch 437/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 312us/step - accuracy: 0.8062 - loss: 0.3970
Epoch 438/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8182 - loss: 0.3976
Epoch 439/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8043 - loss: 0.4063
Epoch 440/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.7952 - loss: 0.4214
Epoch 441/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 316us/step - accuracy: 0.8152 - loss: 0.4029
Epoch 442/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8114 - loss: 0.3978
Epoch 443/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.8022 - loss: 0.4034
Epoch 444/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8204 - loss: 0.4054
Epoch 445/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 793us/step - accuracy: 0.8180 - loss: 0.3892
Epoch 446/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8097 - loss: 0.4112
Epoch 447/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 311us/step - accuracy: 0.8215 - loss: 0.3847
Epoch 448/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.8242 - loss: 0.3936
Epoch 449/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 323us/step - accuracy: 0.8039 - loss: 0.4128
Epoch 450/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8022 - loss: 0.4142
Epoch 451/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 292us/step - accuracy: 0.8030 - loss: 0.3975
Epoch 452/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8084 - loss: 0.4043
Epoch 453/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.8100 - loss: 0.3987
Epoch 454/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.8030 - loss: 0.4026
Epoch 455/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 342us/step - accuracy: 0.8089 - loss: 0.4082
Epoch 456/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 331us/step - accuracy: 0.8112 - loss: 0.4082
Epoch 457/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 478us/step - accuracy: 0.8091 - loss: 0.4087
Epoch 458/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - accuracy: 0.8041 - loss: 0.4062
Epoch 459/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 341us/step - accuracy: 0.8182 - loss: 0.3967
Epoch 460/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 306us/step - accuracy: 0.7991 - loss: 0.4122
Epoch 461/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 315us/step - accuracy: 0.7962 - loss: 0.4213
Epoch 462/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 333us/step - accuracy: 0.8281 - loss: 0.3757
Epoch 463/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 342us/step - accuracy: 0.8114 - loss: 0.4117
Epoch 464/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 313us/step - accuracy: 0.8051 - loss: 0.4091
Epoch 465/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 329us/step - accuracy: 0.8098 - loss: 0.3956
Epoch 466/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 317us/step - accuracy: 0.8069 - loss: 0.4126
Epoch 467/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 364us/step - accuracy: 0.7999 - loss: 0.4204
Epoch 468/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8007 - loss: 0.4206
Epoch 469/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 295us/step - accuracy: 0.8143 - loss: 0.3951
Epoch 470/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 356us/step - accuracy: 0.7925 - loss: 0.4247
Epoch 471/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 374us/step - accuracy: 0.8102 - loss: 0.4016
Epoch 472/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.7988 - loss: 0.4289
Epoch 473/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 308us/step - accuracy: 0.8030 - loss: 0.4158
Epoch 474/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.8099 - loss: 0.4082
Epoch 475/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8066 - loss: 0.3986
Epoch 476/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.7975 - loss: 0.4179
Epoch 477/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 301us/step - accuracy: 0.8086 - loss: 0.4088
Epoch 478/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 307us/step - accuracy: 0.7984 - loss: 0.4177
Epoch 479/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 299us/step - accuracy: 0.8323 - loss: 0.3819
Epoch 480/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8127 - loss: 0.3947
Epoch 481/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8187 - loss: 0.3974
Epoch 482/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.8066 - loss: 0.4038
Epoch 483/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 310us/step - accuracy: 0.8097 - loss: 0.4053
Epoch 484/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 305us/step - accuracy: 0.8122 - loss: 0.4081
Epoch 485/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 302us/step - accuracy: 0.7986 - loss: 0.4075
Epoch 486/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 298us/step - accuracy: 0.7991 - loss: 0.4202
Epoch 487/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 303us/step - accuracy: 0.8116 - loss: 0.4045
Epoch 488/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - accuracy: 0.8124 - loss: 0.3998
Epoch 489/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 300us/step - accuracy: 0.8022 - loss: 0.4135
Epoch 490/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 318us/step - accuracy: 0.8169 - loss: 0.3919
Epoch 491/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 336us/step - accuracy: 0.8039 - loss: 0.4028
Epoch 492/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 351us/step - accuracy: 0.8102 - loss: 0.3905
Epoch 493/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 350us/step - accuracy: 0.8042 - loss: 0.4159
Epoch 494/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 540us/step - accuracy: 0.8213 - loss: 0.3943
Epoch 495/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 387us/step - accuracy: 0.7956 - loss: 0.4092
Epoch 496/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 367us/step - accuracy: 0.8132 - loss: 0.4040
Epoch 497/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 326us/step - accuracy: 0.8099 - loss: 0.3987
Epoch 498/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 328us/step - accuracy: 0.8220 - loss: 0.3948
Epoch 499/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 309us/step - accuracy: 0.8048 - loss: 0.4176
Epoch 500/500
40/40 ━━━━━━━━━━━━━━━━━━━━ 0s 977us/step - accuracy: 0.8064 - loss: 0.4034
<keras.src.callbacks.history.History at 0x2943114f0>
y_hat = model.predict(X_test)
y_hat = [0 if x <0.5 else 1 for x in y_hat]
accuracy_score(y_test,y_hat)
10/10 ━━━━━━━━━━━━━━━━━━━━ 0s 452us/step
0.815625
After training our model for different periods of time, I’ve found that the \(R^2\) value of the model is around the same compared to our logistic regression model. However, this model is much nicer to use as it allows us to determine how long we want to train our model for, while also allowing us to save the model and reproduce it for later use.
SUMMARY#
After exploring the dataset of movie info and using analysis methods such as linear regression and classification, I was able to come up with results both expected and unexpected.
My initial attempt to find a correlation between votes, score, gross, and budget in relation to a company was unsuccessful. Using a linear regression to fit the features produced extremely low accuracy . With this, I found out that between the 5 most frequent companies in my dataset, the relation between the individual features and individual companies were not significant, such that no company performed noticably better or worse within one of the features. We can conclude that the companies in question are all similar competitors against each other, with no company being extremely differentiable from the rest.
I then explored another correlation between the budget and gross of a movie, fitting the budget onto a linear regression model to predict the gross. Once again, it produced a weak accuracy score, revealing that the amount of budget does not always determine how much a movie will make.
However, when exploring the relation between votes and the net gain/loss of revenue for a movie, I found a good correlation. Although a linear regression model including validation with KNN produced a low average \(R^2\) value, fitting the data onto a logistic regression gave a strong accuracy score, using binary classification. My two classes consisted of either a positive or negative net revenue for the movie, and we were able to get around 0.8 for the \(R^2\) value, which is strong. We were also able to get a similar score using Tensorflow. This correlation makes sense, as the more people watch a movie, the more revenue a movie will gross.
REFERENCES#
Source of Dataset: https://www.kaggle.com/datasets/danielgrijalvas/movies?resource=download
Tutorial for Tensorflow: https://www.youtube.com/watch?v=6_2hzRopPbQ&ab_channel=NicholasRenotte