Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
19 views3 pages

Vancouver Crime Data Analysis

Ok

Uploaded by

bobymahto2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

Vancouver Crime Data Analysis

Ok

Uploaded by

bobymahto2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

8.8s 1 /kaggle/input/crime-in-vancouver/crime.

csv
8.8s 2 /kaggle/input/crime-in-vancouver/googletrend.csv
11.7s 3 <class 'pandas.core.frame.DataFrame'>
11.7s 4 RangeIndex: 530652 entries, 0 to 530651
11.7s 5 Data columns (total 12 columns):
11.7s 6 # Column Non-Null Count Dtype
11.7s 7 --- ------ -------------- -----
11.7s 8 0 TYPE 530652 non-null object
11.7s 9 1 YEAR 530652 non-null int64
11.7s 10 2 MONTH 530652 non-null int64
11.7s 11 3 DAY 530652 non-null int64
11.7s 12 4 HOUR 476290 non-null float64
11.7s 13 5 MINUTE 476290 non-null float64
11.7s 14 6 HUNDRED_BLOCK 530639 non-null object
11.7s 15 7 NEIGHBOURHOOD 474028 non-null object
11.7s 16 8 X 530652 non-null float64
11.7s 17 9 Y 530652 non-null float64
11.7s 18 10 Latitude 530652 non-null float64
11.7s 19 11 Longitude 530652 non-null float64
11.7s 20 dtypes: float64(6), int64(3), object(3)
11.7s 21 memory usage: 48.6+ MB
16.6s 22 Traceback (most recent call last):
16.6s 23 File "<string>", line 1, in <module>
16.6s 24 File "/opt/conda/lib/python3.7/site-packages/papermill/execute.py", line
118, in execute_notebook
16.6s 25 raise_for_execution_errors(nb, output_path)
16.6s 26 File "/opt/conda/lib/python3.7/site-packages/papermill/execute.py", line
230, in raise_for_execution_errors
16.6s 27 raise error
16.6s 28 papermill.exceptions.PapermillExecutionError:
16.6s 29
---------------------------------------------------------------------------
16.6s 30 Exception encountered at "In [17]":
16.6s 31
---------------------------------------------------------------------------
16.6s 32 ValueError Traceback (most recent call
last)
16.6s 33 <ipython-input-17-2c45b34e7e5b> in <module>
16.6s 34 2
NN=MLPClassifier(hidden_layer_sizes=(10,50),momentum=0.9,solver='sgd',random_state=
42)
16.6s 35 3
16.6s 36 ----> 4 NN.fit(X_train, y_train)
16.6s 37 5
16.6s 38 6 print_score(NN, X_train, y_train, X_test, y_test, train=True)
16.6s 39
16.6s 40
/opt/conda/lib/python3.7/site-packages/sklearn/neural_network/_multilayer_perceptro
n.py in fit(self, X, y)
16.6s 41 671 self : returns a trained MLP model.
16.6s 42 672 """
16.6s 43 --> 673 return self._fit(X, y, incremental=False)
16.6s 44 674
16.6s 45 675 @property
16.6s 46
16.6s 47
/opt/conda/lib/python3.7/site-packages/sklearn/neural_network/_multilayer_perceptro
n.py in _fit(self, X, y, incremental)
16.6s 48 362 (not self.warm_start and not incremental))
16.6s 49 363
16.6s 50 --> 364 X, y = self._validate_input(X, y, incremental,
reset=first_pass)
16.6s 51 365
16.6s 52 366 n_samples, n_features = X.shape
16.6s 53
16.6s 54
/opt/conda/lib/python3.7/site-packages/sklearn/neural_network/_multilayer_perceptro
n.py in _validate_input(self, X, y, incremental, reset)
16.6s 55 969 multi_output=True,
16.6s 56 970 dtype=(np.float64, np.float32),
16.6s 57 --> 971 reset=reset)
16.6s 58 972 if y.ndim == 2 and y.shape[1] == 1:
16.6s 59 973 y = column_or_1d(y, warn=True)
16.6s 60
16.6s 61 /opt/conda/lib/python3.7/site-packages/sklearn/base.py in
_validate_data(self, X, y, reset, validate_separately, **check_params)
16.6s 62 431 y = check_array(y, **check_y_params)
16.6s 63 432 else:
16.6s 64 --> 433 X, y = check_X_y(X, y, **check_params)
16.6s 65 434 out = X, y
16.6s 66 435
16.6s 67
16.6s 68 /opt/conda/lib/python3.7/site-packages/sklearn/utils/validation.py in
inner_f(*args, **kwargs)
16.6s 69 61 extra_args = len(args) - len(all_args)
16.6s 70 62 if extra_args <= 0:
16.6s 71 ---> 63 return f(*args, **kwargs)
16.6s 72 64
16.6s 73 65 # extra_args > 0
16.6s 74
16.6s 75 /opt/conda/lib/python3.7/site-packages/sklearn/utils/validation.py in
check_X_y(X, y, accept_sparse, accept_large_sparse, dtype, order, copy,
force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples,
ensure_min_features, y_numeric, estimator)
16.6s 76 819 ensure_min_samples=ensure_min_samples,
16.6s 77 820 ensure_min_features=ensure_min_features,
16.6s 78 --> 821 estimator=estimator)
16.6s 79 822 if multi_output:
16.6s 80 823 y = check_array(y, accept_sparse='csr', force_all_finite=True,
16.6s 81
16.6s 82 /opt/conda/lib/python3.7/site-packages/sklearn/utils/validation.py in
inner_f(*args, **kwargs)
16.6s 83 61 extra_args = len(args) - len(all_args)
16.6s 84 62 if extra_args <= 0:
16.6s 85 ---> 63 return f(*args, **kwargs)
16.6s 86 64
16.6s 87 65 # extra_args > 0
16.6s 88
16.6s 89 /opt/conda/lib/python3.7/site-packages/sklearn/utils/validation.py in
check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy,
force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features,
estimator)
16.6s 90 614 array = array.astype(dtype, casting="unsafe",
copy=False)
16.6s 91 615 else:
16.6s 92 --> 616 array = np.asarray(array, order=order,
dtype=dtype)
16.6s 93 617 except ComplexWarning as complex_warning:
16.6s 94 618 raise ValueError("Complex data not supported\n"
16.6s 95
16.6s 96 /opt/conda/lib/python3.7/site-packages/numpy/core/_asarray.py in
asarray(a, dtype, order)
16.6s 97 81
16.6s 98 82 """
16.6s 99 ---> 83 return array(a, dtype, copy=False, order=order)
16.6s 100 84
16.6s 101 85
16.6s 102
16.6s 103 /opt/conda/lib/python3.7/site-packages/pandas/core/generic.py in
__array__(self, dtype)
16.6s 104 1896
16.6s 105 1897 def __array__(self, dtype=None) -> np.ndarray:
16.6s 106 -> 1898 return np.asarray(self._values, dtype=dtype)
16.6s 107 1899
16.6s 108 1900 def __array_wrap__(
16.6s 109
16.6s 110 /opt/conda/lib/python3.7/site-packages/numpy/core/_asarray.py in
asarray(a, dtype, order)
16.6s 111 81
16.6s 112 82 """
16.6s 113 ---> 83 return array(a, dtype, copy=False, order=order)
16.6s 114 84
16.6s 115 85
16.6s 116
16.6s 117 ValueError: could not convert string to float: 'Theft from Vehicle'
16.6s 118
17.9s 119 /opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2561:
FutureWarning: --
Exporter.preprocessors=["remove_papermill_header.RemovePapermillHeader"] for
containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors
item` ... multiple times to add items to a list.
17.9s 120 FutureWarning,
17.9s 121 [NbConvertApp] Converting notebook __notebook__.ipynb to notebook
18.1s 122 [NbConvertApp] Writing 177151 bytes to __notebook__.ipynb
19.3s 123 /opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2561:
FutureWarning: --
Exporter.preprocessors=["nbconvert.preprocessors.ExtractOutputPreprocessor"] for
containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors
item` ... multiple times to add items to a list.
19.3s 124 FutureWarning,
19.3s 125 [NbConvertApp] Converting notebook __notebook__.ipynb to html
20.0s 126 [NbConvertApp] Support files will be in __results___files/
20.0s 127 [NbConvertApp] Making directory __results___files
20.0s 128 [NbConvertApp] Making directory __results___files
20.0s 129 [NbConvertApp] Writing 375079 bytes to __results__.html

You might also like