Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsdfc committed Mar 6, 2023
1 parent 61469be commit 78f2698
Show file tree
Hide file tree
Showing 30 changed files with 9 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ __pycache__/
/tmp/
/.cache/
/output/
.DS_Store
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
# 20220901 项目:异常值检测可视化

纪要:
1. 可视化形式要多样,多种图形;
2. 后台的代码找现成的Python代码,确保有几个基于聚类的方法;
3. 前端基于pyqt;

https://github.com/yzhao062/pyod

https://pyod.readthedocs.io/en/latest/example.html

生成仿真数据

https://pyod.readthedocs.io/en/latest/pyod.utils.html#pyod.utils.data.generate_data

所有模型

https://pyod.readthedocs.io/en/latest/pyod.models.html


模型列表
```
'ABOD',
'AutoEncoder',
'CBLOF',
'HBOS',
'IForest',
'KNN',
'LOF',
'MCD',
'OCSVM',
'PCA'
```
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from Application import MyWindow, QtWidgets
from src.Application import MyWindow, QtWidgets

if __name__ == "__main__":
import sys
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
1 change: 0 additions & 1 deletion scripts/compile-res.cmd

This file was deleted.

1 change: 0 additions & 1 deletion scripts/compile-ui.cmd

This file was deleted.

1 change: 0 additions & 1 deletion scripts/designer.cmd

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/package-exe.cmd

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/setup-env.cmd

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/start-ui.cmd

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/update-pip.cmd

This file was deleted.

6 changes: 3 additions & 3 deletions Application.py → src/Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import traceback
from typing import Callable, Dict
from UserInterface import *
from src.UserInterface import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QThread
from PyQt5.QtWidgets import (
Expand All @@ -39,7 +39,7 @@
QCheckBox,
)
from PyQt5.QtGui import QIntValidator, QDoubleValidator
from OutlierDetect import MODEL_ZOO, DataConfig, DetectionEvaluator, ModelConfig
from src.OutlierDetect import MODEL_ZOO, DataConfig, DetectionEvaluator, ModelConfig
import logging

logging.basicConfig(level=logging.INFO)
Expand All @@ -64,7 +64,7 @@ def __init__(self):
self.ui.cbModelName.addItems(MODEL_ZOO.model_list)
self.ui.cbModelName.setCurrentText('KNN')

from NAME import NAME
from src.NAME import NAME
self.ui.centralwidget.setWindowTitle(NAME)

self.ui.leNumTrain.setText(str(self.data_config.n_train))
Expand Down
2 changes: 1 addition & 1 deletion Batch.py → src/Batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

from pathlib import Path as P
from OutlierDetect import *
from src.OutlierDetect import *

OUTPUT_DIR = ensure_dir(PROJ_DIR.joinpath('output'))

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion OutlierDetect.py → src/OutlierDetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def ensure_dir(dir: P):
EAGER = os.getenv('ODQT_EAGER', '')
if EAGER:
LOG.info('EAGER loading pyod modules...')
import PYODLIBS
import src.PYODLIBS as PYODLIBS
LOG.info('Done')
else:
PYODLIBS = None
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion UserInterface.py → src/UserInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def retranslateUi(self, MainWindow):
self.label_6.setText(_translate("MainWindow", "随机种子"))
self.groupBox.setTitle(_translate("MainWindow", "检测结果"))
self.pbRunDetect.setText(_translate("MainWindow", "检测"))
import res_rc
import src.res_rc as res_rc


if __name__ == "__main__":
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package-exe.py → tools/package-exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import os

# NAME = '异常流量数据分析软件'
from NAME import NAME
from src.NAME import NAME

os.system(f'python scripts/convert-ico.py ./desk.png')
os.system(
Expand Down
File renamed without changes.

0 comments on commit 78f2698

Please sign in to comment.