Exception calculating properties for model swagger-ui的model字段不显示问题

2020-12-15 10:17:00.952  WARN 11056 --- [  restartedMain] s.d.s.p.CachingModelPropertiesProvider   : Exception calculating properties for model(com.cjw.javaWebFunAll.module.chandao.staff.StaffCreateDto) -> ModelContext{groupName=default, type=com.cjw.javaWebFunAll.module.chandao.staff.StaffCreateDto, isReturnType=false, view=Optional.empty}. null

用百度搜不到答案,故发此博客帮助后人

别用懒加载就好

spring.main.lazy-initialization=false

github上有人提了bug了

https://github.com/springfox/springfox/issues/2992

  • 7
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
Here is an example Python code for Uplift model with low-rank regularization logistic regression for multiple correlated binary responses and calculating Individual Treatment Effect (ITE). ```python import numpy as np from sklearn.linear_model import LogisticRegression from scipy.optimize import minimize def fit_low_rank_regression(X, Y, Z, r=10, alpha=0.01): n, p = X.shape q = Y.shape[1] U, s, Vt = np.linalg.svd(Z) U = U[:, :r] Vt = Vt[:r, :] S_inv = np.diag(1/s[:r]) X_tilde = U.T @ X @ Vt.T Y_tilde = U.T @ Y model = LogisticRegression(penalty='none', solver='lbfgs') beta = np.zeros((p, q)) for j in range(q): beta[:, j] = model.fit(X_tilde, Y_tilde[:, j]).coef_ beta = Vt.T @ beta @ S_inv return beta def estimate_ite(X, Y, Z, delta): p = X.shape[1] beta = fit_low_rank_regression(X, Y, Z) eta = X @ beta Y_pred = np.exp(eta)/(1+np.exp(eta)) ite = np.zeros(p) for i in range(p): Y_treat = Y_pred.copy() Y_treat[:, i] = np.exp(eta[:, i] + delta)/(1+np.exp(eta[:, i] + delta)) ite[i] = np.mean(Y_treat - Y_pred) return ite ``` Input: - `X`: the matrix of features (n x p) - `Y`: the matrix of binary responses (n x q) - `Z`: the matrix of treatment indicators (n x r) - `delta`: the treatment effect for each feature (p x 1) Output: - `ite`: the Individual Treatment Effect for each feature (p x 1) Example usage: ```python # generate synthetic data n = 1000 p = 5 q = 3 r = 2 X = np.random.normal(size=(n, p)) Z = np.random.binomial(n=1, p=0.5, size=(n, r)) beta_true = np.random.normal(size=(p, q)) Y_true = (X @ beta_true) * Z + np.random.normal(size=(n, q)) delta_true = np.random.normal(size=(p, 1)) # estimate ITE ite = estimate_ite(X, Y_true, Z, delta_true) print(ite) ```
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值