|
1 | 1 | #!/usr/bin/env python |
2 | 2 |
|
3 | | -import os, sqlite3, random, nltk, argparse |
| 3 | +import os, sqlite3, random, argparse |
4 | 4 | from datetime import datetime |
5 | | -import src.classifier_multiclass |
| 5 | +from src.classifier_multiclass import perform_classification, TrainingAlgorithm |
6 | 6 | import pandas as pd |
7 | 7 | import numpy as np |
8 | 8 | from src.tag_identifier import start_server |
9 | 9 | from src.download_code2vec_vectors import * |
10 | | -import json |
| 10 | +from src.feature_generator import custom_to_numeric, universal_to_custom, createFeatures |
11 | 11 | from src.create_models import createModel, stable_features, mutable_feature_list, columns_to_drop |
12 | | -from src.version import __version__ |
| 12 | +from version import __version__ |
13 | 13 |
|
14 | 14 | # Get the directory of the current script |
15 | 15 | SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
@@ -123,14 +123,14 @@ def train(config): |
123 | 123 | results_text_file.write(f"SQL: {sql_statement}\n") |
124 | 124 | results_text_file.write(f"Features: {df_features}\n") |
125 | 125 |
|
126 | | - algorithms = [classifier_multiclass.TrainingAlgorithm.XGBOOST] |
| 126 | + algorithms = [TrainingAlgorithm.XGBOOST] |
127 | 127 | #pd.set_option('display.max_rows', None) # Show all rows |
128 | 128 | pd.set_option('display.max_columns', None) # Show all columns |
129 | 129 | pd.set_option('display.width', None) # Prevent line wrapping |
130 | 130 | pd.set_option('display.max_colwidth', None) # Show full content of each cell |
131 | 131 |
|
132 | 132 | print(df_features) |
133 | | - classifier_multiclass.perform_classification(df_features, df_class, results_text_file, |
| 133 | + perform_classification(df_features, df_class, results_text_file, |
134 | 134 | output_dir, algorithms, trainingSeed, |
135 | 135 | classifierSeed, columns_to_drop) |
136 | 136 |
|
|
0 commit comments