This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"league": { | |
"name": "Premier League" | |
}, | |
"clubs": [ | |
{ | |
"name": "Manchester United", | |
"founded_year": 1878 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Import statements and environment setup | |
import os | |
import random | |
import warnings | |
from typing import Callable, Tuple | |
import matplotlib.pyplot as plt | |
import neptune | |
import numpy as np | |
import tensorflow as tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import warnings | |
import neptune | |
from dotenv import load_dotenv | |
from lightgbm import LGBMClassifier | |
from xgboost import XGBClassifier | |
from sklearn.datasets import make_classification | |
from sklearn.model_selection import train_test_split |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gymnasium as gym | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from moviepy.editor import ImageSequenceClip | |
def create_environment(env_name='Taxi-v3', render_mode='rgb_array'): | |
"""Create and return a Gymnasium environment.""" | |
return gym.make(env_name, render_mode=render_mode) | |
def initialize_q_table(env): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please, run the following GitHub gist first: https://gist.github.com/BexTuychiev/00b665c256351a63cca0512b1cd6d220 | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.ticker import ScalarFormatter | |
# Read the CSV file | |
data = pd.read_csv("optimization_results.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import numpy as np | |
import pandas as pd | |
import time | |
from tabulate import tabulate # pip install tabulate | |
np.random.seed(42) | |
# Load and prepare data | |
dataset_size = 20_000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import warnings | |
warnings.filterwarnings("ignore") | |
np.random.seed(42) | |
# Load the data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import warnings | |
warnings.filterwarnings("ignore") | |
np.random.seed(42) | |
# Load the data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import warnings | |
warnings.filterwarnings("ignore") | |
np.random.seed(42) | |
# Load the data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import warnings | |
warnings.filterwarnings("ignore") | |
np.random.seed(42) | |
# Load the data |
NewerOlder