extract_date_component(ds.last_scraped, {
"component": "hour"
}) => (ds.hour)
extract_date_component(ds.last_scraped, {
"component": "month_name"
}) => (ds.month_name)
extract_date_component(ds.last_scraped, {
"component": "weekday_name"
}) => (ds.weekday_name)
configure_tagged_columns(ds[["neighbourhood_cleansed", "host_verifications", "host_total_listings_count", "longitude", "latitude", "price"]],
{
"Target": [
"price"
],
"Factors": [
"latitude",
"longitude",
"host_total_listings_count",
"host_verifications",
"neighbourhood_cleansed"
]
})
train_classification(ds[["price", "neighbourhood_cleansed", "host_verifications", "host_total_listings_count", "longitude", "latitude"]],
{
"target": "price",
"model": "CatboostClassifier",
"params": {
"depth": 6,
"nan_mode": "Min",
"iterations": 1000,
"one_hot_max_size": 10,
"max_ctr_complexity": 2,
"boosting_type": "Plain"
},
"validate": {
"n_splits": 5,
"metrics": [
"accuracy"
]
}
}) => (ds.gx_prediction,
"ds-model-yFqI")
test_classification(ds[["price", "neighbourhood_cleansed", "host_verifications", "host_total_listings_count", "longitude", "latitude"]],
"ds-model-yFqI",
{
"refit": true,
"split": {
"test_size": 0.2
},
"target": "price"
}) => (ds.gx_prediction,
ds.prob,
ds.Error,
ds.split)
configure_column_metadata(ds.Error,
{
"label": "Error",
"description": "Whether the predicted class was correct or wrong"
})
configure_column_metadata(ds.gx_prediction, {
"label": "Prediction",
"description": "Prediction made for the target varible"
})
configure_tagged_columns(ds[["split", "prob", "Error", "gx_prediction"]],
{
"Output Variables": [
"gx_prediction",
"Error",
"prob",
"split"
]
})
configure_columns_order(ds.price,
ds.gx_prediction,
ds.Error,
ds.prob,
ds.split,
ds.latitude,
ds.longitude,
ds.host_total_listings_count,
ds.host_verifications,
ds.neighbourhood_cleansed)
configure_column_visibility(ds.Error, {
"graph": "pinned"
})
configure_column_visibility(ds.prob, {
"graph": "pinned"
})
configure_column_visibility(ds.split, {
"graph": "pinned"
})