produvia / kryptos

Kryptos AI is a virtual investment assistant that manages your cryptocurrency portfolio
http://twitter.com/kryptos_ai
MIT License
48 stars 8 forks source link

Create a YAML File for Machine Learning Models #76

Open slavakurilyak opened 6 years ago

slavakurilyak commented 6 years ago

Goal

As a developer, I want to create a YAML file to define machine learning model configurations, so that I can easily modify parameter and hyperparameter settings.

As a developer, I want to create a YAML file to define machine learning model configurations, so that I can find the optimal parameter and hyperparameter settings.

Consider

# hyperparam.yaml
trainingInput:
  scaleTier: STANDARD_1
  hyperparameters:
    maxTrials: 40
    maxParallelTrials: 5
    enableTrialEarlyStopping: True
    goal: MINIMIZE    
    hyperparameterMetricTag: rmse
    params:
    - parameterName: nembeds
      type: INTEGER
      minValue: 3
      maxValue: 30
      scaleType: UNIT_LINEAR_SCALE
    - parameterName: nnsize
      type: DISCRETE
      discreteValues:
      - 4
      - 16
      - 32
      - 64
      - 128

Inspiration

Google is using YAML files to configure their machine learning models. (Google, 2018)

You will identify parts of your model that you want the tuner to change so as to optimize the evaluation metric. For example, you might want the tuner to be able to tune the batch size and the number of embedding nodes in your model. All of these hyperparameters will have to be command-line inputs to your executable Python package. You’d then put these together into a YAML file.