Created
February 3, 2020 16:36
-
-
Save Valenzione/e5706d7cc27a7e4f82812c72ce7db622 to your computer and use it in GitHub Desktop.
python
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 sys | |
import os | |
import numpy as np | |
import pandas as pd | |
from tqdm.auto import tqdm | |
import matplotlib.pyplot as plt | |
from scipy.spatial.distance import pdist, squareform | |
from itertools import chain | |
from catboost import CatBoostRegressor | |
from lightgbm import LGBMRegressor | |
from scipy.signal import find_peaks | |
from scipy.stats import mode | |
os.environ["CUDA_VISIBLE_DEVICES"] = "0" | |
train_df = pd.read_csv("../data/train.csv", index_col="id") | |
train_df['epoch'] = pd.to_datetime(train_df['epoch']) | |
test_df = pd.read_csv("../data/test.csv", index_col="id") | |
test_sats = test_df['sat_id'].unique() | |
for sat_id in test_sats: | |
train_subset = train_df[train_df['sat_id'] == sat_id] | |
assert train_subset['epoch'].is_monotonic | |
train_df.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment