
    6bi?                     H    S r SSKrSSKJr  SSKJr  \" S5      SS j5       rg)z(Boston housing price regression dataset.    N)get_file)keras_exportz'keras.datasets.boston_housing.load_datac           	         SUs=::  a  S:  d   e   eSn[        U US-   SS9n [        R                  " U SS9 nUS	   nUS
   nSSS5        [        R                  R	                  U5      n[        R
                  " [        W5      5      nUR                  U5        XX   nWU   n[        R                  " US[        [        U5      SU-
  -  5       5      n	[        R                  " US[        [        U5      SU-
  -  5       5      n
[        R                  " U[        [        U5      SU-
  -  5      S 5      n[        R                  " U[        [        U5      SU-
  -  5      S 5      nX4X44$ ! , (       d  f       GN1= f)a  Loads the Boston Housing dataset.

This is a dataset taken from the StatLib library which is maintained at
Carnegie Mellon University.

**WARNING:** This dataset has an ethical problem: the authors of this
dataset included a variable, "B", that may appear to assume that racial
self-segregation influences house prices. As such, we strongly discourage
the use of this dataset, unless in the context of illustrating ethical
issues in data science and machine learning.

Samples contain 13 attributes of houses at different locations around the
Boston suburbs in the late 1970s. Targets are the median values of
the houses at a location (in k$).

The attributes themselves are defined in the
[StatLib website](http://lib.stat.cmu.edu/datasets/boston).

Args:
  path: path where to cache the dataset locally
      (relative to `~/.keras/datasets`).
  test_split: fraction of the data to reserve as test set.
  seed: Random seed for shuffling the data
      before computing the test split.

Returns:
  Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.

**x_train, x_test**: numpy arrays with shape `(num_samples, 13)`
  containing either the training samples (for x_train),
  or test samples (for y_train).

**y_train, y_test**: numpy arrays of shape `(num_samples,)` containing the
  target scalars. The targets are float scalars typically between 10 and
  50 that represent the home prices in k$.
r      z<https://storage.googleapis.com/tensorflow/tf-keras-datasets/boston_housing.npz@f553886a1f8d56431e820c5b82552d9d95cfcb96d1e678153f8839538947dff5)origin	file_hashT)allow_picklexyN)
r   nploadrandomRandomStatearangelenshufflearrayint)path
test_splitseedorigin_folderfr   r   rngindicesx_trainy_trainx_testy_tests                ^/home/james-whalen/.local/lib/python3.13/site-packages/tf_keras/src/datasets/boston_housing.py	load_datar#      sh   L 
QF  33N	D 
D	)QcFcF 
* ))


%CiiAGKK	
A	'
Ahhq93s1vZ89:;Ghhq93s1vZ89:;GXXaCFa*n5689:FXXaCFa*n5689:F/// 
*	)s   E--
E<)r   g?q   )__doc__numpyr   tf_keras.src.utils.data_utilsr    tensorflow.python.util.tf_exportr   r#        r"   <module>r+      s/    /  2 : 78>0 9>0r*   