PINE LIBRARY

PineML_v6

59
Library "PineML_v6"
ML Library for lightweight strategies. Implements k-NN with matrix storage.

method new_model(k, history, features)
  Създава нов модел
  Namespace types: series int, simple int, input int, const int
  Parameters:
    k (int): Брой съседи (напр. 5)
    history (int): Дълбочина на паметта (напр. 1000 бара)
    features (int): Брой променливи, които ще следим

method train(model, feature_array, label)
  Добавя нови данни към паметта на модела
  Namespace types: KNN_Model
  Parameters:
    model (KNN_Model): Инстанцията на модела
    feature_array (array<float>): Масив с текущите стойности на индикаторите
    label (float): Резултатът (класът), свързан с тези данни

method predict(model, query_features)
  Изчислява прогноза на база текущите данни
  Namespace types: KNN_Model
  Parameters:
    model (KNN_Model)
    query_features (array<float>)

KNN_Model
  Fields:
    k_neighbors (series int)
    max_history (series int)
    features (matrix<float>)
    labels (array<float>)
    feature_count (series int)

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.