forked from abdulfatir/twitter-sentiment-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved the issue where importing XGBClassifier from xgboost was causing an ImportError due to a circular import in the project. This occurred because the script was named xgboost.py, conflicting with the external xgboost library. Solution: Renamed the script to avoid naming conflicts with the xgboost library. Updated the code to align with Python 3 standards, addressing deprecated methods and outdated syntax. Changes: Renamed the script to avoid the ImportError caused by a naming conflict with xgboost. Replaced the use of xrange() with range() to ensure Python 3 compatibility. Updated print statements to Python 3 format for cleaner output. Modified the XGBClassifier initialization from silent to verbosity in line with the current version of XGBoost. Applied minor adjustments for TF-IDF feature extraction to improve performance and code clarity. This resolves the issue and ensures the code runs smoothly across Python 3.x environments.
- Loading branch information
1 parent
77e1888
commit 95d47b8
Showing
1 changed file
with
44 additions
and
51 deletions.
There are no files selected for viewing
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