How manojit32/musicmoodprediction works
Main Components
• Data Sources & Ingestion:
– External datasets from the Million Song subset and NJU dataset.
– Raw datasets are downloaded externally.
• Data Preparation / Preprocessing:
– Represent the Data_Preparation.ipynb as a component which cleans and transforms the raw data, producing “training_backup.csv” and “testing_backup.csv”.
• Feature Engineering Module:
– Shows the transformation of lyrics using models like Count Vectorizer, TfidfVectorizer, and Tfidf-NGram.
• Model Training & Evaluation:
– Encapsulate the Mood_Prediction.ipynb process where several models (Random Forest, Logistic Regression, SVM, Multinomial Naive Bayes) are trained.
– Indicate the evaluation step, including computation of accuracy scores and confusion matrices.
• Prediction/Pipeline Service:
– Highlight pred() and pred1() functions which take in new lyrics (both English and romanized Hindi) and process them.
– Include a component that performs translation of Hindi lyrics (using Google Translate API) before prediction.
Relationships and Data Flow
• Data Preparation to the Feature Engineering component.
Architectural Patterns and Design Principles
• Pipeline architecture: Emphasize the linear flow from data ingestion to feature engineering and model training.
• Modular design: Clearly differentiate stages as isolated modules (data preparation, feature engineering, model training, and prediction) to facilitate maintenance and possible scalability.
• Reusability and extendability: Noting that there are separate functions handling English and Hindi predictions, indicating potential integration with external APIs (translation) and future expansion for additional languages.
Relevant Technologies and Frameworks
• Jupyter Notebooks: Identify Data_Preparation.ipynb and Mood_Prediction.ipynb as main workflow orchestrators.
• Machine Learning Libraries: Suggest noting the use (implicit from code) of libraries like scikit-learn (for Random Forest, Logistic Regression, SVM, and Naive Bayes) and NLTK for text processing.
• Data Vectorization Tools: Count Vectorizer and Tf-idf based vectorizers.
• External API: Google Translate for converting Hindi lyrics.
• Optional: Integration of evaluation metrics like confusion matrix generation should be highlighted.