用法:
dask_ml.metrics.mean_squared_log_error(y_true: dask_ml._typing.ArrayLike, y_pred: dask_ml._typing.ArrayLike, sample_weight: Optional[dask_ml._typing.ArrayLike] = None, multioutput: Optional[str] = 'uniform_average', compute: bool = True) → dask_ml._typing.ArrayLike
均方對數誤差回歸損失。
此文檔字符串是從 sklearn.metrics.mean_squared_log_error 複製而來的。
可能存在與 Dask 版本的一些不一致之處。
在用戶指南中閱讀更多信息。
- y_true:array-like 形狀 (n_samples,) 或 (n_samples, n_outputs)
基本事實(正確)目標值。
- y_pred:array-like 形狀 (n_samples,) 或 (n_samples, n_outputs)
估計的目標值。
- sample_weight:array-like of shape (n_samples,), default=None
樣本權重。
- multioutput:{‘raw_values’, ‘uniform_average’} 或 array-like 形狀 (n_outputs,),默認 = 'uniform_average'
定義多個輸出值的聚合。 Array-like 值定義用於平均錯誤的權重。
- ‘raw_values’:
當輸入為多輸出格式時返回一整套錯誤。
- ‘uniform_average’:
所有輸出的誤差均采用統一的權重進行平均。
- squared:bool, default=True (在 Dask 中不支持)
如果 True 返回 MSLE(均方對數誤差)值。如果 False 返回 RMSLE(均方根對數誤差)值。
- loss:浮點數或浮點數數組
非負浮點值(最佳值為 0.0)或浮點值數組,每個目標對應一個。
參數:
返回:
例子:
>>> from sklearn.metrics import mean_squared_log_error >>> y_true = [3, 5, 2.5, 7] >>> y_pred = [2.5, 5, 4, 8] >>> mean_squared_log_error(y_true, y_pred) 0.039... >>> mean_squared_log_error(y_true, y_pred, squared=False) 0.199... >>> y_true = [[0.5, 1], [1, 2], [7, 6]] >>> y_pred = [[0.5, 2], [1, 2.5], [8, 8]] >>> mean_squared_log_error(y_true, y_pred) 0.044... >>> mean_squared_log_error(y_true, y_pred, multioutput='raw_values') array([0.00462428, 0.08377444]) >>> mean_squared_log_error(y_true, y_pred, multioutput=[0.3, 0.7]) 0.060...
相關用法
- Python dask_ml.metrics.mean_squared_error用法及代碼示例
- Python dask_ml.metrics.mean_absolute_error用法及代碼示例
- Python dask_ml.metrics.r2_score用法及代碼示例
- Python dask_ml.metrics.accuracy_score用法及代碼示例
- Python dask_ml.metrics.log_loss用法及代碼示例
- Python dask_ml.model_selection.GridSearchCV用法及代碼示例
- Python dask_ml.model_selection.train_test_split用法及代碼示例
- Python dask_ml.model_selection.IncrementalSearchCV用法及代碼示例
- Python dask_ml.model_selection.HyperbandSearchCV用法及代碼示例
- Python dask_ml.model_selection.RandomizedSearchCV用法及代碼示例
- 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.preprocessing.OrdinalEncoder用法及代碼示例
- Python dask_ml.feature_extraction.text.FeatureHasher用法及代碼示例
- Python dask_ml.preprocessing.LabelEncoder用法及代碼示例
- Python dask_ml.ensemble.BlockwiseVotingClassifier用法及代碼示例
注:本文由純淨天空篩選整理自dask.org大神的英文原創作品 dask_ml.metrics.mean_squared_log_error。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。