import numpy as np
import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.linear_model import Ridge, Lasso, ElasticNet
from sklearn.metrics import mean_squared_error, r2_score
2.2 加载数据集
# # 加载糖尿病数据集
X, y = datasets.load_diabetes(return_X_y=True)
2.3 划分训练集和测试集
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)
题意:在OpenAI Gym环境中配置一个“Box”空间 问题背景:
I need an observation space ranging from [0,inf)
我需要一个观察空间,其范围是从 [0, ∞)(0到正无穷大) Im new to openai gym, and not sure what the fo…
一、基础:二叉树的遍历->图的遍历
提到搜索算法,就不得不说两个最基础的思想: BFS(Breadth First Search)广度优先搜索 DFS(Depth First Search)深度优先搜索
刚开始是在二叉树遍历中接触这…