Add All Folders

This commit is contained in:
soorena62
2026-02-08 04:38:10 +03:30
commit 9bb57e4799
191 changed files with 8469 additions and 0 deletions
@@ -0,0 +1,47 @@
from sklearn.utils import resample, shuffle
class preprocessing:
def __init__(self,X):
self.X = X
# def SelectAlg(self):
# import json
# f = open('data.json')
# JSONdata = json.load(f)
# f.close()
# algn = self.AlgName
# if self.AlgName == "resample":
# self.Vs_resample(
# JSONdata[algn][0],
# JSONdata[algn][1]
# )
# elif self.AlgName == "shuffle":
# self.Vs_shuffle(
# JSONdata[algn][0],
# JSONdata[algn][1]
# )
# else:
# print("Algorithm name is wrong")
def Vs_resampling(self,str=False,rep=False):
if str:
x2 = resample(self.X , replace=rep)
else:
x2 = resample(self.X , replace=rep)
return x2
def Vs_shuffling(self):
x2 = shuffle(self.X)
return x2