<jupyter_start><jupyter_text>Artist Data Classification<jupyter_code>artist_data = pd.read_csv('Artist_Data_PCA.csv')
artist_data.shape
artist_data.head()
artist_data.columns
artist_data['target'].value_counts()
artist_data = artist_data.drop(['Unnamed: 0'], 1)
artist_data.head()
def train_test_split_func(data, target_data, test_size = 0.2, random_state = 42):
    train_data, test_data = train_test_split(data, 
                                             test_size = test_size, 
                                             random_state = random_state, 
                                             stratify = target_data)
    return train_data, test_data
def display_metrics(model_name, language, class_type, tuning, model_instance, x_test, y_test):
    print("%s Classifier Model - %s %s : %s Hyper-parameter Tuning" % (model_name, language, class_type, tuning))
    print("Accuracy Score  : ", accuracy_score(y_pred = model_instance.predict(x_test), y_true = y_test))
    print("Precision Score : ", precision_score(y_pred = model_instance.predict(x_test), y_true = y_test, average = 'weighted'))
    print("Recall Score    : ", recall_score(y_pred = model_instance.predict(x_test), y_true = y_test, average = 'weighted'))
    print("F1 Score        : ", f1_score(y_pred = model_instance.predict(x_test), y_true = y_test, average = 'weighted'))
def confusion_matrix_plot(model, x_test, y_test):

    fig, ax = plt.subplots(figsize=(10, 10))
#     fig, ax = plt.subplots()
    plt.rcParams.update({'font.size': 16})
    metrics.plot_confusion_matrix(model, x_test, y_test, ax = ax, cmap = 'Oranges')
    ax.grid(False)

    label_font = {'size':'18'}
    ax.set_xlabel('\nPredicted labels', fontdict = label_font)
    ax.set_ylabel('Observed labels\n', fontdict = label_font)

    title_font = {'size':'21'}
    ax.set_title('Confusion Matrix\n', fontdict = title_font)

    plt.xticks(fontsize=10, rotation=90)
    plt.yticks(fontsize=10, rotation=0)
    plt.show()<jupyter_output><empty_output><jupyter_text>Language Specific Artist Data Classifiaction  English Artists<jupyter_code>artist_data_english = artist_data[artist_data['target'].isin(['English_<NAME>',
                                                              'English_Drake',
                                                              'English_<NAME>',
                                                              'English_<NAME>',
                                                              'English_The Weeknd'])]

artist_data_english['target'].value_counts()
train_data_english_artist, test_data_english_artist = train_test_split_func(artist_data_english, artist_data_english['target'], 0.2, 42)
x_train_english_artist = train_data_english_artist.drop(['target'], 1).copy()
x_test_english_artist  = test_data_english_artist.drop(['target'], 1).copy()

y_train_english_artist = train_data_english_artist['target'].copy()
y_test_english_artist  = test_data_english_artist['target'].copy()<jupyter_output><empty_output><jupyter_text>Telugu Artists<jupyter_code>artist_data_telugu  = artist_data[artist_data['target'].isin(['Telugu_geetha',
                                                              'Telugu_armaan',
                                                              'Telugu_anurag',
                                                              'Telugu_sidsriram'])]

artist_data_telugu['target'].value_counts()
train_data_telugu_artist, test_data_telugu_artist = train_test_split_func(artist_data_telugu, artist_data_telugu['target'], 0.2, 42)
x_train_telugu_artist = train_data_telugu_artist.drop(['target'], 1).copy()
x_test_telugu_artist  = test_data_telugu_artist.drop(['target'], 1).copy()

y_train_telugu_artist = train_data_telugu_artist['target'].copy()
y_test_telugu_artist  = test_data_telugu_artist['target'].copy()<jupyter_output><empty_output><jupyter_text>Hindi Artists<jupyter_code>artist_data_hindi   = artist_data[artist_data['target'].isin(['Hindi_sonunigam',
                                                              'Hindi_arijit',
                                                              'Hindi_atifaslam'])]

artist_data_hindi['target'].value_counts()
train_data_hindi_artist, test_data_hindi_artist = train_test_split_func(artist_data_hindi, artist_data_hindi['target'], 0.2, 42)
x_train_hindi_artist = train_data_hindi_artist.drop(['target'], 1).copy()
x_test_hindi_artist  = test_data_hindi_artist.drop(['target'], 1).copy()

y_train_hindi_artist = train_data_hindi_artist['target'].copy()
y_test_hindi_artist  = test_data_hindi_artist['target'].copy()<jupyter_output><empty_output><jupyter_text>All language Artists together<jupyter_code>train_data_all_artists, test_data_all_artists = train_test_split_func(artist_data, artist_data['target'], 0.2, 42)
x_train_all_artists = train_data_all_artists.drop(['target'], 1).copy()
x_test_all_artists  = test_data_all_artists.drop(['target'], 1).copy()

y_train_all_artists = train_data_all_artists['target'].copy()
y_test_all_artists  = test_data_all_artists['target'].copy()<jupyter_output><empty_output><jupyter_text>Genre Data Classification<jupyter_code>genre_data = pd.read_csv('Genre_Data_PCA.csv')
genre_data.shape
genre_data.head()
genre_data.columns
genre_data['target'].value_counts()
genre_data = genre_data.drop(['Unnamed: 0'], 1)
genre_data.head()<jupyter_output><empty_output><jupyter_text>English Genre<jupyter_code>genre_data_english = genre_data[genre_data['target'].isin(['English_Rock',
                                                           'English_Romantic',
                                                           'English_Workout',
                                                           'English_HipHopParty'])]

genre_data_english['target'].value_counts()
train_data_english_genre, test_data_english_genre = train_test_split_func(genre_data_english, genre_data_english['target'], 0.2, 42)
x_train_english_genre = train_data_english_genre.drop(['target'], 1).copy()
x_test_english_genre  = test_data_english_genre.drop(['target'], 1).copy()

y_train_english_genre = train_data_english_genre['target'].copy()
y_test_english_genre  = test_data_english_genre['target'].copy()<jupyter_output><empty_output><jupyter_text>Telugu Genre<jupyter_code>genre_data_telugu = genre_data[genre_data['target'].isin(['Telugu_rock',
                                                          'Telugu_romantic',
                                                          'Telugu_workout'])]

genre_data_telugu['target'].value_counts()
train_data_telugu_genre, test_data_telugu_genre = train_test_split_func(genre_data_telugu, genre_data_telugu['target'], 0.2, 42)
x_train_telugu_genre = train_data_telugu_genre.drop(['target'], 1).copy()
x_test_telugu_genre  = test_data_telugu_genre.drop(['target'], 1).copy()

y_train_telugu_genre = train_data_telugu_genre['target'].copy()
y_test_telugu_genre  = test_data_telugu_genre['target'].copy()<jupyter_output><empty_output><jupyter_text>Hindi Genre<jupyter_code>genre_data_hindi = genre_data[genre_data['target'].isin(['Hindi_rock',
                                                         'Hindi_romantic',
                                                         'Hindi_workout'])]

genre_data_hindi['target'].value_counts()
train_data_hindi_genre, test_data_hindi_genre = train_test_split_func(genre_data_hindi, genre_data_hindi['target'], 0.2, 42)
x_train_hindi_genre = train_data_hindi_genre.drop(['target'], 1).copy()
x_test_hindi_genre  = test_data_hindi_genre.drop(['target'], 1).copy()

y_train_hindi_genre = train_data_hindi_genre['target'].copy()
y_test_hindi_genre  = test_data_hindi_genre['target'].copy()<jupyter_output><empty_output><jupyter_text>All language genres together<jupyter_code>train_data_all_genres, test_data_all_genres = train_test_split_func(genre_data, genre_data['target'], 0.2, 42)
x_train_all_genres = train_data_all_genres.drop(['target'], 1).copy()
x_test_all_genres  = test_data_all_genres.drop(['target'], 1).copy()

y_train_all_genres = train_data_all_genres['target'].copy()
y_test_all_genres  = test_data_all_genres['target'].copy()<jupyter_output><empty_output><jupyter_text>Neural Networks<jupyter_code>cnn_model = Sequential([Dense(100, input_dim = np.shape(x_train_hindi_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
np.shape(x_train_hindi_genre)
# np.shape(y_train_hindi_genre)
np.shape(y1)
from sklearn.preprocessing import OneHotEncoder, LabelEncoder, OrdinalEncoder
y1 = y_train_hindi_genre.values.reshape((len(y_train_hindi_genre)), 1)
y2 = y_test_hindi_genre.values.reshape((len(y_test_hindi_genre)), 1)
ohe = OneHotEncoder(sparse = False)
ohe.fit(y1)
y_train_ohe = ohe.transform(y1)
y_test_ohe = ohe.transform(y2)
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_hindi_genre)
y_train_le = to_categorical(y_train_le)
y_train_le.shape, x_train_hindi_genre.shape
import scipy
cnn_model.fit(x_train_hindi_genre, y_train_le, epochs = 10, batch_size = 32)
x_train_hindi_genre.head()<jupyter_output><empty_output><jupyter_text>English Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_english_artist)[1]),
                        Activation('relu'),
                        Dense(5),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_english_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_english_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_english_artist, y_train_le, epochs = 6, batch_size = 32, validation_data=(x_test_english_artist, y_test_le))<jupyter_output>Epoch 1/6
172/172 [==============================] - 1s 3ms/step - loss: 0.0221 - accuracy: 0.9984 - val_loss: 0.7003 - val_accuracy: 0.8427
Epoch 2/6
172/172 [==============================] - 0s 3ms/step - loss: 0.0220 - accuracy: 0.9980 - val_loss: 0.7225 - val_accuracy: 0.8441
Epoch 3/6
172/172 [==============================] - 1s 3ms/step - loss: 0.0193 - accuracy: 0.9989 - val_loss: 0.7262 - val_accuracy: 0.8405
Epoch 4/6
172/172 [==============================] - 0s 3ms/step - loss: 0.0182 - accuracy: 0.9985 - val_loss: 0.7246 - val_accuracy: 0.8420
Epoch 5/6
172/172 [==============================] - 1s 3ms/step - loss: 0.0194 - accuracy: 0.9982 - val_loss: 0.7433 - val_accuracy: 0.8485
Epoch 6/6
172/172 [==============================] - 1s 4ms/step - loss: 0.0175 - accuracy: 0.9987 - val_loss: 0.7423 - val_accuracy: 0.8492<jupyter_text>Telugu Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_telugu_artist)[1]),
                        Activation('relu'),
                        Dense(4),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_telugu_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_telugu_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_telugu_artist, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_telugu_artist, y_test_le))<jupyter_output>Epoch 1/10
68/68 [==============================] - 2s 26ms/step - loss: 0.3335 - accuracy: 0.9051 - val_loss: 0.6841 - val_accuracy: 0.7463
Epoch 2/10
68/68 [==============================] - 1s 21ms/step - loss: 0.3073 - accuracy: 0.9167 - val_loss: 0.6794 - val_accuracy: 0.7463
Epoch 3/10
68/68 [==============================] - 1s 15ms/step - loss: 0.2841 - accuracy: 0.9292 - val_loss: 0.6752 - val_accuracy: 0.7593
Epoch 4/10
68/68 [==============================] - 1s 11ms/step - loss: 0.2635 - accuracy: 0.9315 - val_loss: 0.6720 - val_accuracy: 0.7500
Epoch 5/10
68/68 [==============================] - 1s 12ms/step - loss: 0.2430 - accuracy: 0.9394 - val_loss: 0.6665 - val_accuracy: 0.7500
Epoch 6/10
68/68 [==============================] - 1s 12ms/step - loss: 0.2229 - accuracy: 0.9491 - val_loss: 0.6568 - val_accuracy: 0.7611
Epoch 7/10
68/68 [==============================] - 1s 10ms/step - loss: 0.2036 - accuracy: 0.9583 - val_loss: 0.6642 - val_accuracy: 0.7630
Epoch 8/10
68[...]<jupyter_text>Hindi Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_hindi_artist)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_hindi_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_hindi_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_hindi_artist, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_hindi_artist, y_test_le))<jupyter_output>Epoch 1/10
89/89 [==============================] - 0s 4ms/step - loss: 0.2478 - accuracy: 0.9254 - val_loss: 0.4418 - val_accuracy: 0.8186
Epoch 2/10
89/89 [==============================] - 0s 4ms/step - loss: 0.2275 - accuracy: 0.9335 - val_loss: 0.4401 - val_accuracy: 0.8298
Epoch 3/10
89/89 [==============================] - 0s 4ms/step - loss: 0.2078 - accuracy: 0.9423 - val_loss: 0.4346 - val_accuracy: 0.8172
Epoch 4/10
89/89 [==============================] - 0s 3ms/step - loss: 0.1914 - accuracy: 0.9497 - val_loss: 0.4433 - val_accuracy: 0.8284
Epoch 5/10
89/89 [==============================] - 0s 3ms/step - loss: 0.1765 - accuracy: 0.9567 - val_loss: 0.4258 - val_accuracy: 0.8298
Epoch 6/10
89/89 [==============================] - 0s 3ms/step - loss: 0.1610 - accuracy: 0.9599 - val_loss: 0.4498 - val_accuracy: 0.8228
Epoch 7/10
89/89 [==============================] - 0s 3ms/step - loss: 0.1471 - accuracy: 0.9694 - val_loss: 0.4424 - val_accuracy: 0.8228
Epoch 8/10
89/89 [==[...]<jupyter_text>Overall Artists<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_all_artists)[1]),
                        Activation('relu'),
                        Dense(12),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_all_artists)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_all_artists)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_all_artists, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_all_artists, y_test_le))<jupyter_output>Epoch 1/10
328/328 [==============================] - 2s 5ms/step - loss: 0.5517 - accuracy: 0.8255 - val_loss: 0.8713 - val_accuracy: 0.7165
Epoch 2/10
328/328 [==============================] - 2s 5ms/step - loss: 0.5241 - accuracy: 0.8374 - val_loss: 0.8630 - val_accuracy: 0.7119
Epoch 3/10
328/328 [==============================] - 2s 5ms/step - loss: 0.4963 - accuracy: 0.8476 - val_loss: 0.8645 - val_accuracy: 0.7165
Epoch 4/10
328/328 [==============================] - 2s 6ms/step - loss: 0.4728 - accuracy: 0.8523 - val_loss: 0.8650 - val_accuracy: 0.7180
Epoch 5/10
328/328 [==============================] - 2s 7ms/step - loss: 0.4503 - accuracy: 0.8635 - val_loss: 0.8660 - val_accuracy: 0.7195
Epoch 6/10
328/328 [==============================] - 2s 5ms/step - loss: 0.4298 - accuracy: 0.8710 - val_loss: 0.8648 - val_accuracy: 0.7199
Epoch 7/10
328/328 [==============================] - 2s 5ms/step - loss: 0.4094 - accuracy: 0.8794 - val_loss: 0.8761 - val_accuracy: 0.7195
Epoch [...]<jupyter_text>English Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_english_genre)[1]),
                        Activation('relu'),
                        Dense(4),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_english_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_english_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_english_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_english_genre, y_test_le))<jupyter_output>Epoch 1/10
99/99 [==============================] - 2s 16ms/step - loss: 1.0728 - accuracy: 0.5588 - val_loss: 0.7526 - val_accuracy: 0.7529
Epoch 2/10
99/99 [==============================] - 1s 11ms/step - loss: 0.6069 - accuracy: 0.8049 - val_loss: 0.5909 - val_accuracy: 0.8048
Epoch 3/10
99/99 [==============================] - 1s 11ms/step - loss: 0.4568 - accuracy: 0.8633 - val_loss: 0.4991 - val_accuracy: 0.8454
Epoch 4/10
99/99 [==============================] - 1s 10ms/step - loss: 0.3628 - accuracy: 0.8979 - val_loss: 0.4548 - val_accuracy: 0.8669
Epoch 5/10
99/99 [==============================] - 1s 10ms/step - loss: 0.2941 - accuracy: 0.9207 - val_loss: 0.4131 - val_accuracy: 0.8733
Epoch 6/10
99/99 [==============================] - 1s 11ms/step - loss: 0.2384 - accuracy: 0.9388 - val_loss: 0.3821 - val_accuracy: 0.8809
Epoch 7/10
99/99 [==============================] - 1s 11ms/step - loss: 0.1964 - accuracy: 0.9569 - val_loss: 0.3551 - val_accuracy: 0.8910
Epoch 8/10
99[...]<jupyter_text>Telugu Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_telugu_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_telugu_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_telugu_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_telugu_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_telugu_genre, y_test_le))<jupyter_output>Epoch 1/10
77/77 [==============================] - 1s 7ms/step - loss: 0.0931 - accuracy: 0.9598 - val_loss: 0.3774 - val_accuracy: 0.8571
Epoch 2/10
77/77 [==============================] - 1s 7ms/step - loss: 0.0910 - accuracy: 0.9593 - val_loss: 0.3889 - val_accuracy: 0.8588
Epoch 3/10
77/77 [==============================] - 1s 7ms/step - loss: 0.0887 - accuracy: 0.9618 - val_loss: 0.3841 - val_accuracy: 0.8604
Epoch 4/10
77/77 [==============================] - 0s 6ms/step - loss: 0.0862 - accuracy: 0.9630 - val_loss: 0.3757 - val_accuracy: 0.8637
Epoch 5/10
77/77 [==============================] - 0s 6ms/step - loss: 0.0839 - accuracy: 0.9639 - val_loss: 0.3844 - val_accuracy: 0.8621
Epoch 6/10
77/77 [==============================] - 0s 6ms/step - loss: 0.0797 - accuracy: 0.9639 - val_loss: 0.3820 - val_accuracy: 0.8555
Epoch 7/10
77/77 [==============================] - 0s 6ms/step - loss: 0.0781 - accuracy: 0.9610 - val_loss: 0.3964 - val_accuracy: 0.8588
Epoch 8/10
77/77 [==[...]<jupyter_text>Hindi Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_hindi_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_hindi_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_hindi_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_hindi_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_hindi_genre, y_test_le))<jupyter_output>Epoch 1/10
67/67 [==============================] - 0s 6ms/step - loss: 2.4080e-04 - accuracy: 1.0000 - val_loss: 0.3088 - val_accuracy: 0.9383
Epoch 2/10
67/67 [==============================] - 0s 6ms/step - loss: 2.3072e-04 - accuracy: 1.0000 - val_loss: 0.3095 - val_accuracy: 0.9383
Epoch 3/10
67/67 [==============================] - 1s 8ms/step - loss: 2.2122e-04 - accuracy: 1.0000 - val_loss: 0.3099 - val_accuracy: 0.9402
Epoch 4/10
67/67 [==============================] - 1s 8ms/step - loss: 2.1147e-04 - accuracy: 1.0000 - val_loss: 0.3118 - val_accuracy: 0.9402
Epoch 5/10
67/67 [==============================] - 1s 10ms/step - loss: 2.0329e-04 - accuracy: 1.0000 - val_loss: 0.3120 - val_accuracy: 0.9402
Epoch 6/10
67/67 [==============================] - 0s 6ms/step - loss: 1.9555e-04 - accuracy: 1.0000 - val_loss: 0.3130 - val_accuracy: 0.9402
Epoch 7/10
67/67 [==============================] - 0s 6ms/step - loss: 1.8694e-04 - accuracy: 1.0000 - val_loss: 0.3133 - val_accuracy[...]<jupyter_text>All Generes<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_all_genres)[1]),
                        Activation('relu'),
                        Dense(10),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adam',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_all_genres)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_all_genres)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_all_genres, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_all_genres, y_test_le))<jupyter_output>Epoch 1/10
242/242 [==============================] - 1s 6ms/step - loss: 1.8137 - accuracy: 0.3872 - val_loss: 1.4471 - val_accuracy: 0.5367
Epoch 2/10
242/242 [==============================] - 1s 5ms/step - loss: 1.2582 - accuracy: 0.6046 - val_loss: 1.1944 - val_accuracy: 0.6294
Epoch 3/10
242/242 [==============================] - 1s 5ms/step - loss: 1.0424 - accuracy: 0.6783 - val_loss: 1.0722 - val_accuracy: 0.6760
Epoch 4/10
242/242 [==============================] - 1s 6ms/step - loss: 0.8995 - accuracy: 0.7243 - val_loss: 0.9809 - val_accuracy: 0.7029
Epoch 5/10
242/242 [==============================] - 1s 4ms/step - loss: 0.7882 - accuracy: 0.7605 - val_loss: 0.9146 - val_accuracy: 0.7215
Epoch 6/10
242/242 [==============================] - 1s 4ms/step - loss: 0.6989 - accuracy: 0.7889 - val_loss: 0.8614 - val_accuracy: 0.7391
Epoch 7/10
242/242 [==============================] - 1s 5ms/step - loss: 0.6197 - accuracy: 0.8210 - val_loss: 0.8238 - val_accuracy: 0.7531
Epoch [...]<jupyter_text>Optimizer as rmsprop  English Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_english_artist)[1]),
                        Activation('relu'),
                        Dense(5),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_english_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_english_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_english_artist, y_train_le, epochs = 6, batch_size = 32, validation_data=(x_test_english_artist, y_test_le))<jupyter_output>Epoch 1/6
172/172 [==============================] - 1s 3ms/step - loss: 1.1717 - accuracy: 0.5597 - val_loss: 0.8552 - val_accuracy: 0.7101
Epoch 2/6
172/172 [==============================] - 0s 3ms/step - loss: 0.7536 - accuracy: 0.7484 - val_loss: 0.7030 - val_accuracy: 0.7713
Epoch 3/6
172/172 [==============================] - 1s 3ms/step - loss: 0.6294 - accuracy: 0.7841 - val_loss: 0.6515 - val_accuracy: 0.7866
Epoch 4/6
172/172 [==============================] - 0s 3ms/step - loss: 0.5567 - accuracy: 0.8111 - val_loss: 0.6245 - val_accuracy: 0.7910
Epoch 5/6
172/172 [==============================] - 0s 3ms/step - loss: 0.5019 - accuracy: 0.8280 - val_loss: 0.6041 - val_accuracy: 0.8004
Epoch 6/6
172/172 [==============================] - 0s 3ms/step - loss: 0.4576 - accuracy: 0.8453 - val_loss: 0.5896 - val_accuracy: 0.8092<jupyter_text>Telugu Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_telugu_artist)[1]),
                        Activation('relu'),
                        Dense(4),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])


print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_telugu_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_telugu_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_telugu_artist, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_telugu_artist, y_test_le))<jupyter_output>Epoch 1/10
68/68 [==============================] - 0s 4ms/step - loss: 1.2236 - accuracy: 0.4690 - val_loss: 1.0626 - val_accuracy: 0.5630
Epoch 2/10
68/68 [==============================] - 0s 3ms/step - loss: 0.8927 - accuracy: 0.6528 - val_loss: 0.9392 - val_accuracy: 0.5981
Epoch 3/10
68/68 [==============================] - 0s 3ms/step - loss: 0.7621 - accuracy: 0.7176 - val_loss: 0.8756 - val_accuracy: 0.6315
Epoch 4/10
68/68 [==============================] - 0s 3ms/step - loss: 0.6770 - accuracy: 0.7556 - val_loss: 0.8419 - val_accuracy: 0.6500
Epoch 5/10
68/68 [==============================] - 0s 3ms/step - loss: 0.6102 - accuracy: 0.7875 - val_loss: 0.8123 - val_accuracy: 0.6778
Epoch 6/10
68/68 [==============================] - 0s 3ms/step - loss: 0.5539 - accuracy: 0.8032 - val_loss: 0.8029 - val_accuracy: 0.6833
Epoch 7/10
68/68 [==============================] - 0s 3ms/step - loss: 0.5075 - accuracy: 0.8282 - val_loss: 0.7753 - val_accuracy: 0.7000
Epoch 8/10
68/68 [==[...]<jupyter_text>Hindi Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_hindi_artist)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_hindi_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_hindi_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_hindi_artist, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_hindi_artist, y_test_le))<jupyter_output>Epoch 1/10
89/89 [==============================] - 0s 4ms/step - loss: 0.9429 - accuracy: 0.5916 - val_loss: 0.7358 - val_accuracy: 0.6850
Epoch 2/10
89/89 [==============================] - 0s 3ms/step - loss: 0.6276 - accuracy: 0.7573 - val_loss: 0.6091 - val_accuracy: 0.7496
Epoch 3/10
89/89 [==============================] - 0s 3ms/step - loss: 0.5325 - accuracy: 0.7960 - val_loss: 0.5640 - val_accuracy: 0.7722
Epoch 4/10
89/89 [==============================] - 0s 3ms/step - loss: 0.4737 - accuracy: 0.8298 - val_loss: 0.5343 - val_accuracy: 0.7806
Epoch 5/10
89/89 [==============================] - 0s 3ms/step - loss: 0.4298 - accuracy: 0.8466 - val_loss: 0.5189 - val_accuracy: 0.7918
Epoch 6/10
89/89 [==============================] - 0s 3ms/step - loss: 0.3907 - accuracy: 0.8674 - val_loss: 0.5020 - val_accuracy: 0.8017
Epoch 7/10
89/89 [==============================] - 0s 3ms/step - loss: 0.3594 - accuracy: 0.8818 - val_loss: 0.5042 - val_accuracy: 0.7989
Epoch 8/10
89/89 [==[...]<jupyter_text>Overall Artists<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_all_artists)[1]),
                        Activation('relu'),
                        Dense(12),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])


print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_all_artists)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_all_artists)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_all_artists, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_all_artists, y_test_le))<jupyter_output>Epoch 1/10
328/328 [==============================] - 1s 3ms/step - loss: 1.9071 - accuracy: 0.4034 - val_loss: 1.4550 - val_accuracy: 0.5522
Epoch 2/10
328/328 [==============================] - 1s 2ms/step - loss: 1.2518 - accuracy: 0.6168 - val_loss: 1.1784 - val_accuracy: 0.6380
Epoch 3/10
328/328 [==============================] - 1s 3ms/step - loss: 1.0487 - accuracy: 0.6695 - val_loss: 1.0726 - val_accuracy: 0.6597
Epoch 4/10
328/328 [==============================] - 1s 3ms/step - loss: 0.9355 - accuracy: 0.6997 - val_loss: 1.0165 - val_accuracy: 0.6711
Epoch 5/10
328/328 [==============================] - 1s 3ms/step - loss: 0.8583 - accuracy: 0.7203 - val_loss: 0.9796 - val_accuracy: 0.6856
Epoch 6/10
328/328 [==============================] - 1s 2ms/step - loss: 0.7979 - accuracy: 0.7408 - val_loss: 0.9515 - val_accuracy: 0.6921
Epoch 7/10
328/328 [==============================] - 1s 3ms/step - loss: 0.7487 - accuracy: 0.7563 - val_loss: 0.9255 - val_accuracy: 0.7020
Epoch [...]<jupyter_text>English Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_english_genre)[1]),
                        Activation('relu'),
                        Dense(4),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_english_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_english_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_english_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_english_genre, y_test_le))<jupyter_output>Epoch 1/10
99/99 [==============================] - 0s 5ms/step - loss: 0.9990 - accuracy: 0.6058 - val_loss: 0.7302 - val_accuracy: 0.7681
Epoch 2/10
99/99 [==============================] - 0s 3ms/step - loss: 0.5886 - accuracy: 0.8122 - val_loss: 0.5615 - val_accuracy: 0.8124
Epoch 3/10
99/99 [==============================] - 0s 4ms/step - loss: 0.4316 - accuracy: 0.8668 - val_loss: 0.4718 - val_accuracy: 0.8504
Epoch 4/10
99/99 [==============================] - 0s 3ms/step - loss: 0.3373 - accuracy: 0.8998 - val_loss: 0.4242 - val_accuracy: 0.8657
Epoch 5/10
99/99 [==============================] - 0s 3ms/step - loss: 0.2698 - accuracy: 0.9245 - val_loss: 0.3902 - val_accuracy: 0.8771
Epoch 6/10
99/99 [==============================] - 0s 3ms/step - loss: 0.2184 - accuracy: 0.9454 - val_loss: 0.3564 - val_accuracy: 0.8847
Epoch 7/10
99/99 [==============================] - 0s 3ms/step - loss: 0.1768 - accuracy: 0.9616 - val_loss: 0.3358 - val_accuracy: 0.8859
Epoch 8/10
99/99 [==[...]<jupyter_text>Telugu Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_telugu_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_telugu_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_telugu_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_telugu_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_telugu_genre, y_test_le))<jupyter_output>Epoch 1/10
77/77 [==============================] - 0s 4ms/step - loss: 0.8601 - accuracy: 0.6238 - val_loss: 0.6995 - val_accuracy: 0.7110
Epoch 2/10
77/77 [==============================] - 0s 3ms/step - loss: 0.5940 - accuracy: 0.7713 - val_loss: 0.5818 - val_accuracy: 0.7783
Epoch 3/10
77/77 [==============================] - 0s 3ms/step - loss: 0.4908 - accuracy: 0.8172 - val_loss: 0.5175 - val_accuracy: 0.8030
Epoch 4/10
77/77 [==============================] - 0s 3ms/step - loss: 0.4172 - accuracy: 0.8538 - val_loss: 0.4752 - val_accuracy: 0.8079
Epoch 5/10
77/77 [==============================] - 0s 3ms/step - loss: 0.3621 - accuracy: 0.8760 - val_loss: 0.4465 - val_accuracy: 0.8259
Epoch 6/10
77/77 [==============================] - 0s 3ms/step - loss: 0.3152 - accuracy: 0.8928 - val_loss: 0.4337 - val_accuracy: 0.8407
Epoch 7/10
77/77 [==============================] - 0s 3ms/step - loss: 0.2772 - accuracy: 0.9064 - val_loss: 0.4140 - val_accuracy: 0.8325
Epoch 8/10
77/77 [==[...]<jupyter_text>Hindi Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_hindi_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_hindi_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_hindi_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_hindi_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_hindi_genre, y_test_le))<jupyter_output>Epoch 1/10
67/67 [==============================] - 0s 4ms/step - loss: 0.7514 - accuracy: 0.6974 - val_loss: 0.5161 - val_accuracy: 0.8299
Epoch 2/10
67/67 [==============================] - 0s 3ms/step - loss: 0.4211 - accuracy: 0.8522 - val_loss: 0.3883 - val_accuracy: 0.8785
Epoch 3/10
67/67 [==============================] - 0s 3ms/step - loss: 0.3039 - accuracy: 0.9022 - val_loss: 0.3340 - val_accuracy: 0.8897
Epoch 4/10
67/67 [==============================] - 0s 3ms/step - loss: 0.2308 - accuracy: 0.9270 - val_loss: 0.3057 - val_accuracy: 0.9047
Epoch 5/10
67/67 [==============================] - 0s 3ms/step - loss: 0.1802 - accuracy: 0.9542 - val_loss: 0.2851 - val_accuracy: 0.9178
Epoch 6/10
67/67 [==============================] - 0s 4ms/step - loss: 0.1409 - accuracy: 0.9645 - val_loss: 0.2724 - val_accuracy: 0.9234
Epoch 7/10
67/67 [==============================] - 0s 3ms/step - loss: 0.1114 - accuracy: 0.9790 - val_loss: 0.2639 - val_accuracy: 0.9252
Epoch 8/10
67/67 [==[...]<jupyter_text>All Generes<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_all_genres)[1]),
                        Activation('relu'),
                        Dense(10),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'rmsprop',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_all_genres)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_all_genres)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_all_genres, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_all_genres, y_test_le))<jupyter_output>Epoch 1/10
242/242 [==============================] - 1s 4ms/step - loss: 1.8505 - accuracy: 0.3721 - val_loss: 1.4871 - val_accuracy: 0.5259
Epoch 2/10
242/242 [==============================] - 1s 3ms/step - loss: 1.3117 - accuracy: 0.5820 - val_loss: 1.2533 - val_accuracy: 0.6118
Epoch 3/10
242/242 [==============================] - 1s 3ms/step - loss: 1.0945 - accuracy: 0.6581 - val_loss: 1.1303 - val_accuracy: 0.6491
Epoch 4/10
242/242 [==============================] - 1s 2ms/step - loss: 0.9511 - accuracy: 0.7067 - val_loss: 1.0382 - val_accuracy: 0.6806
Epoch 5/10
242/242 [==============================] - 1s 2ms/step - loss: 0.8445 - accuracy: 0.7419 - val_loss: 0.9798 - val_accuracy: 0.6972
Epoch 6/10
242/242 [==============================] - 1s 3ms/step - loss: 0.7551 - accuracy: 0.7700 - val_loss: 0.9305 - val_accuracy: 0.7107
Epoch 7/10
242/242 [==============================] - 1s 3ms/step - loss: 0.6780 - accuracy: 0.7994 - val_loss: 0.8872 - val_accuracy: 0.7236
Epoch [...]<jupyter_text>Optimizer as adagrad  English Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_english_artist)[1]),
                        Activation('relu'),
                        Dense(5),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])

print(cnn_model.summary())
le = LabelEncoder()

y_train_le = le.fit_transform(y_train_english_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_english_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_english_artist, y_train_le, epochs = 6, batch_size = 32, validation_data=(x_test_english_artist, y_test_le))<jupyter_output>Epoch 1/6
172/172 [==============================] - 1s 3ms/step - loss: 1.6036 - accuracy: 0.3303 - val_loss: 1.4680 - val_accuracy: 0.4006
Epoch 2/6
172/172 [==============================] - 0s 3ms/step - loss: 1.4015 - accuracy: 0.4345 - val_loss: 1.3560 - val_accuracy: 0.4661
Epoch 3/6
172/172 [==============================] - 0s 3ms/step - loss: 1.3107 - accuracy: 0.4790 - val_loss: 1.2866 - val_accuracy: 0.4953
Epoch 4/6
172/172 [==============================] - 1s 3ms/step - loss: 1.2500 - accuracy: 0.5139 - val_loss: 1.2362 - val_accuracy: 0.5288
Epoch 5/6
172/172 [==============================] - 0s 3ms/step - loss: 1.2043 - accuracy: 0.5427 - val_loss: 1.1968 - val_accuracy: 0.5455
Epoch 6/6
172/172 [==============================] - 0s 3ms/step - loss: 1.1677 - accuracy: 0.5622 - val_loss: 1.1646 - val_accuracy: 0.5725<jupyter_text>Telugu Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_telugu_artist)[1]),
                        Activation('relu'),
                        Dense(4),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_telugu_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_telugu_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_telugu_artist, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_telugu_artist, y_test_le))<jupyter_output>Epoch 1/10
68/68 [==============================] - 0s 4ms/step - loss: 1.6025 - accuracy: 0.3162 - val_loss: 1.5177 - val_accuracy: 0.3852
Epoch 2/10
68/68 [==============================] - 0s 3ms/step - loss: 1.4269 - accuracy: 0.4014 - val_loss: 1.4177 - val_accuracy: 0.4333
Epoch 3/10
68/68 [==============================] - 0s 3ms/step - loss: 1.3491 - accuracy: 0.4306 - val_loss: 1.3565 - val_accuracy: 0.4648
Epoch 4/10
68/68 [==============================] - 0s 3ms/step - loss: 1.2969 - accuracy: 0.4583 - val_loss: 1.3126 - val_accuracy: 0.4778
Epoch 5/10
68/68 [==============================] - 0s 3ms/step - loss: 1.2575 - accuracy: 0.4815 - val_loss: 1.2795 - val_accuracy: 0.4889
Epoch 6/10
68/68 [==============================] - 0s 3ms/step - loss: 1.2263 - accuracy: 0.5032 - val_loss: 1.2529 - val_accuracy: 0.5019
Epoch 7/10
68/68 [==============================] - 0s 3ms/step - loss: 1.2005 - accuracy: 0.5199 - val_loss: 1.2305 - val_accuracy: 0.5148
Epoch 8/10
68/68 [==[...]<jupyter_text>Hindi Artist<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_hindi_artist)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_hindi_artist)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_hindi_artist)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_hindi_artist, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_hindi_artist, y_test_le))<jupyter_output>Epoch 1/10
89/89 [==============================] - 0s 4ms/step - loss: 1.2026 - accuracy: 0.4274 - val_loss: 1.0776 - val_accuracy: 0.5063
Epoch 2/10
89/89 [==============================] - 0s 3ms/step - loss: 1.0277 - accuracy: 0.5259 - val_loss: 0.9914 - val_accuracy: 0.5443
Epoch 3/10
89/89 [==============================] - 0s 3ms/step - loss: 0.9556 - accuracy: 0.5765 - val_loss: 0.9411 - val_accuracy: 0.5795
Epoch 4/10
89/89 [==============================] - 0s 3ms/step - loss: 0.9092 - accuracy: 0.6029 - val_loss: 0.9056 - val_accuracy: 0.6020
Epoch 5/10
89/89 [==============================] - 0s 3ms/step - loss: 0.8750 - accuracy: 0.6293 - val_loss: 0.8786 - val_accuracy: 0.6245
Epoch 6/10
89/89 [==============================] - 0s 3ms/step - loss: 0.8481 - accuracy: 0.6437 - val_loss: 0.8567 - val_accuracy: 0.6442
Epoch 7/10
89/89 [==============================] - 0s 3ms/step - loss: 0.8261 - accuracy: 0.6581 - val_loss: 0.8385 - val_accuracy: 0.6540
Epoch 8/10
89/89 [==[...]<jupyter_text>Overall Artists<jupyter_code>cnn_model = Sequential([Dense(81, input_dim = np.shape(x_train_all_artists)[1]),
                        Activation('relu'),
                        Dense(12),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_all_artists)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_all_artists)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_all_artists, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_all_artists, y_test_le))<jupyter_output>Epoch 1/10
328/328 [==============================] - 1s 3ms/step - loss: 2.6486 - accuracy: 0.1219 - val_loss: 2.5103 - val_accuracy: 0.1665
Epoch 2/10
328/328 [==============================] - 1s 2ms/step - loss: 2.4116 - accuracy: 0.1880 - val_loss: 2.3787 - val_accuracy: 0.2119
Epoch 3/10
328/328 [==============================] - 1s 2ms/step - loss: 2.3041 - accuracy: 0.2283 - val_loss: 2.2957 - val_accuracy: 0.2405
Epoch 4/10
328/328 [==============================] - 1s 2ms/step - loss: 2.2299 - accuracy: 0.2581 - val_loss: 2.2341 - val_accuracy: 0.2675
Epoch 5/10
328/328 [==============================] - 1s 2ms/step - loss: 2.1725 - accuracy: 0.2820 - val_loss: 2.1848 - val_accuracy: 0.2854
Epoch 6/10
328/328 [==============================] - 1s 2ms/step - loss: 2.1255 - accuracy: 0.3026 - val_loss: 2.1435 - val_accuracy: 0.2988
Epoch 7/10
328/328 [==============================] - 1s 2ms/step - loss: 2.0855 - accuracy: 0.3186 - val_loss: 2.1079 - val_accuracy: 0.3117
Epoch [...]<jupyter_text>English Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_english_genre)[1]),
                        Activation('relu'),
                        Dense(4),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_english_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_english_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_english_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_english_genre, y_test_le))<jupyter_output>Epoch 1/10
99/99 [==============================] - 0s 4ms/step - loss: 1.4354 - accuracy: 0.3847 - val_loss: 1.2723 - val_accuracy: 0.4525
Epoch 2/10
99/99 [==============================] - 0s 3ms/step - loss: 1.2157 - accuracy: 0.4805 - val_loss: 1.1602 - val_accuracy: 0.5196
Epoch 3/10
99/99 [==============================] - 0s 3ms/step - loss: 1.1173 - accuracy: 0.5452 - val_loss: 1.0913 - val_accuracy: 0.5412
Epoch 4/10
99/99 [==============================] - 0s 3ms/step - loss: 1.0519 - accuracy: 0.5829 - val_loss: 1.0420 - val_accuracy: 0.5716
Epoch 5/10
99/99 [==============================] - 0s 3ms/step - loss: 1.0032 - accuracy: 0.6080 - val_loss: 1.0038 - val_accuracy: 0.5932
Epoch 6/10
99/99 [==============================] - 0s 3ms/step - loss: 0.9645 - accuracy: 0.6254 - val_loss: 0.9730 - val_accuracy: 0.6185
Epoch 7/10
99/99 [==============================] - 0s 3ms/step - loss: 0.9325 - accuracy: 0.6445 - val_loss: 0.9470 - val_accuracy: 0.6350
Epoch 8/10
99/99 [==[...]<jupyter_text>Telugu Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_telugu_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_telugu_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_telugu_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_telugu_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_telugu_genre, y_test_le))<jupyter_output>Epoch 1/10
77/77 [==============================] - 0s 4ms/step - loss: 1.0650 - accuracy: 0.4686 - val_loss: 0.9651 - val_accuracy: 0.5353
Epoch 2/10
77/77 [==============================] - 0s 3ms/step - loss: 0.9276 - accuracy: 0.5708 - val_loss: 0.8970 - val_accuracy: 0.5911
Epoch 3/10
77/77 [==============================] - 0s 3ms/step - loss: 0.8712 - accuracy: 0.6185 - val_loss: 0.8567 - val_accuracy: 0.6174
Epoch 4/10
77/77 [==============================] - 0s 3ms/step - loss: 0.8340 - accuracy: 0.6534 - val_loss: 0.8290 - val_accuracy: 0.6453
Epoch 5/10
77/77 [==============================] - 0s 3ms/step - loss: 0.8066 - accuracy: 0.6727 - val_loss: 0.8078 - val_accuracy: 0.6634
Epoch 6/10
77/77 [==============================] - 0s 3ms/step - loss: 0.7850 - accuracy: 0.6805 - val_loss: 0.7910 - val_accuracy: 0.6765
Epoch 7/10
77/77 [==============================] - 0s 3ms/step - loss: 0.7674 - accuracy: 0.6920 - val_loss: 0.7769 - val_accuracy: 0.6782
Epoch 8/10
77/77 [==[...]<jupyter_text>Hindi Genre<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_hindi_genre)[1]),
                        Activation('relu'),
                        Dense(3),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_hindi_genre)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_hindi_genre)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_hindi_genre, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_hindi_genre, y_test_le))<jupyter_output>Epoch 1/10
67/67 [==============================] - 0s 4ms/step - loss: 1.0462 - accuracy: 0.4710 - val_loss: 0.9259 - val_accuracy: 0.5738
Epoch 2/10
67/67 [==============================] - 0s 3ms/step - loss: 0.8727 - accuracy: 0.6174 - val_loss: 0.8309 - val_accuracy: 0.6636
Epoch 3/10
67/67 [==============================] - 0s 3ms/step - loss: 0.7942 - accuracy: 0.6796 - val_loss: 0.7726 - val_accuracy: 0.6860
Epoch 4/10
67/67 [==============================] - 0s 3ms/step - loss: 0.7421 - accuracy: 0.7063 - val_loss: 0.7313 - val_accuracy: 0.7047
Epoch 5/10
67/67 [==============================] - 0s 3ms/step - loss: 0.7034 - accuracy: 0.7315 - val_loss: 0.6996 - val_accuracy: 0.7290
Epoch 6/10
67/67 [==============================] - 0s 3ms/step - loss: 0.6729 - accuracy: 0.7493 - val_loss: 0.6740 - val_accuracy: 0.7514
Epoch 7/10
67/67 [==============================] - 0s 3ms/step - loss: 0.6479 - accuracy: 0.7619 - val_loss: 0.6528 - val_accuracy: 0.7626
Epoch 8/10
67/67 [==[...]<jupyter_text>All Generes<jupyter_code>cnn_model = Sequential([Dense(91, input_dim = np.shape(x_train_all_genres)[1]),
                        Activation('relu'),
                        Dense(10),
                        Activation('softmax')])
cnn_model.compile(optimizer = 'adagrad',
                  loss = 'categorical_crossentropy',
                  metrics = ['accuracy'])
# cnn_model.compile(optimizer = 'adam')


print(cnn_model.summary())
le = LabelEncoder()

# y_train_le = le.fit_transform(y_train_hindi_genre.values.reshape(-1,1))
y_train_le = le.fit_transform(y_train_all_genres)
y_train_le = to_categorical(y_train_le)

y_test_le = le.fit_transform(y_test_all_genres)
y_test_le = to_categorical(y_test_le)
cnn_model.fit(x_train_all_genres, y_train_le, epochs = 10, batch_size = 32, validation_data=(x_test_all_genres, y_test_le))<jupyter_output>Epoch 1/10
242/242 [==============================] - 1s 3ms/step - loss: 2.3867 - accuracy: 0.1918 - val_loss: 2.2527 - val_accuracy: 0.2024
Epoch 2/10
242/242 [==============================] - 1s 2ms/step - loss: 2.1820 - accuracy: 0.2372 - val_loss: 2.1327 - val_accuracy: 0.2464
Epoch 3/10
242/242 [==============================] - 1s 2ms/step - loss: 2.0860 - accuracy: 0.2715 - val_loss: 2.0566 - val_accuracy: 0.2702
Epoch 4/10
242/242 [==============================] - 1s 2ms/step - loss: 2.0196 - accuracy: 0.2978 - val_loss: 2.0005 - val_accuracy: 0.2987
Epoch 5/10
242/242 [==============================] - 1s 2ms/step - loss: 1.9684 - accuracy: 0.3232 - val_loss: 1.9560 - val_accuracy: 0.3173
Epoch 6/10
242/242 [==============================] - 1s 3ms/step - loss: 1.9268 - accuracy: 0.3400 - val_loss: 1.9192 - val_accuracy: 0.3395
Epoch 7/10
242/242 [==============================] - 1s 3ms/step - loss: 1.8916 - accuracy: 0.3546 - val_loss: 1.8878 - val_accuracy: 0.3499
Epoch [...]
{'fraction_non_alphanumeric': 0.21743941995802327, 'fraction_numerical': 0.10139286395726006, 'mean_word_length': 3.6712121212121214, 'pattern_counts': {'":': 0, '<': 120, '<?xml version=': 0, '>': 120, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '35', 'dir': 'jupyter-structured-clean-dedup', 'id': '407753', 'license': 'MIT', 'n_tokens_mistral': 23226, 'n_tokens_neox': 19247, 'n_words': 3367, 'path': 'notebooks/Modeling-Notebook-Part 2.ipynb', 'repo_name': 'npulagam/Music_Classifier_Singer_Identifier', 'size': '52428'}