Skip to content

Instantly share code, notes, and snippets.

# enhanced_pso_svr.py
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.preprocessing import MinMaxScaler
from pyswarms.discrete import BinaryPSO
from sklearn.svm import SVR
from scipy.stats import spearmanr
import matplotlib.pyplot as plt
import pandas as pd