Comments (3)
Hey @trivialfis
Here are the feature names:
['t_2m:C_53.77_1.702', 't_2m:C_53.84_1.767', 't_2m:C_53.9_1.832', 't_2m:C_53.97_1.897', 't_2m:C_54.03_1.962', 't_2m:C_54.1_2.027', 'wind_speed_10m:ms_53.77_1.702', 'wind_speed_10m:ms_53.84_1.767', 'wind_speed_10m:ms_53.9_1.832', 'wind_speed_10m:ms_53.97_1.897', 'wind_speed_10m:ms_54.03_1.962', 'wind_speed_10m:ms_54.1_2.027', 'wind_speed_100m:ms_53.77_1.702', 'wind_speed_100m:ms_53.84_1.767', 'wind_speed_100m:ms_53.9_1.832', 'wind_speed_100m:ms_53.97_1.897', 'wind_speed_100m:ms_54.03_1.962', 'wind_speed_100m:ms_54.1_2.027', 'wind_dir_10m:d_53.77_1.702', 'wind_dir_10m:d_53.84_1.767', 'wind_dir_10m:d_53.9_1.832', 'wind_dir_10m:d_53.97_1.897', 'wind_dir_10m:d_54.03_1.962', 'wind_dir_10m:d_54.1_2.027', 'wind_dir_100m:d_53.77_1.702', 'wind_dir_100m:d_53.84_1.767', 'wind_dir_100m:d_53.9_1.832', 'wind_dir_100m:d_53.97_1.897', 'wind_dir_100m:d_54.03_1.962', 'wind_dir_100m:d_54.1_2.027', 'precip_1h:mm_53.77_1.702', 'precip_1h:mm_53.84_1.767', 'precip_1h:mm_53.9_1.832', 'precip_1h:mm_53.97_1.897', 'precip_1h:mm_54.03_1.962', 'precip_1h:mm_54.1_2.027', 'relative_humidity_2m:p_53.77_1.702', 'relative_humidity_2m:p_53.84_1.767', 'relative_humidity_2m:p_53.9_1.832', 'relative_humidity_2m:p_53.97_1.897', 'relative_humidity_2m:p_54.03_1.962', 'relative_humidity_2m:p_54.1_2.027', 'Wind_MWh_credit', 'windlimit']
Here is the constraints python value being passed to the regressor object
{'wind_speed_10m:ms_53.77_1.702': 1, 'wind_speed_10m:ms_53.84_1.767': 1, 'wind_speed_10m:ms_53.9_1.832': 1, 'wind_speed_10m:ms_53.97_1.897': 1, 'wind_speed_10m:ms_54.03_1.962': 1, 'wind_speed_10m:ms_54.1_2.027': 1, 'wind_speed_100m:ms_53.77_1.702': 1, 'wind_speed_100m:ms_53.84_1.767': 1, 'wind_speed_100m:ms_53.9_1.832': 1, 'wind_speed_100m:ms_53.97_1.897': 1, 'wind_speed_100m:ms_54.03_1.962': 1, 'wind_speed_100m:ms_54.1_2.027': 1, 'windlimit': 1, 'relative_humidity_2m:p_53.77_1.702': -1, 'relative_humidity_2m:p_53.84_1.767': -1, 'relative_humidity_2m:p_53.9_1.832': -1, 'relative_humidity_2m:p_53.97_1.897': -1, 'relative_humidity_2m:p_54.03_1.962': -1, 'relative_humidity_2m:p_54.1_2.027': -1}
from xgboost.
Hi, could you please provide some info for us to reproduce:
- The actual Python value of the constraint parameter.
- The list of feature names.
from xgboost.
Hi, I tried to create a reproducer based on the parameters, but couldn't see the error:
import numpy as np
import pandas as pd
import xgboost as xgb
from sklearn.datasets import make_regression
alpha = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
mono = {
"wind_speed_10m:ms_53.77_1.702": 1,
"wind_speed_10m:ms_53.84_1.767": 1,
"wind_speed_10m:ms_53.9_1.832": 1,
"wind_speed_10m:ms_53.97_1.897": 1,
"wind_speed_10m:ms_54.03_1.962": 1,
"wind_speed_10m:ms_54.1_2.027": 1,
"wind_speed_100m:ms_53.77_1.702": 1,
"wind_speed_100m:ms_53.84_1.767": 1,
"wind_speed_100m:ms_53.9_1.832": 1,
"wind_speed_100m:ms_53.97_1.897": 1,
"wind_speed_100m:ms_54.03_1.962": 1,
"wind_speed_100m:ms_54.1_2.027": 1,
"windlimit": 1,
"relative_humidity_2m:p_53.77_1.702": -1,
"relative_humidity_2m:p_53.84_1.767": -1,
"relative_humidity_2m:p_53.9_1.832": -1,
"relative_humidity_2m:p_53.97_1.897": -1,
"relative_humidity_2m:p_54.03_1.962": -1,
"relative_humidity_2m:p_54.1_2.027": -1,
}
fname = [
"t_2m:C_53.77_1.702",
"t_2m:C_53.84_1.767",
"t_2m:C_53.9_1.832",
"t_2m:C_53.97_1.897",
"t_2m:C_54.03_1.962",
"t_2m:C_54.1_2.027",
"wind_speed_10m:ms_53.77_1.702",
"wind_speed_10m:ms_53.84_1.767",
"wind_speed_10m:ms_53.9_1.832",
"wind_speed_10m:ms_53.97_1.897",
"wind_speed_10m:ms_54.03_1.962",
"wind_speed_10m:ms_54.1_2.027",
"wind_speed_100m:ms_53.77_1.702",
"wind_speed_100m:ms_53.84_1.767",
"wind_speed_100m:ms_53.9_1.832",
"wind_speed_100m:ms_53.97_1.897",
"wind_speed_100m:ms_54.03_1.962",
"wind_speed_100m:ms_54.1_2.027",
"wind_dir_10m:d_53.77_1.702",
"wind_dir_10m:d_53.84_1.767",
"wind_dir_10m:d_53.9_1.832",
"wind_dir_10m:d_53.97_1.897",
"wind_dir_10m:d_54.03_1.962",
"wind_dir_10m:d_54.1_2.027",
"wind_dir_100m:d_53.77_1.702",
"wind_dir_100m:d_53.84_1.767",
"wind_dir_100m:d_53.9_1.832",
"wind_dir_100m:d_53.97_1.897",
"wind_dir_100m:d_54.03_1.962",
"wind_dir_100m:d_54.1_2.027",
"precip_1h:mm_53.77_1.702",
"precip_1h:mm_53.84_1.767",
"precip_1h:mm_53.9_1.832",
"precip_1h:mm_53.97_1.897",
"precip_1h:mm_54.03_1.962",
"precip_1h:mm_54.1_2.027",
"relative_humidity_2m:p_53.77_1.702",
"relative_humidity_2m:p_53.84_1.767",
"relative_humidity_2m:p_53.9_1.832",
"relative_humidity_2m:p_53.97_1.897",
"relative_humidity_2m:p_54.03_1.962",
"relative_humidity_2m:p_54.1_2.027",
"Wind_MWh_credit",
"windlimit",
]
n_features = len(fname)
X, y = make_regression(256, n_features)
X_df = pd.DataFrame(X, columns=fname)
xgb_regressor_wind = xgb.XGBRegressor(
objective="reg:quantileerror",
quantile_alpha=alpha,
# n_jobs=1,
colsample_bytree=0.8,
gamma=0.3,
learning_rate=0.02,
max_depth=4,
n_estimators=800,
subsample=0.6,
min_child_weight=3,
monotone_constraints=mono,
)
xgb_regressor_wind.fit(X_df, y)
from xgboost.
Related Issues (20)
- Tutorial on c-api distributed training of xgboost HOT 2
- Python 3.12 `xgboost.core.XGBoostError: Invalid Parameter format for nthread expect int but value='-1'` when `DMatrix` used with `import googlecloudprofiler`. HOT 6
- [CI] Retire Mac Mini worker in BuildKite HOT 1
- [RFC] New logo for XGBoost HOT 1
- c-ares and BoringSSL version in xgboost 2.0.3 HOT 12
- Federated horizontal result does not align with basic training without federation HOT 7
- xgboost 2.0.1 is breaking on rootless docker. HOT 3
- Memory spikes when creating QuantileDMatrix from data containing NaN HOT 2
- XGBoost4j-spark Build fail because NPE HOT 8
- Issues downgrading xgboost 2 model HOT 4
- Is the hessian right in multi:softprob? HOT 4
- when custom the objective function in xgboost, what should be the shape of the hessian? HOT 4
- Got Type Error when customize objective function. HOT 5
- Pkg_resources is not defined in python docker HOT 3
- Broken links for 'Edit on GitHub' on docs under `demo` HOT 1
- xgboost is extremely slow on i9-14900KF processor
- BUG: SHAP values calculated using CPU differ from SHAP values calculated using GPU for XGBOOST
- Revise dask GPU demo.
- How XGBoost sample_weights alternate the objective function formula?
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 xgboost.