用法:
dask_ml.xgboost.train(client, params, data, labels, dmatrix_kwargs={}, evals_result=None, sample_weight=None, **kwargs)
在 Dask 集群上訓練 XGBoost 模型
這會在所有 Dask 工作人員上啟動 XGBoost,將輸入數據移動到這些工作人員,然後在輸入上調用
xgboost.train
。- client: dask.distributed.Client:
- params: dict:
提供給 XGBoost 的參數(參見 xgb.Booster.train)
- data: dask array or dask.dataframe:
- labels: dask.array or dask.dataframe:
- dmatrix_kwargs: Keywords to give to Xgboost DMatrix:
- evals_result: dict, optional:
通過就地改變evals_result,將所有項目的評估結果曆史存儲在eval_set中。
- sample_weight:數組,可選
實例權重
- **kwargs: Keywords to give to XGBoost train:
參數:
例子:
>>> client = Client('scheduler-address:8786') >>> data = dd.read_csv('s3://...') >>> labels = data['outcome'] >>> del data['outcome'] >>> train(client, params, data, labels, **normal_kwargs) <xgboost.core.Booster object at ...>
相關用法
- Python dask_ml.xgboost.predict用法及代碼示例
- Python dask_ml.wrappers.ParallelPostFit用法及代碼示例
- Python dask_ml.feature_extraction.text.CountVectorizer用法及代碼示例
- Python dask_ml.preprocessing.MinMaxScaler用法及代碼示例
- Python dask_ml.preprocessing.Categorizer用法及代碼示例
- Python dask_ml.linear_model.LinearRegression用法及代碼示例
- Python dask_ml.wrappers.Incremental用法及代碼示例
- Python dask_ml.metrics.mean_squared_log_error用法及代碼示例
- Python dask_ml.model_selection.GridSearchCV用法及代碼示例
- Python dask_ml.preprocessing.OrdinalEncoder用法及代碼示例
- Python dask_ml.feature_extraction.text.FeatureHasher用法及代碼示例
- Python dask_ml.preprocessing.LabelEncoder用法及代碼示例
- Python dask_ml.ensemble.BlockwiseVotingClassifier用法及代碼示例
- Python dask_ml.model_selection.train_test_split用法及代碼示例
- Python dask_ml.decomposition.PCA用法及代碼示例
- Python dask_ml.feature_extraction.text.HashingVectorizer用法及代碼示例
- Python dask_ml.preprocessing.PolynomialFeatures用法及代碼示例
- Python dask_ml.linear_model.LogisticRegression用法及代碼示例
- Python dask_ml.linear_model.PoissonRegression用法及代碼示例
- Python dask_ml.preprocessing.StandardScaler用法及代碼示例
注:本文由純淨天空篩選整理自dask.org大神的英文原創作品 dask_ml.xgboost.train。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。