我要评分
获取效率
正确性
完整性
易理解

Parameter Package

Parameter

Description

Input/Output

Type

Value Range

Default Value

is_diff_feature

Feature engineering parameter, indicating whether to add differential features.

Input

bool

True/False

True

is_diff_roll_sum_feature

Feature engineering parameter, indicating whether to add differential rolling sum features.

Input

bool

True/False

True

long_period

Feature engineering parameter, indicating the period for calculating differential rolling sums.

Input

int

[1, sys.maxsize]

14

alert_threshold

Fault determination parameter. When the number of drive alarms exceeds the threshold, the drive is considered faulty.

Input

int

[1, +∞)

3

data_tail

Data preprocessing parameter. Only the last data_tail data records of each drive are reserved for training.

Input

int

[1, +∞)

20

train_data

Data preprocessing parameter, indicating the training set division ratio.

Input

float

(0.0, 1.0)

0.8

log_file

Log file path.

Input

String

-

/var/log/smartmaintainkit.log

  1. In Python, sys.maxsize indicates the maximum value of the int type.
  2. The is_diff_roll_sum_feature parameter takes effect only when is_diff_feature is set to True. If is_diff_feature is set to False, is_diff_roll_sum_feature is meaningless.

    Examples:

    Call an interface in default mode.

    fault_train(r'fault_test.data', r'model.pkl')

    Change the log file path to temp.log.

    param = {'log_file': 'temp.log'} 
    fault_train(r'fault_test.data', r'model.pkl', param)