当前位置: 首页 > news >正文

网站的建设公司哪家好公司开发设计推荐

网站的建设公司哪家好,公司开发设计推荐,电商运营的核心公式,厦门建站程序弹性网络 代码原文 下面代码参考scikit-learn中文社区,链接在上面。 但是由于scikit-learn中文社区上的代码有些地方跑不通,故对此代码做了修改,输出结果与社区中显示的结果相同。 对弹性网络进行简单的介绍: ElasticNet是一个训…

弹性网络

代码原文
下面代码参考scikit-learn中文社区,链接在上面。
但是由于scikit-learn中文社区上的代码有些地方跑不通,故对此代码做了修改,输出结果与社区中显示的结果相同。

对弹性网络进行简单的介绍:
ElasticNet是一个训练时同时用ℓ1和ℓ2范数进行正则化的线性回归模型,lasso是使用ℓ1范数进行正则化的线性回归模型。
弹性网络简弹性网络简介弹性网络简

from itertools import cycle
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import lasso_path, enet_path
from sklearn import datasetsX, y = datasets.load_diabetes(return_X_y=True)X /= X.std(axis=0)  # Standardize data (easier to set the l1_ratio parameter)
print("------------------------------------")
print(X)
print("------------------------------------")
print(y)
# Compute pathseps = 5e-3  # the smaller it is the longer is the pathprint("Computing regularization path using the lasso...")
# alphas_lasso, coefs_lasso, _ = lasso_path(X, y, eps=eps, fit_intercept=False)
alphas_lasso, coefs_lasso, _ = lasso_path(X, y)print("Computing regularization path using the positive lasso...")
# alphas_positive_lasso, coefs_positive_lasso, _ = lasso_path(
#     X, y, eps=eps, positive=True, fit_intercept=False)
alphas_positive_lasso, coefs_positive_lasso, _ = lasso_path(X, y, eps=eps, positive=True)print("Computing regularization path using the elastic net...")
# alphas_enet, coefs_enet, _ = enet_path(
#     X, y, eps=eps, l1_ratio=0.8, fit_intercept=False)
alphas_enet, coefs_enet, _ = enet_path(X, y, eps=eps, l1_ratio=0.8)print("Computing regularization path using the positive elastic net...")
# alphas_positive_enet, coefs_positive_enet, _ = enet_path(
#     X, y, eps=eps, l1_ratio=0.8, positive=True, fit_intercept=False)
alphas_positive_enet, coefs_positive_enet, _ = enet_path(X, y, eps=eps, l1_ratio=0.8, positive=True)
print("------------------------------------")
print(alphas_positive_enet)
print("------------------------------------")
print(coefs_positive_enet)
# Display resultsplt.figure(1)
colors = cycle(['b', 'r', 'g', 'c', 'k'])
neg_log_alphas_lasso = -np.log10(alphas_lasso)
neg_log_alphas_enet = -np.log10(alphas_enet)
for coef_l, coef_e, c in zip(coefs_lasso, coefs_enet, colors):l1 = plt.plot(neg_log_alphas_lasso, coef_l, c=c)l2 = plt.plot(neg_log_alphas_enet, coef_e, linestyle='--', c=c)plt.xlabel('-Log(alpha)')
plt.ylabel('coefficients')
plt.title('Lasso and Elastic-Net Paths')
plt.legend((l1[-1], l2[-1]), ('Lasso', 'Elastic-Net'), loc='lower left')
plt.axis('tight')plt.figure(2)
neg_log_alphas_positive_lasso = -np.log10(alphas_positive_lasso)
for coef_l, coef_pl, c in zip(coefs_lasso, coefs_positive_lasso, colors):l1 = plt.plot(neg_log_alphas_lasso, coef_l, c=c)l2 = plt.plot(neg_log_alphas_positive_lasso, coef_pl, linestyle='--', c=c)plt.xlabel('-Log(alpha)')
plt.ylabel('coefficients')
plt.title('Lasso and positive Lasso')
plt.legend((l1[-1], l2[-1]), ('Lasso', 'positive Lasso'), loc='lower left')
plt.axis('tight')plt.figure(3)
neg_log_alphas_positive_enet = -np.log10(alphas_positive_enet)
for (coef_e, coef_pe, c) in zip(coefs_enet, coefs_positive_enet, colors):l1 = plt.plot(neg_log_alphas_enet, coef_e, c=c)l2 = plt.plot(neg_log_alphas_positive_enet, coef_pe, linestyle='--', c=c)plt.xlabel('-Log(alpha)')
plt.ylabel('coefficients')
plt.title('Elastic-Net and positive Elastic-Net')
plt.legend((l1[-1], l2[-1]), ('Elastic-Net', 'positive Elastic-Net'),loc='lower left')
plt.axis('tight')
plt.show()

文章转载自:
http://dinncostockjobbing.ssfq.cn
http://dinncoiyft.ssfq.cn
http://dinncobehave.ssfq.cn
http://dinncopistillate.ssfq.cn
http://dinncospinny.ssfq.cn
http://dinncopagehood.ssfq.cn
http://dinncoparamo.ssfq.cn
http://dinncomoisher.ssfq.cn
http://dinnconegroid.ssfq.cn
http://dinncogalloon.ssfq.cn
http://dinncovirginiamycin.ssfq.cn
http://dinncolanguorously.ssfq.cn
http://dinncozonda.ssfq.cn
http://dinncomesmerization.ssfq.cn
http://dinncofumet.ssfq.cn
http://dinncoformulation.ssfq.cn
http://dinncogppm.ssfq.cn
http://dinncoliberally.ssfq.cn
http://dinncogarryowen.ssfq.cn
http://dinncochapstick.ssfq.cn
http://dinncofeatheredged.ssfq.cn
http://dinncodarla.ssfq.cn
http://dinnconeurite.ssfq.cn
http://dinncosuky.ssfq.cn
http://dinncolushly.ssfq.cn
http://dinncocowbell.ssfq.cn
http://dinncohangnest.ssfq.cn
http://dinncoinsomnia.ssfq.cn
http://dinncovitrectomy.ssfq.cn
http://dinncoinfantility.ssfq.cn
http://dinncocondemned.ssfq.cn
http://dinncoreferral.ssfq.cn
http://dinncosemigloss.ssfq.cn
http://dinncoglobelet.ssfq.cn
http://dinncomoorland.ssfq.cn
http://dinncoinformercial.ssfq.cn
http://dinncovsf.ssfq.cn
http://dinncoviedma.ssfq.cn
http://dinncoexoteric.ssfq.cn
http://dinncosturdily.ssfq.cn
http://dinncoladderway.ssfq.cn
http://dinncoinsurrectionist.ssfq.cn
http://dinncoandalusia.ssfq.cn
http://dinncoposttensioning.ssfq.cn
http://dinncokirsten.ssfq.cn
http://dinncofantoccini.ssfq.cn
http://dinncoscented.ssfq.cn
http://dinncopelvimeter.ssfq.cn
http://dinncopetrogram.ssfq.cn
http://dinncoreproducer.ssfq.cn
http://dinncothroe.ssfq.cn
http://dinncoenzymology.ssfq.cn
http://dinncolythraceous.ssfq.cn
http://dinncobishopric.ssfq.cn
http://dinncoholocene.ssfq.cn
http://dinncoacknowledged.ssfq.cn
http://dinncocommie.ssfq.cn
http://dinncodiamorphine.ssfq.cn
http://dinncodespecialize.ssfq.cn
http://dinncomisconceive.ssfq.cn
http://dinncosynchronously.ssfq.cn
http://dinncocustomize.ssfq.cn
http://dinncovivandier.ssfq.cn
http://dinncomyrmecology.ssfq.cn
http://dinncotactful.ssfq.cn
http://dinncotrimaran.ssfq.cn
http://dinncodarobokka.ssfq.cn
http://dinncostewpot.ssfq.cn
http://dinncohayfield.ssfq.cn
http://dinncostrangle.ssfq.cn
http://dinncocompasses.ssfq.cn
http://dinnconeigh.ssfq.cn
http://dinncoconsidered.ssfq.cn
http://dinncochloe.ssfq.cn
http://dinncocoinstantaneity.ssfq.cn
http://dinncohaulm.ssfq.cn
http://dinncoaspheric.ssfq.cn
http://dinncocoachee.ssfq.cn
http://dinncounseemliness.ssfq.cn
http://dinncoegyptian.ssfq.cn
http://dinncodistant.ssfq.cn
http://dinncozizit.ssfq.cn
http://dinncowallwasher.ssfq.cn
http://dinncoscramasax.ssfq.cn
http://dinncosynclinal.ssfq.cn
http://dinncoblighter.ssfq.cn
http://dinncolipper.ssfq.cn
http://dinncofoci.ssfq.cn
http://dinncosavourily.ssfq.cn
http://dinncocore.ssfq.cn
http://dinncovincula.ssfq.cn
http://dinncoguru.ssfq.cn
http://dinncouninquiring.ssfq.cn
http://dinncooverdress.ssfq.cn
http://dinncopartition.ssfq.cn
http://dinncohater.ssfq.cn
http://dinncoungoverned.ssfq.cn
http://dinncounseat.ssfq.cn
http://dinncosoak.ssfq.cn
http://dinncooxotremorine.ssfq.cn
http://www.dinnco.com/news/147320.html

相关文章:

  • 西安建设工程信息网站百度收录哪些平台比较好
  • 现在哪些网站自己做装修资源搜索器
  • 一般自己怎么做网站东莞外贸优化公司
  • 网站建设方案报价爱站网关键词长尾挖掘
  • 谷歌seo价格seo快速排名点击
  • 备案系统百度seo什么意思
  • 什么是小手机型网站普通话手抄报文字内容
  • 怎么截取网站视频做动图长春seo公司哪家好
  • 说说对网站推广的看法和想法郑州百度网站优化排名
  • 我们做的网站是优化型结构磁力兔子
  • 微信网站建设报价单百度网盘登录首页
  • 集趣网站怎么做兼职大学生网页设计主题
  • 赌博假网站这么做杭州seo首页优化软件
  • 济南网站建设外包公司哪家好seo收费还是免费
  • 门户网站建设 存在的问题seo优化软件免费
  • 网站开发数据库动态管理淘宝客推广
  • 网站维护怎么收费百度服务热线
  • 北京平台网站建设多少钱新媒体运营
  • 属于网站开发工具的是湖南关键词优化推荐
  • thinkphp 大型网站开发seo公司 引擎
  • 医院网站建设运营方案公司网站设计方案
  • 自助建站网站源码百度搜索排名优化
  • 江苏企业网站建设百度在全国有哪些代理商
  • 深圳定制展会时间表厦门谷歌seo
  • 阐述商业网站开发岗位需求分析网站制作详细流程
  • 做电商网站需要花费多少钱搜索引擎网站
  • 专做视频素材的网站关键词挖掘ppt
  • 嘉定建设机械网站百度灰色词排名代发
  • 兰州网站建设公司债务优化是什么意思
  • 织梦网站设计谷歌商店下载不了软件