- 安装
- 实战
- 初始化
- 训练
- 验证
- 预测
- 实例
自动学习igel
安装
- pip install igel
igel支持的模型
实战
初始化
$ igel init -type "classification" -model "NeuralNetwork" -target "recurrence"
- igel.yaml
dataset:
preprocess:
missing_values: mean
scale:
method: standard
target: inputs
split:
shuffle: true
test_size: 0.2
type: csv
model:
algorithm: NeuralNetwork
type: classification
target:
- recurrence
训练
$ igel fit -dp "../data/cryablation.csv" -yml "./igel.yml" -cmd "fit"
验证
$ igel evaluate -dp path_to_the_evaluation_dataset
预测
$ igel predict -dp path_to_the_new_dataset
实例
- igel.yaml
# dataset operations
dataset: split: # split options
test_size: 0.2 # 0.2 means 20% for the test data, so 80% are automatically for training
shuffle: True # whether to shuffle the data before/while splitting
stratify: default # If not None, data is split in a stratified fashion, using this as the class labels. preprocess: # preprocessing options
missing_values: mean # other possible values: [drop, median, most_frequent, constant] check the docs for more
encoding:
type: labelEncoding # other possible values: [labelEncoding]
column: Species
scale: # scaling options
method: standard # standardization will scale values to have a 0 mean and 1 standard deviation | you can also try minmax
target: inputs # scale inputs. | other possible values: [outputs, all] # if you choose all then all values in the dataset will be scaled
# model definition
model:
type: classification
algorithm: LogisticRegression
# target you want to predict
target:
- Species
- fit.py
from igel import Igel
mock_fit_params = {'data_path': '../iris/train-Iris.csv',
'yaml_path': './iris.yaml',
'cmd': 'fit'}Igel(**mock_fit_params)
- evaluate.py
from igel import Igel
mock_eval_params = {'data_path': '../iris/eval-Iris.csv',
'cmd': 'evaluate'}Igel(**mock_eval_params)
- predict.py
from igel import Igel
mock_pred_params = {'data_path': '../iris/test-Iris.csv',
'cmd': 'predict'}Igel(**mock_pred_params)
参考:https://github.com/nidhaloff/igel