This repository contains scripts and tools for training, evaluating, and selecting ranking models for SEO-related tasks. It uses Java-based RankLib along with deep learning models for ranking optimization.
baseline_model_choice.pychoose_seo_texts_new_java.pycreate_baseline_training_set.pycreate_student_file.pyrun_ranking_E5.pygen_utils.pyutils.pymodel_train_test.pymodel_train_val_test.pytrain_val_split.pyEnsure you have the following installed:
pip install pandas tqdm transformers torch lxml
Hyperparameters and training settings are stored in config.py:
is_train = True # Set to False for testing
metrics = ['MAP', 'NDCG@1', 'DCG@1', 'P@1', 'RR@1', 'ERR@1']
tree_vals = [50, 100, 200, 500, 1000]
leaf_vals = [5, 10, 20, 50]
shrinkage_vals = [0.005, 0.01, 0.1]
Modify these settings as needed before running experiments.
To train a new ranking model, run:
python model_train_test.py
This script trains models based on the hyperparameters defined in config.py.
To rank documents using E5 embeddings:
python run_ranking_E5.py
This will generate ranked output based on the input queries.
To find the best-performing ranking model:
python baseline_model_choice.py
This script evaluates multiple models and saves ranking scores.
tommy_data.csvThis dataset contains historical ranking data. The format includes:
docno, query_id, round_no, username, position, current_document
feature_data_asrc_tommy.csvContains ranking features and labels for training. Sample columns:
query_id, docno, rank, score, rank_promotion
config.py based on experimentation.3 commits
Python
100.0%
This repository contains scripts and tools for training, evaluating, and selecting ranking models for SEO-related tasks. It uses Java-based RankLib along with deep learning models for ranking optimization.
baseline_model_choice.pychoose_seo_texts_new_java.pycreate_baseline_training_set.pycreate_student_file.pyrun_ranking_E5.pygen_utils.pyutils.pymodel_train_test.pymodel_train_val_test.pytrain_val_split.pyEnsure you have the following installed:
pip install pandas tqdm transformers torch lxml
Hyperparameters and training settings are stored in config.py:
is_train = True # Set to False for testing
metrics = ['MAP', 'NDCG@1', 'DCG@1', 'P@1', 'RR@1', 'ERR@1']
tree_vals = [50, 100, 200, 500, 1000]
leaf_vals = [5, 10, 20, 50]
shrinkage_vals = [0.005, 0.01, 0.1]
Modify these settings as needed before running experiments.
To train a new ranking model, run:
python model_train_test.py
This script trains models based on the hyperparameters defined in config.py.
To rank documents using E5 embeddings:
python run_ranking_E5.py
This will generate ranked output based on the input queries.
To find the best-performing ranking model:
python baseline_model_choice.py
This script evaluates multiple models and saves ranking scores.
tommy_data.csvThis dataset contains historical ranking data. The format includes:
docno, query_id, round_no, username, position, current_document
feature_data_asrc_tommy.csvContains ranking features and labels for training. Sample columns:
query_id, docno, rank, score, rank_promotion
config.py based on experimentation.3 commits
Python
100.0%