Gravitational wave detection and denoising algorithm uses machine learning to classify and filter noise from gravitational wave data. There are 22 main types of noise that can be identified using supervised and unsupervised learning algorithms. Unsupervised learning allows the computer to classify noise types on its own by finding inherent groupings or clusters in the data, while supervised learning uses labeled examples to efficiently perform classifications. The proposed method uses a variational autoencoder and invariant information clustering to learn features from spectrogram images of transient noise and then classify the noise types based on the learned features.