I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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 pandas as pd | |
def transform_to_supervised(df, | |
previous_steps=1, | |
forecast_steps=1, | |
dropnan=True): | |
""" | |
Transforms a DataFrame containing time series data into a DataFrame | |
containing data suitable for use as a supervised learning problem. |
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
_ | |
_._ _..._ .-', _.._(`)) | |
'-. ` ' /-._.-' ',/ | |
) \ '. | |
/ _ _ | \ | |
| a a / | | |
\ .-. ; | |
'-('' ).-' ,' ; | |
'-; | .' | |
\ \ / |
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
cmake_minimum_required(VERSION 2.8.4) | |
project(py1) | |
find_package(PythonLibs REQUIRED) | |
include_directories(${PYTHON_INCLUDE_DIRS}) | |
ADD_DEFINITIONS( -std=c++11 ) | |
set(SOURCE_FILES main.cpp) |