fetch_digits_optical_penbased#
- mlquantify.datasets.fetch_digits_optical_penbased(*, data_home=None, download_if_missing=True, return_X_y=False, as_frame=False, n_retries=3, delay=1.0, protocol=None, n_samples=1000, sample_size=500, random_state=None, target_col=None, which='optical')[source]#
Optical / Pen-based handwritten digits (10-class, easy).
Two UCI handwritten-digit datasets selected with
which. optical (id 80): 5620 samples x 64 integer pixel-block counts. penbased (id 81): 10992 samples x 16 pen-trajectory coordinates. Both are 10-class and almost perfectly class-balanced.Quantification: a well-separated 10-class multiclass baseline.
Samples
5620 (opt) / 10992 (pen)
Features
64 (opt) / 16 (pen)
Classes
10 (balanced)
Missing
0
Source: https://archive.ics.uci.edu/dataset/80/optical+recognition+of+handwritten+digits
- Parameters:
- data_homestr or path-like, default=None
Folder used to cache the downloaded file(s); defaults to
_data/next to the package.- download_if_missingbool, default=True
If False, raise instead of downloading when the cache is empty.
- return_X_ybool, default=False
Return
(X, y)instead of a Bunch.- as_framebool, default=False
Return
.dataas a DataFrame,.targetas a Series, and a combined.frame(features + a"target"column).- n_retriesint, default=3
Number of download attempts before giving up.
- delayfloat, default=1.0
Seconds to wait between attempts.
- protocol{None, “app”, “npp”, “upp”, “ppp”} or mlquantify protocol, default=None
If set, draw evaluation sample-bags with an mlquantify protocol; the Bunch then also has
.samples(index bags into.data),.prevalencesand.protocol.- n_samplesint, default=1000
Number of prevalence points (bags) generated by the protocol.
- sample_sizeint, default=500
Instances per bag (the protocol
batch_size).- random_stateint or None, default=None
Seed forwarded to the protocol.
- which{‘optical’, ‘penbased’}, default=’optical’
Which UCI digit dataset to load.
- Returns:
- dataBunch
Dictionary-like object. Attributes:
data(features),target(labels),feature_names,target_names,DESCR;framewhenas_frame=True; andsamples/prevalences/protocolwhenprotocolis set.- (X, y)tuple
Returned instead when
return_X_y=True.
References
Alpaydin, E. & Kaynak, C. (1998). UCI ML Repository (#80, #81).
Examples
>>> b = fetch_digits_optical_penbased(which='penbased'); b.data.shape (10992, 16)