diff options
author | scratko <m@scratko.xyz> | 2025-08-03 02:28:24 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2025-08-03 02:56:54 +0300 |
commit | ef8a3f6c3e20178ee520f1e6bedbc866e3c9b490 (patch) | |
tree | cbdea78c5c54e5dda4a8eb9c8a0d42091a27448c /mymodule.py | |
download | artifical-text-detection-master.tar.gz artifical-text-detection-master.tar.bz2 artifical-text-detection-master.zip |
Diffstat (limited to 'mymodule.py')
-rwxr-xr-x | mymodule.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mymodule.py b/mymodule.py new file mode 100755 index 0000000..0e6e259 --- /dev/null +++ b/mymodule.py @@ -0,0 +1,19 @@ +import numpy as np
+from sklearn_extra.cluster import KMedoids
+from sklearn.svm import OneClassSVM
+
+def featureSelection(x):
+ return np.percentile(x, np.arange(10,100,10))
+
+def MyFunc(t_end):
+ print (t_end)
+ kmedoids = KMedoids (n_clusters = 2, random_state = 0).fit(t_end)
+ result = kmedoids.labels_
+ print(result)
+ return result
+
+def SVM(X):
+ clf = OneClassSVM(kernel = 'rbf', gamma=0.01, nu=0.4).fit(X)
+ print(clf.predict(X))
+
+
\ No newline at end of file |