PINE LIBRARY

PineML_v6

78
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)

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.