jpuglia commited on
Commit
b816ad0
·
1 Parent(s): d2f541d

Refactor code structure for improved readability and maintainability

Browse files
Classification_Reports/results_ESM300_RF.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Cellwall,0.8842105263157894,0.8842105263157894,0.8842105263157894,95.0
3
+ Cytoplasmic,0.9852189528940462,0.9852189528940462,0.9852189528940462,7239.0
4
+ CytoplasmicMembrane,0.9573234984193888,0.9228034535297105,0.9397465735712438,1969.0
5
+ Extracellular,0.9062870699881376,0.958594730238394,0.9317073170731708,797.0
6
+ OuterMembrane,0.9796296296296296,0.9531531531531532,0.9662100456621004,555.0
7
+ Periplasmic,0.878095238095238,0.9505154639175257,0.9128712871287129,485.0
8
+ accuracy,0.9683123877917414,0.9683123877917414,0.9683123877917414,0.9683123877917414
9
+ macro avg,0.9317941525570382,0.9424160466747699,0.9366607837741773,11140.0
10
+ weighted avg,0.9688376479433536,0.9683123877917414,0.9683950524837511,11140.0
Classification_Reports/results_ESM300_SVM.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Cellwall,0.9540229885057471,0.8736842105263158,0.9120879120879121,95.0
3
+ Cytoplasmic,0.9931299807639461,0.9984804531012571,0.995798029895984,7239.0
4
+ CytoplasmicMembrane,0.990726429675425,0.9766378872524124,0.9836317135549872,1969.0
5
+ Extracellular,0.9672955974842767,0.9648682559598495,0.9660804020100503,797.0
6
+ OuterMembrane,0.9815157116451017,0.9567567567567568,0.968978102189781,555.0
7
+ Periplasmic,0.9357429718875502,0.9608247422680413,0.948118006103764,485.0
8
+ accuracy,0.9874326750448833,0.9874326750448833,0.9874326750448833,0.9874326750448833
9
+ macro avg,0.9704056133270078,0.9552087176441054,0.962449027640413,11140.0
10
+ weighted avg,0.9874462843099304,0.9874326750448833,0.9873956278395704,11140.0
Classification_Reports/results_ESM600_RF.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Cellwall,0.8913043478260869,0.8631578947368421,0.8770053475935828,95.0
3
+ Cytoplasmic,0.9903846153846154,0.995993921812405,0.9931813485777258,7239.0
4
+ CytoplasmicMembrane,0.9894902785076195,0.9563230066023362,0.9726239669421488,1969.0
5
+ Extracellular,0.9381067961165048,0.9698870765370138,0.9537322640345466,797.0
6
+ OuterMembrane,0.9744058500914077,0.9603603603603603,0.9673321234119783,555.0
7
+ Periplasmic,0.9331983805668016,0.9505154639175257,0.9417773237997957,485.0
8
+ accuracy,0.9822262118491921,0.9822262118491921,0.9822262118491921,0.9822262118491921
9
+ macro avg,0.9528150447488395,0.9493729539944139,0.9509420623932964,11140.0
10
+ weighted avg,0.9823556624842636,0.9822262118491921,0.9822089610643375,11140.0
Classification_Reports/results_ESM600_SVM.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Cellwall,0.9647058823529412,0.8631578947368421,0.9111111111111111,95.0
3
+ Cytoplasmic,0.9927207801126219,0.9984804531012571,0.9955922865013774,7239.0
4
+ CytoplasmicMembrane,0.986659825551565,0.9766378872524124,0.9816232771822359,1969.0
5
+ Extracellular,0.9636135508155583,0.9636135508155583,0.9636135508155583,797.0
6
+ OuterMembrane,0.9833948339483395,0.9603603603603603,0.9717411121239745,555.0
7
+ Periplasmic,0.9465020576131687,0.9484536082474226,0.9474768280123584,485.0
8
+ accuracy,0.9868940754039497,0.9868940754039497,0.9868940754039497,0.9868940754039497
9
+ macro avg,0.9729328217323658,0.9517839590856422,0.9618596942911025,11140.0
10
+ weighted avg,0.986851311791162,0.9868940754039497,0.9868318607832719,11140.0
Classification_Reports/results_PROST_RF.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Cellwall,0.9529411764705882,0.8526315789473684,0.9,95.0
3
+ Cytoplasmic,0.9911966987620358,0.9954413593037712,0.9933144944517196,7239.0
4
+ CytoplasmicMembrane,0.9845360824742269,0.9700355510411376,0.9772320286518291,1969.0
5
+ Extracellular,0.9207100591715977,0.9761606022584692,0.9476248477466505,797.0
6
+ OuterMembrane,0.9887850467289719,0.9531531531531532,0.9706422018348624,555.0
7
+ Periplasmic,0.9505376344086022,0.911340206185567,0.9305263157894736,485.0
8
+ accuracy,0.9825852782764811,0.9825852782764811,0.9825852782764811,0.9825852782764811
9
+ macro avg,0.9647844496693371,0.9431270751482446,0.9532233147457557,11140.0
10
+ weighted avg,0.9827599848543402,0.9825852782764811,0.9825441812012363,11140.0
Classification_Reports/results_PROST_SVM.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Cellwall,0.9761904761904762,0.8631578947368421,0.9162011173184358,95.0
3
+ Cytoplasmic,0.9921638713225186,0.9969609062025142,0.9945566044236201,7239.0
4
+ CytoplasmicMembrane,0.9886889460154241,0.9766378872524124,0.9826264690853347,1969.0
5
+ Extracellular,0.9616336633663366,0.9749058971141782,0.9682242990654205,797.0
6
+ OuterMembrane,0.9834862385321101,0.9657657657657658,0.9745454545454545,555.0
7
+ Periplasmic,0.9442148760330579,0.9422680412371134,0.9432404540763674,485.0
8
+ accuracy,0.9867145421903052,0.9867145421903052,0.9867145421903052,0.9867145421903052
9
+ macro avg,0.9743963452433206,0.9532827320514711,0.9632323997524388,11140.0
10
+ weighted avg,0.9867093358537257,0.9867145421903052,0.9866647214588659,11140.0
notebooks/testing.ipynb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dd793e7eb5bcb40ea7231b7887dab01860d4ee2bdb596147f406c0a5fc4984b
3
+ size 238240
src/my_utils.py CHANGED
@@ -748,11 +748,11 @@ def predict_with_esm(fasta_path : str,
748
  messagebox.showinfo("Info", "Loading SVM for predictions...")
749
  project_root: str = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
750
  model_path = os.path.join(project_root, 'Models/ESMC-300m_svm.joblib'
751
- if
752
- model == 'esmc_300m'
753
  else 'Models/ESMC-600m_svm.joblib')
754
  le_path = os.path.join(project_root, 'Models/esm_300m_le_svm.joblib'
755
- if
756
  model == 'esmc_300m'
757
  else 'Models/ESMC-600m_le_svm.joblib')
758
 
 
748
  messagebox.showinfo("Info", "Loading SVM for predictions...")
749
  project_root: str = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
750
  model_path = os.path.join(project_root, 'Models/ESMC-300m_svm.joblib'
751
+ if
752
+ model == 'esmc_300m'
753
  else 'Models/ESMC-600m_svm.joblib')
754
  le_path = os.path.join(project_root, 'Models/esm_300m_le_svm.joblib'
755
+ if
756
  model == 'esmc_300m'
757
  else 'Models/ESMC-600m_le_svm.joblib')
758