Comments (2)
@dromare It ran fine with the list input of l1_ratio
on dummy data. Here is my code:
import pandas as pd
import plotly
from linkedin.greykite.common.data_loader import DataLoader
from linkedin.greykite.framework.templates.autogen.forecast_config import ForecastConfig
from linkedin.greykite.framework.templates.autogen.forecast_config import MetadataParam, EvaluationPeriodParam, EvaluationMetricParam, ModelComponentsParam
from linkedin.greykite.framework.templates.forecaster import Forecaster
from linkedin.greykite.framework.templates.model_templates import ModelTemplateEnum
from linkedin.greykite.framework.utils.result_summary import summarize_grid_search_results
from linkedin.greykite.common.evaluation import EvaluationMetricEnum
# Loads dataset into pandas DataFrame
dl = DataLoader()
df = dl.load_peyton_manning()
# subsetting for faster runtime
df = df.iloc[1:100]
# augmenting the training and testing dataset with 0
df["y"][90:100]=0
# specify dataset information
metadata = MetadataParam(
time_col="ts", # name of the time column ("date" in example above)
value_col="y", # name of the value column ("sessions" in example above)
freq="D" # "H" for hourly, "D" for daily, "W" for weekly, etc.
# Any format accepted by `pandas.date_range`
)
evaluation_period = EvaluationPeriodParam(
cv_max_splits=0
)
evaluation_metric = EvaluationMetricParam(
cv_selection_metric=EvaluationMetricEnum.RootMeanSquaredError.name
)
model_components = ModelComponentsParam(
custom = dict(
fit_algorithm_dict=dict(
fit_algorithm="elastic_net",
fit_algorithm_params = dict(
l1_ratio=[.1, .5, .7, .9, .95, .99, 1]
)
)
)
)
config = ForecastConfig(
model_template=ModelTemplateEnum.SILVERKITE.name,
forecast_horizon=7, # forecasts 365 steps ahead
coverage=0.95, # 95% prediction intervals
metadata_param=metadata,
evaluation_period_param=evaluation_period,
evaluation_metric_param=evaluation_metric,
model_components_param=model_components
)
forecaster = Forecaster()
result = forecaster.run_forecast_config( # result is also stored as `forecaster.forecast_result`.
df=df,
config=config
)
If you can post your codes I can take a look.
from greykite.
Hi sayanpatra,
If I print out the values of alpha and l1_ratio in lines 378-379 of C:\ProgramData\Anaconda3\envs\greykite-venv\lib\site-packages\greykite\algo\common\model_summary_utils.py in add_model_df_lm(info_dict) I get the following:
alpha = 160.12536709617518
l1_ratio = [0.1, 0.5, 0.7, 0.9, 0.95, 0.99, 1]
Then in line 384 the calculation 1 - l1_ratio
throws the following error:
TypeError: unsupported operand type(s) for -: 'int' and 'list'
because l1_ratio
is of type list.
from greykite.
Related Issues (20)
- Library import issues HOT 1
- ValueError: ``MULTISTAGE_EMPTY`` can not be used without overriding. HOT 2
- Request to release tag 0.5.1 HOT 4
- Unable to get greykite 0.5.0 HOT 4
- Unable to run codes.
- Regressors Already Forecastd, No Lag Needed. But, getting warning "RuntimeWarning: Input data has many null values. Missing 21.45% of one input." HOT 1
- Lower Python version requirement to allow 3.8.10 HOT 1
- `design_info` is needed to make predictions on new data HOT 4
- Dealing with lot of 0s (zeroes) in Greykite Multistage Forecasting HOT 1
- mutable default <class 'greykite.framework.templates.autogen.forecast_config.ModelComponentsParam'> for field SILVERKITE is not allowed: use default_factory HOT 1
- MLFLOW support for the SilverKite Algorithm HOT 1
- Greykite design question
- Version 0.5.0 - broken macOS support with M1 chip due to incorrect version of pmdarima dependency
- Question: How to use sample_weight in grid searching a model HOT 2
- TypeError in docs examples HOT 1
- Code not working After Update
- TypeError on forecaster.run_forecast_config (same as the others) HOT 2
- ChangePoint detection for not daily data
- Using conda for installation
- New matplotlib release v3.9.0 breaks Forecaster class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from greykite.