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

自己建网站怎么做seo网络营销策划书怎么写

自己建网站怎么做seo,网络营销策划书怎么写,在杭州注册公司需要什么条件,阿里巴巴国际站做2个网站有用吗记录了使用for循环实现网格搜索的简单框架。 使用df_search记录每种超参数组合下的运行结果。 lgb_model.best_score返回模型的最佳得分 lgb_model.best_iteration_返回模型的最佳iteration也就是最佳n_extimator import numpy as np import pandas as pd import lightgbm as …

记录了使用for循环实现网格搜索的简单框架。
使用df_search记录每种超参数组合下的运行结果。
lgb_model.best_score返回模型的最佳得分
lgb_model.best_iteration_返回模型的最佳iteration也就是最佳n_extimator

import numpy as np
import pandas as pd
import lightgbm as lgbdf = pd.read_csv("this_is_train.csv")
df_search_columns = ['learning_rate', 'num_leaves', 'max_depth','subsample','colsample_bytree','best_iteration','best_score']
df_search =  pd.DataFrame(columns=df_search_columns )
# colsample_bytree :0.9, learning_rate : 0.001
lgb_params = {"objective": "mae", # "mae""n_estimators": 6000,"num_leaves": 256, # 256"subsample": 0.6,"colsample_bytree": 0.8,"learning_rate": 0.00571, # 0.00871'max_depth': 11, # 11"n_jobs": 4,"device": "gpu","verbosity": -1,"importance_type": "gain",
}
for learning_rate in [0.001,0.005,0.01,0.015,0.05]:for num_leaves in [300,256,200,150]:for max_depth in [15,13,11,9,7]:for subsample in [0.8,0.6,0.5]:for colsample_bytree in [0.9,0.8,0.7]:print(f"learning_rate : {learning_rate}, num_leaves : {num_leaves}, max_depth:{max_depth}, subsample : {subsample}, colsample_bytree : {colsample_bytree}")lgb_params['learning_rate'] = learning_ratelgb_params['num_leaves'] = num_leaveslgb_params['max_depth'] = max_depthlgb_params['subsample'] = subsamplelgb_params['colsample_bytree'] = colsample_bytree# Train a LightGBM model for the current foldlgb_model = lgb.LGBMRegressor(**lgb_params)lgb_model.fit(train_feats,train_target,eval_set=[(valid_feats, valid_target)],callbacks=[lgb.callback.early_stopping(stopping_rounds=100),lgb.callback.log_evaluation(period=100),],)best_iteration = lgb_model.best_iteration_best_score = lgb_model.best_score_cache = pd.DataFrame([[learning_rate,num_leaves,max_depth,subsample,colsample_bytree,best_iteration,best_score]],columns=['learning_rate', 'num_leaves', 'max_depth','subsample','colsample_bytree','best_iteration','best_score'])df_search = pd.concat([df_search, cache], ignore_index=True, axis=0)
df_search.to_csv('grid_search.csv',index=False)

使用该框架,需要调整训练数据df部分,以及进行网格的备选数据和lightgbm的超参数。
每次运行的数据通过一下代码进行记录

cache = pd.DataFrame([[learning_rate,num_leaves,max_depth,subsample,colsample_bytree,best_iteration,best_score]],\columns=df_search_columns )
df_search = pd.concat([df_search, cache], ignore_index=True, axis=0)
http://www.tj-hxxt.cn/news/27182.html

相关文章:

  • 东华网站开发北京朝阳区优化
  • 直播类网站开发营销策划案的模板
  • 中国农村建设网站广告优化师前景怎样
  • 在线做交互网站整站外包优化公司
  • 电子商务网站建设教学星沙网站优化seo
  • 转运公司网站建设国内做seo最好的公司
  • 哪个网站可以悬赏做图什么是营销型网站?
  • 现在的网站开发用什么技术网站制作app免费软件
  • 制作小程序营销平台seo网站优化师
  • 沧州省建设厅网站网络营销八大目标是什么
  • 招远专业做网站公司平台交易网
  • 动漫制作专业可以考公务员吗seo网站优化外包
  • 重庆疫情最新消息今天优化营商环境存在问题及整改措施
  • 怎么通过局域网建设网站品牌网络推广运营公司
  • 内衣网站建立站长工具下载app
  • 手机wap网站如何建设济南网站制作公司
  • 中小企业网站建设精准营销
  • 重庆网站建设设计广西壮族自治区
  • 深圳做自适应网站设计谷歌官方网站首页
  • 企业建网站有这个必要吗mac蜜桃923色号
  • 学做网站需要懂什么流量点击推广平台
  • 广饶网站设计百度推广电话销售好做吗
  • 铝木门窗网站建设怎么自己注册网站平台了
  • 网站维护工程师月薪多少西安百度关键词排名服务
  • 上海网站制作建设怎么样seo排名优化seo
  • 北京高端网页制作自动优化句子的软件
  • wordpress提交表单seo评测论坛
  • 凡科做网站怎么样关键词代发包收录
  • 虞城做网站网站服务器搭建与管理
  • 客户型网站域名注册多少钱