<jupyter_start><jupyter_text>Compute and Encode Feature Values<jupyter_code>import sentiplus.Hybrid.Features as feats
import sentiplus.Hybrid.SentiseadTenFold as seadTen
infile = "ConsolidatedWithBestTrainedClfsFromThreeSETools.xls"
infile = os.path.join(indir, infile)
prep = feats.PrepareFeatureValuesForClassification()
prep.computeAndEncodeDiversityScores(infile, infile)<jupyter_output><empty_output><jupyter_text>Train and Test Classsifier 10 Fold<jupyter_code>algo = "RF"
learnerCol = "Senti4SD"
sead = seadTen.Sentisead()
sead.computePerformanceOverallOfLearner(algo, learnerCol)
algo = "RF"
learnerCol = "SentiCR"
sead = seadTen.Sentisead()
sead.computePerformanceOverallOfLearner(algo, learnerCol)
algo = "RF"
learnerCol = "SentistrengthSE"
sead = seadTen.Sentisead()
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity bin
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead()
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity actual values
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead()
sead.computePerformanceOverallOfLearner(algo, learnerCol)<jupyter_output>Label = p. Precision = 0.689. Recall = 0.800. F1 = 0.741
Label = o. Precision = 0.856. Recall = 0.717. F1 = 0.781
Label = n. Precision = 0.632. Recall = 0.773. F1 = 0.695
F1 Macro = 0.744. Micro = 0.750
Macro Precision = 0.726. Recall = 0.764
-------------------------------<jupyter_text>Prep train test files<jupyter_code>sead = seadTen.Sentisead()
sead.prepareTrainTestFiles()<jupyter_output><empty_output><jupyter_text>Train Test<jupyter_code># with diversity actual values and all the preprocessing
algo = "GBT"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity actual values and all the preprocessing
algo = "MLPC"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity bin and no preprocessing of text
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity bin and no preprocessing of text
algo = "GBT"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity bin and preprocessing of text without negation handling
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformancOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling
algo = "RF"
learnerCol = "SentistrengthSE"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformancOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling
algo = "RF"
learnerCol = "Senti4SD"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformancOfLearner(algo, learnerCol)
# without diversity score and preprocessing of text without negation handling
algo = "RF"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling
algo = "GBTSentiCR"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling
algo = "GBTSentiCR"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformancOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling and dso p, n scores
algo = "GBTSentiCR"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformanceOverallOfLearner(algo, learnerCol)
# with diversity score and preprocessing of text without negation handling and dso p, n scores
algo = "GBTSentiCR"
learnerCol = "Opinese"
sead = seadTen.Sentisead(rootdir=rootdir)
sead.computePerformancOfLearner(algo, learnerCol)<jupyter_output>File DatasetLinJIRA. Label = p. Precision = 0.94. Recall = 0.93. F1 = 0.94
File DatasetLinJIRA. Label = n. Precision = 0.97. Recall = 0.97. F1 = 0.97
File = DatasetLinJIRA. F1 Macro = 0.95. Micro = 0.96
-------------------------------
File BenchmarkUddinSO. Label = p. Precision = 0.49. Recall = 0.23. F1 = 0.31
File BenchmarkUddinSO. Label = o. Precision = 0.65. Recall = 0.85. F1 = 0.74
File BenchmarkUddinSO. Label = n. Precision = 0.43. Recall = 0.31. F1 = 0.36
File = BenchmarkUddinSO. F1 Macro = 0.49. Micro = 0.61
-------------------------------
File DatasetLinAppReviews. Label = p. Precision = 0.83. Recall = 0.89. F1 = 0.86
File DatasetLinAppReviews. Label = o. Precision = 0.11. Recall = 0.04. F1 = 0.06
File DatasetLinAppReviews. Label = n. Precision = 0.79. Recall = 0.80. F1 = 0.79
File = DatasetLinAppReviews. F1 Macro = 0.58. Micro = 0.79
-------------------------------
File DatasetLinSO. Label = p. Precision = 0.55. Recall = 0.35. F1 = 0.43
File DatasetLinSO. Label = o. Precision [...]
{'fraction_non_alphanumeric': 0.11780722454165911, 'fraction_numerical': 0.031040116173534218, 'mean_word_length': 5.122222222222222, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '343091', 'license': 'MIT', 'n_tokens_mistral': 2105, 'n_tokens_neox': 1920, 'n_words': 481, 'path': 'sentisead/code/notebook/HybridTrialOne.ipynb', 'repo_name': 'al-alamin/Sentiment4SE', 'size': '5509'}