-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Jayshah6699/main
updated
- Loading branch information
Showing
4,009 changed files
with
55,137 additions
and
2 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# House-Price-Prediction | ||
|
||
|
||
## Introduction : | ||
#### The objective of the project is to perform data visualization techniques to perform data visualization techniques to understand the insights of the data. Machine Learning is often required to getting the understanding of the data and it's insights. | ||
#### This project aims to apply various python tools to get a visual understanding of the data and clean it to make it ready to apply machine learning operation on it. | ||
|
||
![](Img004.jpg) | ||
|
||
|
||
## Description : | ||
#### This is a notebook for visualization of various feature which are the sales price of houses. | ||
|
||
![](Img003.jpg) | ||
|
||
|
||
## Usage : | ||
#### - Download the repo ; | ||
#### - Import all the libraries that will be used to load train and test datasets and data manipulation ; | ||
#### - Load train and test data ; | ||
#### - The notebook contain all the further markdown details(like- Visualization of dataset; Multi-variate Analysis; Imputation and Wraingling; and Modelling) that explains the project. | ||
|
||
|
||
## How to Contribute: | ||
#### 1. Take a look at the Existing Issues or create your own Issues. | ||
#### 2. Preferably, you connot work on any issue that is not assigned to you. Wait for the Issues or create your own Issue. | ||
#### 3. Fork the Repo and create a Branch for any Issue that you are working upon. | ||
#### 4. Make your changes. | ||
#### 5. Create a Pull Request which will be promptly reviewed and suggestions would be added to improve it. | ||
|
||
#### For more details visit [CONTRIBUTING.md](https://github.com/Jayshah6699/datascience-mashup/blob/main/CONTRIBUTING.md). | ||
|
||
|
||
## Code of Conduct | ||
#### This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/Jayshah6699/datascience-mashup/blob/main/CODE_OF_CONDUCT.md). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
## Music Genre Classification | ||
|
||
> Music Genre classification using Convolutional Neural Networks. Implemented in Tensorflow 2.0 using the Keras API | ||
### Overview | ||
|
||
*tl;dr*: Compare the classic approach of extract features and use a classifier (e.g SVM) against the Deep Learning approach of using CNNs on a representation of the audio (Melspectrogram) to extract features and classify. You can see both approaches on the **nbs** folder in the Jupyter notebooks. | ||
|
||
Resume of the deep learning approach: | ||
|
||
1. Shuffle the input and split into train and test (70%/30%) | ||
2. Read the audios as melspectrograms, spliting then into 1.5s windows with 50% overlaping resulting in a dataset with shape (samples x time x frequency x channels) | ||
3. Train the CNN and test on test set using a Majority Voting approach | ||
|
||
### Results | ||
|
||
To compare the result across multiple architectures, we have took two approaches for this problem: One using the classic approach of extracting features and then using a classifier. The second approach, wich is implemented on the src file here is a Deep Learning approach feeding a CNN with a melspectrogram. | ||
|
||
You can check in the nbs folder on how we extracted the features, but here are the current results on the test set: | ||
|
||
| Model | Acc | | ||
|-------|-----| | ||
| Decision Tree | 0.5160 | | ||
| Random Forest | 0.6760 | | ||
| ElasticNet | 0.6880 | | ||
| Logistic Regression | 0.7640 | | ||
| SVM (RBF) | 0.7880 | | ||
|
||
For the deep learning approach we have tested a simple custom architecture that can be found at the *nbs* folder. | ||
|
||
| Model | Acc | | ||
|-------|-----| | ||
| **CNN 2D** | **0.832** | | ||
|
||
![alt text](./data/assets/losscnn2dgtzan.png "Loss and accuracy of the CNN model") | ||
![alt text](./data/assets/cmcnngtzan.png "Confusion Matrix of the CNN model") | ||
|
||
### Dataset | ||
|
||
And how to get the dataset? | ||
|
||
1. Download the GTZAN dataset [here](http://opihi.cs.uvic.ca/sound/genres.tar.gz) | ||
|
||
Extract the file in the **data** folder of this project. The structure should look like this: | ||
|
||
```bash | ||
├── data/ | ||
├── genres | ||
├── blues | ||
├── classical | ||
├── country | ||
. | ||
. | ||
. | ||
├── rock | ||
``` | ||
|
||
### How to run | ||
|
||
The models are provided as **.joblib** or **.h5** files in the *models* folder. You just need to use it on your custom file as described bellow. | ||
|
||
If you want to run the training process yourself, you need to run the provided notebooks in *nbs* folder. | ||
|
||
To apply the model on a test file, you need to run: | ||
|
||
```bash | ||
$ cd src/ | ||
$ python app.py -t MODEL_TYPE -m ../models/PATH_TO_MODEL -s PATH_TO_SONG | ||
``` | ||
|
||
Where MODEL_TYPE = [ml, dl] for classical machine learning approach and for a deep learning approach, respectively. | ||
|
||
Usage example: | ||
|
||
```bash | ||
$ python app.py -t dl -m ../models/custom_cnn_2d.h5 -s ../data/samples/iza_meu_talisma.mp3 | ||
``` | ||
|
||
and the output will be: | ||
|
||
```bash | ||
$ ../data/samples/iza_meu_talisma.mp3 is a pop song | ||
$ most likely genres are: [('pop', 0.43), ('hiphop', 0.39), ('country', 0.08)] | ||
``` | ||
|
||
## Streamlit app | ||
|
||
## Initial screen | ||
![](Streamlit_app/mus1_output.PNG) | ||
|
||
|
||
## After selecting the music | ||
|
||
![](Streamlit_app/mus2_output.PNG) |
Binary file added
BIN
+4.33 MB
Music genre classification/Streamlit_app/Green Day-American Idiot.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.