All Projects → noahgift → spot_price_machine_learning

noahgift / spot_price_machine_learning

Licence: MIT license
Machine Learning for Spot Prices

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to spot price machine learning

Data Science Projects With Python
A Case Study Approach to Successful Data Science Projects Using Python, Pandas, and Scikit-Learn
Stars: ✭ 198 (+692%)
Mutual labels:  scikit-learn, pandas
PracticalMachineLearning
A collection of ML related stuff including notebooks, codes and a curated list of various useful resources such as books and softwares. Almost everything mentioned here is free (as speech not free food) or open-source.
Stars: ✭ 60 (+140%)
Mutual labels:  scikit-learn, pandas
Kagglestruggle
Kaggle Struggle
Stars: ✭ 228 (+812%)
Mutual labels:  scikit-learn, pandas
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+8688%)
Mutual labels:  scikit-learn, pandas
Trajectory-Analysis-and-Classification-in-Python-Pandas-and-Scikit-Learn
Formed trajectories of sets of points.Experimented on finding similarities between trajectories based on DTW (Dynamic Time Warping) and LCSS (Longest Common SubSequence) algorithms.Modeled trajectories as strings based on a Grid representation.Benchmarked KNN, Random Forest, Logistic Regression classification algorithms to classify efficiently t…
Stars: ✭ 41 (+64%)
Mutual labels:  scikit-learn, knn
Cheatsheets.pdf
📚 Various cheatsheets in PDF
Stars: ✭ 159 (+536%)
Mutual labels:  scikit-learn, pandas
Eland
Python Client and Toolkit for DataFrames, Big Data, Machine Learning and ETL in Elasticsearch
Stars: ✭ 235 (+840%)
Mutual labels:  scikit-learn, pandas
Dat8
General Assembly's 2015 Data Science course in Washington, DC
Stars: ✭ 1,516 (+5964%)
Mutual labels:  scikit-learn, pandas
Artificial Intelligence Deep Learning Machine Learning Tutorials
A comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
Stars: ✭ 2,966 (+11764%)
Mutual labels:  scikit-learn, pandas
Datacamp Python Data Science Track
All the slides, accompanying code and exercises all stored in this repo. 🎈
Stars: ✭ 250 (+900%)
Mutual labels:  scikit-learn, pandas
Python Cheat Sheet
Python Cheat Sheet NumPy, Matplotlib
Stars: ✭ 1,739 (+6856%)
Mutual labels:  scikit-learn, pandas
Algorithmic-Trading
Algorithmic trading using machine learning.
Stars: ✭ 102 (+308%)
Mutual labels:  scikit-learn, pandas
Practical Machine Learning With Python
Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Stars: ✭ 1,868 (+7372%)
Mutual labels:  scikit-learn, pandas
Mars
Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
Stars: ✭ 2,308 (+9132%)
Mutual labels:  scikit-learn, pandas
Pbpython
Code, Notebooks and Examples from Practical Business Python
Stars: ✭ 1,724 (+6796%)
Mutual labels:  scikit-learn, pandas
Jetson Containers
Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
Stars: ✭ 223 (+792%)
Mutual labels:  scikit-learn, pandas
Pymc Example Project
Example PyMC3 project for performing Bayesian data analysis using a probabilistic programming approach to machine learning.
Stars: ✭ 90 (+260%)
Mutual labels:  scikit-learn, pandas
Studybook
Study E-Book(ComputerVision DeepLearning MachineLearning Math NLP Python ReinforcementLearning)
Stars: ✭ 1,457 (+5728%)
Mutual labels:  scikit-learn, pandas
Orange3
🍊 📊 💡 Orange: Interactive data analysis
Stars: ✭ 3,152 (+12508%)
Mutual labels:  scikit-learn, pandas
dlime experiments
In this work, we propose a deterministic version of Local Interpretable Model Agnostic Explanations (LIME) and the experimental results on three different medical datasets shows the superiority for Deterministic Local Interpretable Model-Agnostic Explanations (DLIME).
Stars: ✭ 21 (-16%)
Mutual labels:  scikit-learn, knn

CircleCI CircleCI Build Status

AWS Spot Price Machine Learning Tools

Machine Learning for Spot Prices Command-Line Tool and Jupyter Notebook. This material is covered in Chapter 9 of Pragmatic AI

Pragmatic AI Labs

alt text

You can continue learning about these topics by:

Contains two command-line tools

TO DO

  • Linear Optimization using Pyomo
  • Documentation

Assumptions, AWS account and/or profile with credentials.

[happygolucky]

aws_access_key_id =

aws_secret_access_key =

Running lint and tests

To make sure it works, do something like below:

make setup && make install

source <your virtualenv> (not required)

make lint

make test Runs Jupyter notebook test of project

Problems Solved: Recommended Spot Instances and Finding Deals

Describe Spot Instances by Median Price History and Price per ECU

(.pragia-aws) ➜  pragai-aws git:(master) ✗ ./spot-price-ml.py describe
              SpotPrice  price_ecu_spot  cluster  price_memory_spot
InstanceType                                                       
r4.xlarge         0.033           0.002        0              0.001
r4.large          0.017           0.002        0              0.001
r4.2xlarge        0.061           0.002        0              0.001
c3.2xlarge        0.098           0.003        1              0.007
r4.4xlarge        0.158           0.003        0              0.001
r3.xlarge         0.044           0.003        0              0.001
m4.4xlarge        0.185           0.003        0              0.003
m3.xlarge         0.043           0.003        0              0.003
m3.medium         0.009           0.003        0              0.002
c3.4xlarge        0.175           0.003        1              0.006
c3.8xlarge        0.368           0.003        1              0.006
cc2.8xlarge       0.344           0.004        1              0.006
r4.8xlarge        0.385           0.004        0              0.002
c3.large          0.027           0.004        1              0.007
c3.xlarge         0.053           0.004        1              0.007
r4.16xlarge       0.805           0.004        0              0.002
c4.2xlarge        0.125           0.004        1              0.008
c4.xlarge         0.057           0.004        1              0.008
m4.16xlarge       0.712           0.004        0              0.003
m4.10xlarge       0.440           0.004        0              0.003
c4.4xlarge        0.265           0.004        1              0.009
m3.2xlarge        0.094           0.004        0              0.003
c4.8xlarge        0.558           0.004        1              0.009
m4.2xlarge        0.133           0.005        0              0.004
m4.xlarge         0.062           0.005        0              0.004
g3.4xlarge        0.247           0.005        0              0.002
r3.4xlarge        0.237           0.005        0              0.002
r3.8xlarge        0.668           0.006        0              0.003
d2.4xlarge        0.319           0.006        0              0.003
x1.32xlarge       1.998           0.006        2              0.001
r3.2xlarge        0.195           0.007        0              0.003
i2.4xlarge        0.416           0.008        0              0.003
g3.8xlarge        0.762           0.008        0              0.003
i2.8xlarge        0.848           0.008        0              0.003
x1.16xlarge       1.394           0.008        2              0.001
d2.8xlarge        1.018           0.009        2              0.004
i2.2xlarge        0.335           0.012        1              0.005
g3.16xlarge       2.409           0.013        2              0.005
p2.8xlarge        1.800           0.019        2              0.004
p2.xlarge         0.267           0.022        2              0.004

Get Machine Learning Based Recommendations on Substitutes for Your Favorite Spot Instance

(.pragia-aws) ➜  pragai-aws git:(master) ✗ ./spot-price-ml.py recommend --instance c3.8xlarge 
              SpotPrice  price_ecu_spot  cluster  price_memory_spot
InstanceType                                                       
c3.2xlarge        0.098           0.003        0              0.007
c3.4xlarge        0.176           0.003        0              0.006
c3.8xlarge        0.370           0.003        0              0.006
c4.4xlarge        0.265           0.004        0              0.009
cc2.8xlarge       0.356           0.004        0              0.006
c3.large          0.027           0.004        0              0.007
c3.xlarge         0.053           0.004        0              0.007
c4.2xlarge        0.125           0.004        0              0.008
c4.8xlarge        0.557           0.004        0              0.009
c4.xlarge         0.060           0.004        0              0.008
hi1.4xlarge       0.370           0.011        0              0.006

Launch Self-Terminating Spot Instances

Note, the defaults will need to be set for your environment: security groups, keyname, etc.

(.spot-price-ml) ➜  spot_price_machine_learning git:(master) ./spot_launcher.py launch --help         
Usage: spot_launcher.py launch [OPTIONS]

  Request spot instance

Options:
  --instance TEXT       Instance Type
  --duration TEXT       Duration
  --keyname TEXT        Key Name
  --profile TEXT        IamInstanceProfile
  --securitygroup TEXT  Key Name
  --ami TEXT            Key Name
  --help                Show this message and exit.

To launch with a longer duration, say 1 hour and 55 minutes:

(.pragia-aws) ➜  pragai-aws git:(master) ✗ ./spot_launcher.py launch --duration 115


2017-09-20 06:46:53,046 - __main__ - INFO - SPOT REQUEST DATA: {'SpotPrice': '0.8', 'Type': 'one-time', 'InstanceCount': 1, 'LaunchSpecification': {'ImageId': 'ami-6df1e514', 'InstanceType': 'r4.large', 'KeyName': 'pragai', 'IamInstanceProfile': {'Arn': 'arn:aws:iam::561744971673:instance-profile/admin'}, 'UserData': 'CiAgICAgICAgI2Nsb3VkLWNvbmZpZwogICAgICAgIHJ1bmNtZDoKICAgICAgICAgLSBlY2hvICJoYWx0IiB8IGF0IG5vdyArIDExNSBtaW4KICAgIA==', 'BlockDeviceMappings': [{'DeviceName': '/dev/xvda', 'Ebs': {'DeleteOnTermination': True, 'VolumeType': 'gp2', 'VolumeSize': 8}}], 'SecurityGroupIds': ['sg-61706e07']}}

Seaborn Plots from Juypter

Spot Prices vs Spot Prices/ECU

Cluster Facets

Jupyter Notebook Version

https://github.com/noahgift/spot_price_machine_learning/blob/master/notebooks/spot_pricing_ml.ipynb

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].