FeatureStats#
- class scikitplot.feature_selection.FeatureStats(name, dtype, family, n_rows, n_missing, n_non_null, n_unique=None, top_count=None, ordered=None, n_finite=None, n_inf=None, min=None, max=None, mean=None, std=None, q1=None, median=None, q3=None, skewness=None, kurtosis=None, integer_valued=None)[source]#
Training statistics of one column.
- Parameters:
- namestr
Column name.
- dtypestr
str(series.dtype)at fit time.- familystr
DtypeFamilyvalue.- n_rows, n_missing, n_non_nullint
Row count, missing values (
NaN,None,NaT,pd.NA) and the rest.- n_uniqueint or None
Distinct non-missing values; None when the cells are unhashable.
- top_countint or None
Count of the most frequent non-missing value.
- orderedbool or None
Whether a categorical dtype is ordered; None for other families.
- n_finite, n_infint or None
Finite and infinite values of a numeric column; None otherwise.
- min, max, mean, std, q1, median, q3float or None
Over finite values;
stdusesddof=1and needs two values.- skewness, kurtosisfloat or None
Bias-corrected sample skewness (needs 3 finite values) and excess kurtosis (needs 4), as
pandas.Series.skew/pandas.Series.kurt; None for constant data.- integer_valuedbool or None
Every finite value is a whole number; None when there is none.
- Parameters:
name (str)
dtype (str)
family (str)
n_rows (int)
n_missing (int)
n_non_null (int)
n_unique (int | None)
top_count (int | None)
ordered (bool | None)
n_finite (int | None)
n_inf (int | None)
min (float | None)
max (float | None)
mean (float | None)
std (float | None)
q1 (float | None)
median (float | None)
q3 (float | None)
skewness (float | None)
kurtosis (float | None)
integer_valued (bool | None)
See also
FeatureSpecHolds the stats of a fitted feature.
- classmethod from_dict(data)[source]#
Rebuild stats from
to_dictoutput, checking field names and types.- Parameters:
- datamapping
The stored fields.
- Returns:
- FeatureStats
The stats.
- Raises:
- ValueError
For unknown or missing fields or wrongly typed values.
- Parameters:
- Return type: