Pythonで作られた自作のモジュールのパッケージ化について調べました。
自作ライブラリをProjectのフォルダーの中に入れずに利用できるようにする
- Python 3.0以上
# A way of reproducing https://github.com/ros2/rviz/issues/322 | |
# | |
# Code source: | |
# https://github.com/SebastianGrans/ROS2-Point-Cloud-Demo/blob/79ef97fc92147a0d550543a69541139097cc3b35/pcd_demo/pcd_publisher/pcd_publisher_node.py | |
import rclpy | |
from rclpy.node import Node | |
import sensor_msgs.msg as sensor_msgs | |
import std_msgs.msg as std_msgs |
from emukit.core.interfaces import IModel, IDifferentiable | |
import numpy as np | |
from typing import Union | |
class DynamicNegativeLowerConfidenceBound(NegativeLowerConfidenceBound): | |
def __init__(self, model: Union[IModel, IDifferentiable],input_space_size: int, delta: float) -> None: | |
""" | |
This acquisition computes the negative lower confidence bound for a given input point. This is the same | |
as optimizing the upper confidence bound if we would maximize instead of minimizing the objective function. | |
For information as well as some theoretical insights see: | |
Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design |