pub struct NeuralModel { /* private fields */ }Expand description
Neural model for time series forecasting
Implementations§
Source§impl NeuralModel
impl NeuralModel
Source§impl NeuralModel
impl NeuralModel
pub fn into_reference( val: NeuralModel, env: Env, ) -> Result<Reference<NeuralModel>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<NeuralModel>>
Source§impl NeuralModel
impl NeuralModel
Sourcepub fn new(config: ModelConfig) -> Self
pub fn new(config: ModelConfig) -> Self
Create a new neural model
Sourcepub async fn train(
&self,
data: Vec<f64>,
_targets: Vec<f64>,
training_config: TrainingConfig,
) -> Result<Vec<TrainingMetrics>>
pub async fn train( &self, data: Vec<f64>, _targets: Vec<f64>, training_config: TrainingConfig, ) -> Result<Vec<TrainingMetrics>>
Train the model on historical data
Trait Implementations§
Source§impl FromNapiMutRef for NeuralModel
impl FromNapiMutRef for NeuralModel
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for NeuralModel
impl FromNapiRef for NeuralModel
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &NeuralModel
impl FromNapiValue for &NeuralModel
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut NeuralModel
impl FromNapiValue for &mut NeuralModel
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for NeuralModel
impl ToNapiValue for NeuralModel
Source§unsafe fn to_napi_value(env: napi_env, val: NeuralModel) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: NeuralModel) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &NeuralModel
impl TypeName for &NeuralModel
Source§impl TypeName for &mut NeuralModel
impl TypeName for &mut NeuralModel
Source§impl TypeName for NeuralModel
impl TypeName for NeuralModel
Source§impl ValidateNapiValue for &NeuralModel
impl ValidateNapiValue for &NeuralModel
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut NeuralModel
impl ValidateNapiValue for &mut NeuralModel
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for NeuralModel
impl !RefUnwindSafe for NeuralModel
impl Send for NeuralModel
impl Sync for NeuralModel
impl Unpin for NeuralModel
impl !UnwindSafe for NeuralModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more