JoaquinAmatRodrigo / skforecast

Time series forecasting with machine learning models
https://skforecast.org
BSD 3-Clause "New" or "Revised" License
992 stars 113 forks source link

ForecasterRnn loss #719

Closed AVPokrovsky closed 1 week ago

AVPokrovsky commented 2 weeks ago

Hi, can I create custom function for loss?

model = create_and_compile_model( series=data_train, levels=levels, lags=lags, steps=steps, recurrent_layer="LSTM", recurrent_units=[100, 50], dense_units=[64, 32], optimizer=Adam(learning_rate=0.01), loss=MeanSquaredError()

AVPokrovsky commented 2 weeks ago

https://keras.io/api/losses/#creating-custom-losses

AVPokrovsky commented 2 weeks ago

But only for keras 3 that does not work

JoaquinAmatRodrigo commented 2 weeks ago

Hi @AVPokrovsky, You are right, skforecast is not yet compatible with Keras 3. We expect to add this compatibility in the next release.

@FernandoCarazoMelo