3. Quanta Devlop and Systems Engineering
本章侧重于应用,且需要大量理论基础,如需理论基础,请参考 第四章。For Theoretical Theoretical 在量化过程中,我个人认为,有必要掌握的主要技能
数据的构建,决策树,层次分析(决策关联分析) (逻辑抽象,定义自变量)(类似于模拟信号)
数据的运筹编码(数据挖掘与统计学) (数字化) (数字信号)
数据流的架构设计(系统架构设计与反馈控制) (数字逻辑控制)
数据在传递过程中的再优化(离散数学,数值分析) (冗余去除,最短逻辑路径,数学化分析)
数据的规范化与持续集成(正则表达与占位,预留项) (快速定位和寻找)
3.1. Learn tree
3.1.1. Data Basic
3.1.1.1. 数据类型
3.1.1.2. 数据结构
3.1.2. The data Collector
3.1.2.1. Data Collector
No metter whatever data you want to input, They will end to insert your runing path(namespace), these data will Mapping in runing enviroment.
From the Local document(csv json)
import json,numpy,pandas
import matplotlib.pyplot as pic
path = input("please input your doc path")
data = pandas.read_csv("%s" % path)
print(data)
From the Stream(Network Stream(object stroge) or read the database.)
import oracledb,getpass,os
import pandas,numpy
import matplotlib.pyplot as pic
userpwd= getpass.getpass()
connection = oracledb.connect(
user="admin",
password=userpwd,
dsn="(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-tokyo-1.oraclecloud.com))(connect_data=(service_name=g5f10d71d826884_bigdatacenter_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))",
config_dir="auth/bdc",
wallet_location="auth/bdc",
wallet_password=userpwd
)
cursor = connection.cursor()
for data in cursor.execute(input("Please input your sqlcommand:")):
print(data,type(data))
cursor.close()
From Continuous input Data(Singal from the Audio and video data)
The troditional method is use ffmpeg to change Continuous Singal
#include <opencv2/opencv.hpp>
import cv2,numpy,pandas,ffmpeg
All in One
import oracledb,json,cv2,ffmpeg
import getpass,os
import pandas as pd
video = cv2.VideoCapture(0)
video = input('Please add your videopath:')
if video =="":
location = input("Please add your doc Location:")
if location =="":
#从云中读取数据
userpwd= getpass.getpass()
method=input("Please input data method:")
if method !="json":
connection = oracledb.connect(
user="Admin",
password=userpwd,
dsn="(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-tokyo-1.oraclecloud.com))(connect_data=(service_name=g5f10d71d826884_bigdatacenter_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))",
config_dir="~/auth/bdc",
wallet_location="~/auth/bdc",
wallet_password=userpwd
)
else:
connection = oracledb.connect(
user="Admin",
password=userpwd,
dsn="(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-tokyo-1.oraclecloud.com))(connect_data=(service_name=g5f10d71d826884_statuscenter_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))",
config_dir="~/auth/sc",
wallet_location="~/auth/sc",
wallet_password=userpwd
)
cursor = connection.cursor()
for data in cursor.execute(input("Please input your sqlcommand:")):
print(data,type(data))
cursor.close()
else:
data=pd.read_csv("%s" % location)
print(data,type(data))
else:
#channal1 =
#channal2 =
data = ffmpeg.input('')
3.1.2.2. 批量收集装置
Redis+pa.py+Node Spark ElasticSearch
3.1.2.3. 传递装置
elk套件 sockets通讯(Golang+json)
3.1.2.4. 离散数据库与数据融合
数据中心
边缘数据节点
去重与叠加
3.1.3. Data and Software Framework design
3.1.3.1. 人类决策行为与骨架架构设计
ISM方法
AHP方法
决策树
网络流理论
3.1.3.2. Factor and Function Design
3.1.3.3. 语言与控制装置、收集装置、反馈语言控制器
├── oracledb
│ ├── controller
│ │ ├── compute
│ │ │ ├── collector
│ │ │ │ ├── 2pic.py
│ │ │ │ ├── 3pic.py
│ │ │ │ ├── fig1.png
│ │ │ │ └── predata
│ │ │ │ ├── data.csv
│ │ │ │ ├── data.json
│ │ │ │ ├── data.py
│ │ │ │ ├── data.sql
│ │ │ │ ├── pa.py
│ │ │ │ └── sockets.go
│ │ │ ├── compare.py
│ │ │ ├── quantacompute.py
│ │ │ └── status.py
│ │ ├── controller.c
│ │ ├── controller.cpp
│ │ └── controller.py
│ └── otherpredata
│ ├── 1predocode
│ │ └── data
│ │ ├── Data_to_Transform.csv
C机器控制与优化
C++面向对象的程序控制
Go网络接口编程
Python&Rust工程脚本控制与工程数据控制
Other Contorler(Automate,esp8266→Machine Language)
3.1.3.4. 绘图与向量操作,向量控制
默认空间二维
#pic.py
from data import data
import matplotlib.pyplot as plt
import numpy as np
pre3 = data.head(3)
#自动绘图
pic = pre3.plot()
pic.figure.savefig('pic.png')
#以下为手动自定义自变量和因变量展现方式
print(pre3,type(pre3))
x1 = pre.loc[:,'Moderate Positive Skew']
x2 = pre.loc[:,'Highly Positive Skew']
x3 = pre.loc[:,'Highly Negative Skew']
x4 = pre.loc[:,:]
fig1.figure.savefig('fig.png',)
空间三维
解析几何基础
from data import data
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
pre = data.head(
int(input("Please input your Sample N="))
)
print(pre,type(pre))
x1 = pre.loc[:,'Moderate Positive Skew']
x2 = pre.loc[:,'Highly Positive Skew']
x3 = pre.loc[:,'Highly Negative Skew']
pltf = plt.figure(
)
fig1 = pltf.add_subplot(projection='3d').scatter(xs=x1,ys=x2,zs=x3,s=30,c="y",marker=".")
fig1.figure.savefig('fig1.png',)
高级前端DOM数据绘制(vue+echarts/three.js+Redis+DOMdata+dataV)
#example https://quantaunit.com
wget https://nodejs.org/dist/v20.10.0/node-v20.10.0-linux-x64.tar.xz #Please take care about the version from official website.
tar -xfc tar.xz
export PATH=/usr/local/lib/nodejs/bin:$PATH
#test if it possible to use
node -v
npm create vue@latest
#typescript=yes
cd <your-project-name>
npm datav,echarts... #(Please find those module in website and pull)
npm install #()
npm run dev #(5173 port dev application)
npm run build #(html will set in your ./dist