fix: 修复了test的部分错误

This commit is contained in:
mayge
2025-10-20 11:50:10 -04:00
parent 3294de2117
commit c17ecc24ca
4 changed files with 10 additions and 15 deletions

View File

@@ -1,6 +1 @@
1. 添加 A B C D 方法,对应不同的基
2. 修改Levi部分和sk迭代部分使用更通用的A B C D求解
3. 添加正交基形式
4. 加入多端口
5. 引入QR消除中间过程的残差求解降低算法复杂度
6. 使用最初始的表达式,获得无偏估计
请将 examples.tar.gz解压到此处

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ovf"
version = "0.1.5"
version = "0.1.6"
description = "A package for orthonormal basis and rational function fitting"
authors = [
{name = "M4yGem1ni", email = "M4yGem1ni@outlook.com"}

View File

@@ -1,7 +1,7 @@
from ovf.core.GVFManager import GVFManager
gvf = GVFManager.load("outputs/mtee_gvf.pkl")
# gvf = GVFManager()
# gvf.load_from_datasets("examples/data/capa.json",npoles_cplx=2,max_points=20)
# gvf.save("outputs/capa_gvf.pkl")
# gvf = GVFManager.load("outputs/mtee_gvf.pkl")
gvf = GVFManager()
gvf.load_from_datasets("examples/data/mtee.json",npoles_cplx=2,max_points=20)
gvf.save("outputs/mtee_gvf.pkl")
gvf.plot_poles("outputs/mtee_poles",degree=3,geometry_1="L1",geometry_2="L2")

View File

@@ -17,11 +17,11 @@ sampled_points = network.y.reshape(-1,ports,ports)
H,freqs = auto_select_multple_ports(noised_sampled_points,full_freqences,max_points=20)
def run_capa():
vf = VFManager(npoles_cplx=2,freqs=freqs,H=H,model=MultiPortOrthonormalBasis,iterations=K,verbose=False)
vf = VFManager(npoles_cplx=2,full_freqs=freqs,full_H=H,model=MultiPortOrthonormalBasis,iterations=K,verbose=False)
vf.fit()
vf.plot_metrics(show=False,save_path=f"outputs/{id}")
model_responses = vf.get_model_responses(full_freqences)
vf.plot_model_responses(show=False,save_path=f"outputs/{id}")
vf.plot_model_responses(full_freqs=freqs,show=False,save_path=f"outputs/{id}")
# vf.export(f"outputs/{id}")
vf.write(f"outputs/{id}")
@@ -30,7 +30,7 @@ def load_model():
vf.plot_metrics(show=False,save_path=f"outputs/3001")
model_responses = vf.get_model_responses(full_freqences)
vf.plot_model_responses(show=False,save_path=f"outputs/3001")
vf.plot_model_responses(full_freqs=freqs,show=False,save_path=f"outputs/3001")
# vf.export(f"outputs/{id}")
vf.write(f"outputs/3001")
@@ -39,7 +39,7 @@ def load_model1():
vf.plot_metrics(show=False,save_path=f"outputs/3002")
model_responses = vf.get_model_responses(full_freqences)
vf.plot_model_responses(show=False,save_path=f"outputs/3002")
vf.plot_model_responses(full_freqs=freqs,show=False,save_path=f"outputs/3002")
# vf.export(f"outputs/{id}")
vf.write(f"outputs/3002")