Datasets:

repository
stringclasses
11 values
repo_id
stringlengths
1
3
target_module_path
stringlengths
16
72
prompt
stringlengths
298
21.7k
relavent_test_path
stringlengths
50
99
full_function
stringlengths
336
33.8k
function_name
stringlengths
2
51
content_class
stringclasses
3 values
external_dependencies
stringclasses
2 values
seaborn
0
seaborn/_core/scales.py
def label( self, formatter: Formatter | None = None, *, like: str | Callable | None = None, base: int | None | Default = default, unit: str | None = None, ) -> Continuous: """ Configure the appearance of tick labels for the scale's axis or legend. ...
/usr/src/app/target_test_cases/failed_tests_Continuous.label.txt
def label( self, formatter: Formatter | None = None, *, like: str | Callable | None = None, base: int | None | Default = default, unit: str | None = None, ) -> Continuous: """ Configure the appearance of tick labels for the scale's axis or legend. ...
Continuous.label
repository-level
external
seaborn
1
seaborn/_core/plot.py
def add( self, mark: Mark, *transforms: Stat | Move, orient: str | None = None, legend: bool = True, label: str | None = None, data: DataSource = None, **variables: VariableSpec, ) -> Plot: """ Specify a layer of the visualization i...
/usr/src/app/target_test_cases/failed_tests_Plot.add.txt
def add( self, mark: Mark, *transforms: Stat | Move, orient: str | None = None, legend: bool = True, label: str | None = None, data: DataSource = None, **variables: VariableSpec, ) -> Plot: """ Specify a layer of the visualization i...
Plot.add
repository-level
external
seaborn
2
seaborn/_core/plot.py
def facet( self, col: VariableSpec = None, row: VariableSpec = None, order: OrderSpec | dict[str, OrderSpec] = None, wrap: int | None = None, ) -> Plot: """ Produce subplots with conditional subsets of the data. Parameters ---------- ...
/usr/src/app/target_test_cases/failed_tests_Plot.facet.txt
def facet( self, col: VariableSpec = None, row: VariableSpec = None, order: OrderSpec | dict[str, OrderSpec] = None, wrap: int | None = None, ) -> Plot: """ Produce subplots with conditional subsets of the data. Parameters ---------- ...
Plot.facet
repository-level
non_external
seaborn
3
seaborn/_core/plot.py
def on(self, target: Axes | SubFigure | Figure) -> Plot: """ Provide existing Matplotlib figure or axes for drawing the plot. When using this method, you will also need to explicitly call a method that triggers compilation, such as :meth:`Plot.show` or :meth:`Plot.save`. If you ...
/usr/src/app/target_test_cases/failed_tests_Plot.on.txt
def on(self, target: Axes | SubFigure | Figure) -> Plot: """ Provide existing Matplotlib figure or axes for drawing the plot. When using this method, you will also need to explicitly call a method that triggers compilation, such as :meth:`Plot.show` or :meth:`Plot.save`. If you ...
Plot.on
file-level
external
seaborn
4
seaborn/_core/plot.py
def pair( self, x: VariableSpecList = None, y: VariableSpecList = None, wrap: int | None = None, cross: bool = True, ) -> Plot: """ Produce subplots by pairing multiple `x` and/or `y` variables. Parameters ---------- x, y : sequenc...
/usr/src/app/target_test_cases/failed_tests_Plot.pair.txt
def pair( self, x: VariableSpecList = None, y: VariableSpecList = None, wrap: int | None = None, cross: bool = True, ) -> Plot: """ Produce subplots by pairing multiple `x` and/or `y` variables. Parameters ---------- x, y : sequenc...
Plot.pair
repository-level
non_external
seaborn
5
seaborn/_base.py
def _attach( self, obj, allowed_types=None, log_scale=None, ): """Associate the plotter with an Axes manager and initialize its units. Parameters ---------- obj : :class:`matplotlib.axes.Axes` or :class:'FacetGrid` Structural object th...
/usr/src/app/target_test_cases/failed_tests__base.VectorPlotter._attach.txt
def _attach( self, obj, allowed_types=None, log_scale=None, ): """Associate the plotter with an Axes manager and initialize its units. Parameters ---------- obj : :class:`matplotlib.axes.Axes` or :class:'FacetGrid` Structural object th...
VectorPlotter._attach
repository-level
external
seaborn
6
seaborn/_base.py
def iter_data( self, grouping_vars=None, *, reverse=False, from_comp_data=False, by_facet=True, allow_empty=False, dropna=True, ): """Generator for getting subsets of data defined by semantic variables. Also injects "col" and "row" into grouping semantics. Param...
/usr/src/app/target_test_cases/failed_tests_VectorPlotter.iter_data.txt
def iter_data( self, grouping_vars=None, *, reverse=False, from_comp_data=False, by_facet=True, allow_empty=False, dropna=True, ): """Generator for getting subsets of data defined by semantic variables. Also injects "col" and "row" into grouping semantics. Param...
VectorPlotter.iter_data
repository-level
external
seaborn
7
seaborn/_base.py
def scale_categorical(self, axis, order=None, formatter=None): """ Enforce categorical (fixed-scale) rules for the data on given axis. Parameters ---------- axis : "x" or "y" Axis of the plot to operate on. order : list Order that unique value...
/usr/src/app/target_test_cases/failed_tests__base.VectorPlotter.scale_categorical.txt
def scale_categorical(self, axis, order=None, formatter=None): """ Enforce categorical (fixed-scale) rules for the data on given axis. Parameters ---------- axis : "x" or "y" Axis of the plot to operate on. order : list Order that unique value...
VectorPlotter.scale_categorical
repository-level
external
seaborn
8
seaborn/_base.py
def categorical_order(vector, order=None): """Return a list of unique data values. Determine an ordered list of levels in ``values``. Parameters ---------- vector : list, array, Categorical, or Series Vector of "categorical" values order : list-like, optional Desired order of c...
/usr/src/app/target_test_cases/failed_tests__base.categorical_order.txt
def categorical_order(vector, order=None): """Return a list of unique data values. Determine an ordered list of levels in ``values``. Parameters ---------- vector : list, array, Categorical, or Series Vector of "categorical" values order : list-like, optional Desired order of c...
_base.categorical_order
file-level
external
seaborn
9
seaborn/_base.py
def infer_orient(x=None, y=None, orient=None, require_numeric=True): """Determine how the plot should be oriented based on the data. For historical reasons, the convention is to call a plot "horizontally" or "vertically" oriented based on the axis representing its dependent variable. Practically, this ...
/usr/src/app/target_test_cases/failed_tests_infer_orient.txt
def infer_orient(x=None, y=None, orient=None, require_numeric=True): """Determine how the plot should be oriented based on the data. For historical reasons, the convention is to call a plot "horizontally" or "vertically" oriented based on the axis representing its dependent variable. Practically, this ...
_base.infer_orient
file-level
external
seaborn
10
seaborn/_base.py
def unique_dashes(n): """Build an arbitrarily long list of unique dash styles for lines. Parameters ---------- n : int Number of unique dash specs to generate. Returns ------- dashes : list of strings or tuples Valid arguments for the ``dashes`` parameter on :class:...
/usr/src/app/target_test_cases/failed_tests__base.unique_dashes.txt
def unique_dashes(n): """Build an arbitrarily long list of unique dash styles for lines. Parameters ---------- n : int Number of unique dash specs to generate. Returns ------- dashes : list of strings or tuples Valid arguments for the ``dashes`` parameter on :class:...
_base.unique_dashes
self-contained
non_external
seaborn
11
seaborn/_base.py
def unique_markers(n): """Build an arbitrarily long list of unique marker styles for points. Parameters ---------- n : int Number of unique marker specs to generate. Returns ------- markers : list of string or tuples Values for defining :class:`matplotlib.markers.MarkerStyl...
/usr/src/app/target_test_cases/failed_tests_unique_markers.txt
def unique_markers(n): """Build an arbitrarily long list of unique marker styles for points. Parameters ---------- n : int Number of unique marker specs to generate. Returns ------- markers : list of string or tuples Values for defining :class:`matplotlib.markers.MarkerStyl...
_base.unique_markers
self-contained
non_external
seaborn
12
seaborn/_base.py
def variable_type(vector, boolean_type="numeric"): """ Determine whether a vector contains numeric, categorical, or datetime data. This function differs from the pandas typing API in two ways: - Python sequences or object-typed PyData objects are considered numeric if all of their entries are nu...
/usr/src/app/target_test_cases/failed_tests_variable_type.txt
def variable_type(vector, boolean_type="numeric"): """ Determine whether a vector contains numeric, categorical, or datetime data. This function differs from the pandas typing API in two ways: - Python sequences or object-typed PyData objects are considered numeric if all of their entries are nu...
_base.variable_type
file-level
external
seaborn
13
seaborn/_statistics.py
def __init__(self, k_depth, outlier_prop, trust_alpha): """ Compute percentiles of a distribution using various tail stopping rules. Parameters ---------- k_depth: "tukey", "proportion", "trustworthy", or "full" Stopping rule for choosing tail percentiled to show...
/usr/src/app/target_test_cases/failed_tests__statistics.LetterValues.__init__.txt
def __init__(self, k_depth, outlier_prop, trust_alpha): """ Compute percentiles of a distribution using various tail stopping rules. Parameters ---------- k_depth: "tukey", "proportion", "trustworthy", or "full" Stopping rule for choosing tail percentiled to show...
_statistics.LetterValues.__init__
repository-level
non_external
seaborn
14
seaborn/_statistics.py
def __init__(self, estimator, errorbar=None, **boot_kws): """ Data aggregator that produces a weighted estimate and error bar interval. Parameters ---------- estimator : string Function (or method name) that maps a vector to a scalar. Currently suppor...
/usr/src/app/target_test_cases/failed_tests__statistics.WeightedAggregator.__init__.txt
def __init__(self, estimator, errorbar=None, **boot_kws): """ Data aggregator that produces a weighted estimate and error bar interval. Parameters ---------- estimator : string Function (or method name) that maps a vector to a scalar. Currently suppor...
_statistics.WeightedAggregator.__init__
file-level
non_external
seaborn
15
seaborn/algorithms.py
def bootstrap(*args, **kwargs): """Resample one or more arrays with replacement and store aggregate values. Positional arguments are a sequence of arrays to bootstrap along the first axis and pass to a summary function. Keyword arguments: n_boot : int, default=10000 Number of itera...
/usr/src/app/target_test_cases/failed_tests_algorithms.bootstrap.txt
def bootstrap(*args, **kwargs): """Resample one or more arrays with replacement and store aggregate values. Positional arguments are a sequence of arrays to bootstrap along the first axis and pass to a summary function. Keyword arguments: n_boot : int, default=10000 Number of itera...
algorithms.bootstrap
file-level
external
seaborn
16
seaborn/axisgrid.py
def facet_data(self): """Generator for name indices and data subsets for each facet. Yields ------ (i, j, k), data_ijk : tuple of ints, DataFrame The ints provide an index into the {row, col, hue}_names attribute, and the dataframe contains a subset of the fu...
/usr/src/app/target_test_cases/failed_tests_axisgrid.FacetGrid.facet_data.txt
def facet_data(self): """Generator for name indices and data subsets for each facet. Yields ------ (i, j, k), data_ijk : tuple of ints, DataFrame The ints provide an index into the {row, col, hue}_names attribute, and the dataframe contains a subset of the fu...
axisgrid.FacetGrid.facet_data
file-level
external
seaborn
17
seaborn/axisgrid.py
def map(self, func, *args, **kwargs): """Apply a plotting function to each facet's subset of the data. Parameters ---------- func : callable A plotting function that takes data and keyword arguments. It must plot to the currently active matplotlib Axes and ta...
/usr/src/app/target_test_cases/failed_tests_axisgrid.FacetGrid.map.txt
def map(self, func, *args, **kwargs): """Apply a plotting function to each facet's subset of the data. Parameters ---------- func : callable A plotting function that takes data and keyword arguments. It must plot to the currently active matplotlib Axes and ta...
axisgrid.FacetGrid.map
repository-level
external
seaborn
18
seaborn/axisgrid.py
def map_dataframe(self, func, *args, **kwargs): """Like ``.map`` but passes args as strings and inserts data in kwargs. This method is suitable for plotting with functions that accept a long-form DataFrame as a `data` keyword argument and access the data in that DataFrame using stri...
/usr/src/app/target_test_cases/failed_tests_axisgrid.FacetGrid.map_dataframe.txt
def map_dataframe(self, func, *args, **kwargs): """Like ``.map`` but passes args as strings and inserts data in kwargs. This method is suitable for plotting with functions that accept a long-form DataFrame as a `data` keyword argument and access the data in that DataFrame using stri...
axisgrid.FacetGrid.map_dataframe
file-level
non_external
seaborn
19
seaborn/axisgrid.py
def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws): """Add a reference line(s) to each facet. Parameters ---------- x, y : numeric Value(s) to draw the line(s) at. color : :mod:`matplotlib color <matplotlib.colors>` Specifies...
/usr/src/app/target_test_cases/failed_tests_axisgrid.FacetGrid.refline.txt
def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws): """Add a reference line(s) to each facet. Parameters ---------- x, y : numeric Value(s) to draw the line(s) at. color : :mod:`matplotlib color <matplotlib.colors>` Specifies...
axisgrid.FacetGrid.refline
file-level
external
seaborn
20
seaborn/axisgrid.py
def set_titles(self, template=None, row_template=None, col_template=None, **kwargs): """Draw titles either above each facet or on the grid margins. Parameters ---------- template : string Template for all titles with the formatting keys {col_var} and {col_nam...
/usr/src/app/target_test_cases/failed_tests_axisgrid.FacetGrid.set_titles.txt
def set_titles(self, template=None, row_template=None, col_template=None, **kwargs): """Draw titles either above each facet or on the grid margins. Parameters ---------- template : string Template for all titles with the formatting keys {col_var} and {col_nam...
axisgrid.FacetGrid.set_titles
repository-level
external
seaborn
21
seaborn/axisgrid.py
def add_legend(self, legend_data=None, title=None, label_order=None, adjust_subtitles=False, **kwargs): """Draw a legend, maybe placing it outside axes and resizing the figure. Parameters ---------- legend_data : dict Dictionary mapping label names (or...
/usr/src/app/target_test_cases/failed_tests_axisgrid.Grid.add_legend.txt
def add_legend(self, legend_data=None, title=None, label_order=None, adjust_subtitles=False, **kwargs): """Draw a legend, maybe placing it outside axes and resizing the figure. Parameters ---------- legend_data : dict Dictionary mapping label names (or...
axisgrid.Grid.add_legend
repository-level
external
seaborn
22
seaborn/axisgrid.py
def tick_params(self, axis='both', **kwargs): """Modify the ticks, tick labels, and gridlines. Parameters ---------- axis : {'x', 'y', 'both'} The axis on which to apply the formatting. kwargs : keyword arguments Additional keyword arguments to pass t...
/usr/src/app/target_test_cases/failed_tests_axisgrid.Grid.tick_params.txt
def tick_params(self, axis='both', **kwargs): """Modify the ticks, tick labels, and gridlines. Parameters ---------- axis : {'x', 'y', 'both'} The axis on which to apply the formatting. kwargs : keyword arguments Additional keyword arguments to pass t...
axisgrid.Grid.tick_params
file-level
non_external
seaborn
23
seaborn/axisgrid.py
def plot(self, joint_func, marginal_func, **kwargs): """Draw the plot by passing functions for joint and marginal axes. This method passes the ``kwargs`` dictionary to both functions. If you need more control, call :meth:`JointGrid.plot_joint` and :meth:`JointGrid.plot_marginals` di...
/usr/src/app/target_test_cases/failed_tests_axisgrid.JointGrid.plot.txt
def plot(self, joint_func, marginal_func, **kwargs): """Draw the plot by passing functions for joint and marginal axes. This method passes the ``kwargs`` dictionary to both functions. If you need more control, call :meth:`JointGrid.plot_joint` and :meth:`JointGrid.plot_marginals` di...
axisgrid.JointGrid.plot
file-level
non_external
seaborn
24
seaborn/axisgrid.py
def plot_joint(self, func, **kwargs): """Draw a bivariate plot on the joint axes of the grid. Parameters ---------- func : plotting callable If a seaborn function, it should accept ``x`` and ``y``. Otherwise, it must accept ``x`` and ``y`` vectors of data as ...
/usr/src/app/target_test_cases/failed_tests_axisgrid.JointGrid.plot_joint.txt
def plot_joint(self, func, **kwargs): """Draw a bivariate plot on the joint axes of the grid. Parameters ---------- func : plotting callable If a seaborn function, it should accept ``x`` and ``y``. Otherwise, it must accept ``x`` and ``y`` vectors of data as ...
axisgrid.JointGrid.plot_joint
file-level
external
seaborn
25
seaborn/axisgrid.py
def plot_marginals(self, func, **kwargs): """Draw univariate plots on each marginal axes. Parameters ---------- func : plotting callable If a seaborn function, it should accept ``x`` and ``y`` and plot when only one of them is defined. Otherwise, it must acc...
/usr/src/app/target_test_cases/failed_tests_axisgrid.JointGrid.plot_marginals.txt
def plot_marginals(self, func, **kwargs): """Draw univariate plots on each marginal axes. Parameters ---------- func : plotting callable If a seaborn function, it should accept ``x`` and ``y`` and plot when only one of them is defined. Otherwise, it must acc...
axisgrid.JointGrid.plot_marginals
file-level
external
seaborn
26
seaborn/axisgrid.py
def refline( self, *, x=None, y=None, joint=True, marginal=True, color='.5', linestyle='--', **line_kws ): """Add a reference line(s) to joint and/or marginal axes. Parameters ---------- x, y : numeric Value(s) to draw the line(s) at. joint, m...
/usr/src/app/target_test_cases/failed_tests_axisgrid.JointGrid.refline.txt
def refline( self, *, x=None, y=None, joint=True, marginal=True, color='.5', linestyle='--', **line_kws ): """Add a reference line(s) to joint and/or marginal axes. Parameters ---------- x, y : numeric Value(s) to draw the line(s) at. joint, m...
axisgrid.JointGrid.refline
file-level
non_external
seaborn
27
seaborn/axisgrid.py
def set_axis_labels(self, xlabel="", ylabel="", **kwargs): """Set axis labels on the bivariate axes. Parameters ---------- xlabel, ylabel : strings Label names for the x and y variables. kwargs : key, value mappings Other keyword arguments are passed ...
/usr/src/app/target_test_cases/failed_tests_axisgrid.JointGrid.set_axis_labels.txt
def set_axis_labels(self, xlabel="", ylabel="", **kwargs): """Set axis labels on the bivariate axes. Parameters ---------- xlabel, ylabel : strings Label names for the x and y variables. kwargs : key, value mappings Other keyword arguments are passed ...
axisgrid.JointGrid.set_axis_labels
file-level
non_external
seaborn
28
seaborn/axisgrid.py
def __init__( self, data, *, hue=None, vars=None, x_vars=None, y_vars=None, hue_order=None, palette=None, hue_kws=None, corner=False, diag_sharey=True, height=2.5, aspect=1, layout_pad=.5, despine=True, dropna=False, ): """Initialize the plot figure and PairGrid object. ...
/usr/src/app/target_test_cases/failed_tests_axisgrid.PairGrid.__init__.txt
def __init__( self, data, *, hue=None, vars=None, x_vars=None, y_vars=None, hue_order=None, palette=None, hue_kws=None, corner=False, diag_sharey=True, height=2.5, aspect=1, layout_pad=.5, despine=True, dropna=False, ): """Initialize the plot figure and PairGrid object. ...
axisgrid.PairGrid.__init__
repository-level
external
seaborn
29
seaborn/axisgrid.py
def pairplot( data, *, hue=None, hue_order=None, palette=None, vars=None, x_vars=None, y_vars=None, kind="scatter", diag_kind="auto", markers=None, height=2.5, aspect=1, corner=False, dropna=False, plot_kws=None, diag_kws=None, grid_kws=None, size=None, ): """Plot pairwise relationships in a...
/usr/src/app/target_test_cases/failed_tests_axisgrid.pairplot.txt
def pairplot( data, *, hue=None, hue_order=None, palette=None, vars=None, x_vars=None, y_vars=None, kind="scatter", diag_kind="auto", markers=None, height=2.5, aspect=1, corner=False, dropna=False, plot_kws=None, diag_kws=None, grid_kws=None, size=None, ): """Plot pairwise relationships in a...
axisgrid.pairplot
repository-level
external
seaborn
30
seaborn/_marks/base.py
def _resolve( self, data: DataFrame | dict[str, Any], name: str, scales: dict[str, Scale] | None = None, ) -> Any: """Obtain default, specified, or mapped value for a named feature. Parameters ---------- data : DataFrame or dict with scalar values...
/usr/src/app/target_test_cases/failed_tests_base.Mark._resolve.txt
def _resolve( self, data: DataFrame | dict[str, Any], name: str, scales: dict[str, Scale] | None = None, ) -> Any: """Obtain default, specified, or mapped value for a named feature. Parameters ---------- data : DataFrame or dict with scalar values...
base.Mark._resolve
repository-level
external
seaborn
31
seaborn/_marks/base.py
def resolve_color( mark: Mark, data: DataFrame | dict, prefix: str = "", scales: dict[str, Scale] | None = None, ) -> RGBATuple | ndarray: """ Obtain a default, specified, or mapped value for a color feature. This method exists separately to support the relationship between a color and ...
/usr/src/app/target_test_cases/failed_tests_resolve_color.txt
def resolve_color( mark: Mark, data: DataFrame | dict, prefix: str = "", scales: dict[str, Scale] | None = None, ) -> RGBATuple | ndarray: """ Obtain a default, specified, or mapped value for a color feature. This method exists separately to support the relationship between a color and ...
base.resolve_color
repository-level
external
seaborn
32
seaborn/_core/rules.py
def categorical_order(vector: Series, order: list | None = None) -> list: """ Return a list of unique data values using seaborn's ordering rules. Parameters ---------- vector : Series Vector of "categorical" values order : list Desired order of category levels to override the or...
/usr/src/app/target_test_cases/failed_tests_rules.categorical_order.txt
def categorical_order(vector: Series, order: list | None = None) -> list: """ Return a list of unique data values using seaborn's ordering rules. Parameters ---------- vector : Series Vector of "categorical" values order : list Desired order of category levels to override the or...
categorical_order
file-level
external
seaborn
33
seaborn/palettes.py
def color_palette(palette=None, n_colors=None, desat=None, as_cmap=False): """Return a list of colors or continuous colormap defining a palette. Possible ``palette`` values include: - Name of a seaborn palette (deep, muted, bright, pastel, dark, colorblind) - Name of matplotlib colormap ...
/usr/src/app/target_test_cases/failed_tests_color_palette.txt
def color_palette(palette=None, n_colors=None, desat=None, as_cmap=False): """Return a list of colors or continuous colormap defining a palette. Possible ``palette`` values include: - Name of a seaborn palette (deep, muted, bright, pastel, dark, colorblind) - Name of matplotlib colormap ...
color_palette
repository-level
external
seaborn
34
seaborn/utils.py
def desaturate(color, prop): """Decrease the saturation channel of a color by some percent. Parameters ---------- color : matplotlib color hex, rgb-tuple, or html color name prop : float saturation channel of color will be multiplied by this value Returns ------- new_co...
/usr/src/app/target_test_cases/failed_tests_desaturate.txt
def desaturate(color, prop): """Decrease the saturation channel of a color by some percent. Parameters ---------- color : matplotlib color hex, rgb-tuple, or html color name prop : float saturation channel of color will be multiplied by this value Returns ------- new_co...
desaturate
self-contained
external
seaborn
35
seaborn/_core/groupby.py
def __init__(self, order: list[str] | dict[str, list | None]): """ Initialize the GroupBy from grouping variables and optional level orders. Parameters ---------- order List of variable names or dict mapping names to desired level orders. Level order ...
/usr/src/app/target_test_cases/failed_tests_groupby.GroupBy.__init__.txt
def __init__(self, order: list[str] | dict[str, list | None]): """ Initialize the GroupBy from grouping variables and optional level orders. Parameters ---------- order List of variable names or dict mapping names to desired level orders. Level order ...
groupby.GroupBy.__init__
file-level
non_external
seaborn
36
seaborn/external/kde.py
def evaluate(self, points): """Evaluate the estimated pdf on a set of points. Parameters ---------- points : (# of dimensions, # of points)-array Alternatively, a (# of dimensions,) vector can be passed in and treated as a single point. Returns ...
/usr/src/app/target_test_cases/failed_tests_kde.gaussian_kde.evaluate.txt
def evaluate(self, points): """Evaluate the estimated pdf on a set of points. Parameters ---------- points : (# of dimensions, # of points)-array Alternatively, a (# of dimensions,) vector can be passed in and treated as a single point. Returns ...
kde.gaussian_kde.evaluate
file-level
external
seaborn
37
seaborn/external/kde.py
def set_bandwidth(self, bw_method=None): """Compute the estimator bandwidth with given method. The new bandwidth calculated after a call to `set_bandwidth` is used for subsequent evaluations of the estimated density. Parameters ---------- bw_method : str, scalar or ...
/usr/src/app/target_test_cases/failed_tests_kde.gaussian_kde.set_bandwidth.txt
def set_bandwidth(self, bw_method=None): """Compute the estimator bandwidth with given method. The new bandwidth calculated after a call to `set_bandwidth` is used for subsequent evaluations of the estimated density. Parameters ---------- bw_method : str, scalar or ...
kde.gaussian_kde.set_bandwidth
file-level
external
seaborn
38
seaborn/utils.py
def load_dataset(name, cache=True, data_home=None, **kws): """Load an example dataset from the online repository (requires internet). This function provides quick access to a small number of example datasets that are useful for documenting seaborn or generating reproducible examples for bug reports. It...
/usr/src/app/target_test_cases/failed_tests_load_dataset.txt
def load_dataset(name, cache=True, data_home=None, **kws): """Load an example dataset from the online repository (requires internet). This function provides quick access to a small number of example datasets that are useful for documenting seaborn or generating reproducible examples for bug reports. It...
load_dataset
file-level
external
seaborn
39
seaborn/matrix.py
def clustermap( data, *, pivot_kws=None, method='average', metric='euclidean', z_score=None, standard_scale=None, figsize=(10, 10), cbar_kws=None, row_cluster=True, col_cluster=True, row_linkage=None, col_linkage=None, row_colors=None, col_colors=None, mask=None, dendrogram_ratio=.2, colors_...
/usr/src/app/target_test_cases/failed_tests_matrix.clustermap.txt
def clustermap( data, *, pivot_kws=None, method='average', metric='euclidean', z_score=None, standard_scale=None, figsize=(10, 10), cbar_kws=None, row_cluster=True, col_cluster=True, row_linkage=None, col_linkage=None, row_colors=None, col_colors=None, mask=None, dendrogram_ratio=.2, colors_...
matrix.clustermap
file-level
non_external
seaborn
40
seaborn/matrix.py
def dendrogram( data, *, linkage=None, axis=1, label=True, metric='euclidean', method='average', rotate=False, tree_kws=None, ax=None ): """Draw a tree diagram of relationships within a matrix Parameters ---------- data : pandas.DataFrame Rectangular data linkage : numpy.array, ...
/usr/src/app/target_test_cases/failed_tests_matrix.dendrogram.txt
def dendrogram( data, *, linkage=None, axis=1, label=True, metric='euclidean', method='average', rotate=False, tree_kws=None, ax=None ): """Draw a tree diagram of relationships within a matrix Parameters ---------- data : pandas.DataFrame Rectangular data linkage : numpy.array, ...
matrix.dendrogram
file-level
external
seaborn
41
seaborn/matrix.py
def heatmap( data, *, vmin=None, vmax=None, cmap=None, center=None, robust=False, annot=None, fmt=".2g", annot_kws=None, linewidths=0, linecolor="white", cbar=True, cbar_kws=None, cbar_ax=None, square=False, xticklabels="auto", yticklabels="auto", mask=None, ax=None, **kwargs ): """P...
/usr/src/app/target_test_cases/failed_tests_matrix.heatmap.txt
def heatmap( data, *, vmin=None, vmax=None, cmap=None, center=None, robust=False, annot=None, fmt=".2g", annot_kws=None, linewidths=0, linecolor="white", cbar=True, cbar_kws=None, cbar_ax=None, square=False, xticklabels="auto", yticklabels="auto", mask=None, ax=None, **kwargs ): """P...
matrix.heatmap
file-level
external
seaborn
42
seaborn/palettes.py
def blend_palette(colors, n_colors=6, as_cmap=False, input="rgb"): """Make a palette that blends between a list of colors. Parameters ---------- colors : sequence of colors in various formats interpreted by `input` hex code, html color name, or tuple in `input` space. n_colors : int, option...
/usr/src/app/target_test_cases/failed_tests_palettes.blend_palette.txt
def blend_palette(colors, n_colors=6, as_cmap=False, input="rgb"): """Make a palette that blends between a list of colors. Parameters ---------- colors : sequence of colors in various formats interpreted by `input` hex code, html color name, or tuple in `input` space. n_colors : int, option...
palettes.blend_palette
file-level
external
seaborn
43
seaborn/palettes.py
def crayon_palette(colors): """Make a palette with color names from Crayola crayons. Colors are taken from here: https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors This is just a simple wrapper around the `seaborn.crayons` dictionary. Parameters ---------- colors : list of string...
/usr/src/app/target_test_cases/failed_tests_palettes.crayon_palette.txt
def crayon_palette(colors): """Make a palette with color names from Crayola crayons. Colors are taken from here: https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors This is just a simple wrapper around the `seaborn.crayons` dictionary. Parameters ---------- colors : list of string...
palettes.crayon_palette
repository-level
non_external
seaborn
44
seaborn/palettes.py
def cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8, light=.85, dark=.15, reverse=False, as_cmap=False): """Make a sequential palette from the cubehelix system. This produces a colormap with linearly-decreasing (or increasing) brightness. That means that information ...
/usr/src/app/target_test_cases/failed_tests_palettes.cubehelix_palette.txt
def cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8, light=.85, dark=.15, reverse=False, as_cmap=False): """Make a sequential palette from the cubehelix system. This produces a colormap with linearly-decreasing (or increasing) brightness. That means that information ...
palettes.cubehelix_palette
file-level
external
seaborn
45
seaborn/palettes.py
def dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input="rgb"): """Make a sequential palette that blends from dark to ``color``. This kind of palette is good for data that range between relatively uninteresting low values and interesting high values. The ``color`` parameter can be spec...
/usr/src/app/target_test_cases/failed_tests_palettes.dark_palette.txt
def dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input="rgb"): """Make a sequential palette that blends from dark to ``color``. This kind of palette is good for data that range between relatively uninteresting low values and interesting high values. The ``color`` parameter can be spec...
palettes.dark_palette
repository-level
non_external
seaborn
46
seaborn/palettes.py
def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa center="light", as_cmap=False): """Make a diverging palette between two HUSL colors. If you are using the IPython notebook, you can also choose this palette interactively with the :func:`choose_diverging_palette` func...
/usr/src/app/target_test_cases/failed_tests_palettes.diverging_palette.txt
def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa center="light", as_cmap=False): """Make a diverging palette between two HUSL colors. If you are using the IPython notebook, you can also choose this palette interactively with the :func:`choose_diverging_palette` func...
palettes.diverging_palette
file-level
external
seaborn
47
seaborn/palettes.py
def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa """ Return hues with constant lightness and saturation in the HLS system. The hues are evenly sampled along a circular path. The resulting palette will be appropriate for categorical or cyclical data. The `h`, `l`, and `s` val...
/usr/src/app/target_test_cases/failed_tests_palettes.hls_palette.txt
def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa """ Return hues with constant lightness and saturation in the HLS system. The hues are evenly sampled along a circular path. The resulting palette will be appropriate for categorical or cyclical data. The `h`, `l`, and `s` val...
palettes.hls_palette
file-level
external
seaborn
48
seaborn/palettes.py
def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa """ Return hues with constant lightness and saturation in the HUSL system. The hues are evenly sampled along a circular path. The resulting palette will be appropriate for categorical or cyclical data. The `h`, `l`, and `s` v...
/usr/src/app/target_test_cases/failed_tests_palettes.husl_palette.txt
def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa """ Return hues with constant lightness and saturation in the HUSL system. The hues are evenly sampled along a circular path. The resulting palette will be appropriate for categorical or cyclical data. The `h`, `l`, and `s` v...
palettes.husl_palette
file-level
external
seaborn
49
seaborn/palettes.py
def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input="rgb"): """Make a sequential palette that blends from light to ``color``. The ``color`` parameter can be specified in a number of ways, including all options for defining a color in matplotlib and several additional color spaces t...
/usr/src/app/target_test_cases/failed_tests_palettes.light_palette.txt
def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input="rgb"): """Make a sequential palette that blends from light to ``color``. The ``color`` parameter can be specified in a number of ways, including all options for defining a color in matplotlib and several additional color spaces t...
palettes.light_palette
repository-level
non_external
seaborn
50
seaborn/palettes.py
def set_color_codes(palette="deep"): """Change how matplotlib color shorthands are interpreted. Calling this will change how shorthand codes like "b" or "g" are interpreted by matplotlib in subsequent plots. Parameters ---------- palette : {deep, muted, pastel, dark, bright, colorblind} ...
/usr/src/app/target_test_cases/failed_tests_palettes.set_color_codes.txt
def set_color_codes(palette="deep"): """Change how matplotlib color shorthands are interpreted. Calling this will change how shorthand codes like "b" or "g" are interpreted by matplotlib in subsequent plots. Parameters ---------- palette : {deep, muted, pastel, dark, bright, colorblind} ...
palettes.set_color_codes
file-level
external
seaborn
51
seaborn/palettes.py
def xkcd_palette(colors): """Make a palette with color names from the xkcd color survey. See xkcd for the full list of colors: https://xkcd.com/color/rgb/ This is just a simple wrapper around the `seaborn.xkcd_rgb` dictionary. Parameters ---------- colors : list of strings List of key...
/usr/src/app/target_test_cases/failed_tests_palettes.xkcd_palette.txt
def xkcd_palette(colors): """Make a palette with color names from the xkcd color survey. See xkcd for the full list of colors: https://xkcd.com/color/rgb/ This is just a simple wrapper around the `seaborn.xkcd_rgb` dictionary. Parameters ---------- colors : list of strings List of key...
palettes.xkcd_palette
repository-level
non_external
seaborn
52
seaborn/_core/plot.py
def label( self, *, title: str | None = None, legend: str | None = None, **variables: str | Callable[[str], str] ) -> Plot: """ Control the labels and titles for axes, legends, and subplots. Additional keywords correspond to variables defined in the plot....
/usr/src/app/target_test_cases/failed_tests_plot.Plot.label.txt
def label( self, *, title: str | None = None, legend: str | None = None, **variables: str | Callable[[str], str] ) -> Plot: """ Control the labels and titles for axes, legends, and subplots. Additional keywords correspond to variables defined in the plot....
plot.Plot.label
file-level
external
seaborn
53
seaborn/_core/plot.py
def layout( self, *, size: tuple[float, float] | Default = default, engine: str | None | Default = default, extent: tuple[float, float, float, float] | Default = default, ) -> Plot: """ Control the figure size and layout. .. note:: De...
/usr/src/app/target_test_cases/failed_tests_plot.Plot.layout.txt
def layout( self, *, size: tuple[float, float] | Default = default, engine: str | None | Default = default, extent: tuple[float, float, float, float] | Default = default, ) -> Plot: """ Control the figure size and layout. .. note:: De...
plot.Plot.layout
repository-level
non_external
seaborn
54
seaborn/_core/plot.py
def limit(self, **limits: tuple[Any, Any]) -> Plot: """ Control the range of visible data. Keywords correspond to variables defined in the plot, and values are a `(min, max)` tuple (where either can be `None` to leave unset). Limits apply only to the axis; data outside the ...
/usr/src/app/target_test_cases/failed_tests_plot.Plot.limit.txt
def limit(self, **limits: tuple[Any, Any]) -> Plot: """ Control the range of visible data. Keywords correspond to variables defined in the plot, and values are a `(min, max)` tuple (where either can be `None` to leave unset). Limits apply only to the axis; data outside the ...
plot.Plot.limit
file-level
external
seaborn
55
seaborn/_core/plot.py
def save(self, loc, **kwargs) -> Plot: """ Compile the plot and write it to a buffer or file on disk. Parameters ---------- loc : str, path, or buffer Location on disk to save the figure, or a buffer to write into. kwargs Other keyword argumen...
/usr/src/app/target_test_cases/failed_tests_plot.Plot.save.txt
def save(self, loc, **kwargs) -> Plot: """ Compile the plot and write it to a buffer or file on disk. Parameters ---------- loc : str, path, or buffer Location on disk to save the figure, or a buffer to write into. kwargs Other keyword argumen...
plot.Plot.save
file-level
non_external
seaborn
56
seaborn/_core/plot.py
def scale(self, **scales: Scale) -> Plot: """ Specify mappings from data units to visual properties. Keywords correspond to variables defined in the plot, including coordinate variables (`x`, `y`) and semantic variables (`color`, `pointsize`, etc.). A number of "magic" argu...
/usr/src/app/target_test_cases/failed_tests_plot.Plot.scale.txt
def scale(self, **scales: Scale) -> Plot: """ Specify mappings from data units to visual properties. Keywords correspond to variables defined in the plot, including coordinate variables (`x`, `y`) and semantic variables (`color`, `pointsize`, etc.). A number of "magic" argu...
plot.Plot.scale
repository-level
non_external
seaborn
57
seaborn/_core/plot.py
def share(self, **shares: bool | str) -> Plot: """ Control sharing of axis limits and ticks across subplots. Keywords correspond to variables defined in the plot, and values can be boolean (to share across all subplots), or one of "row" or "col" (to share more selectively ac...
/usr/src/app/target_test_cases/failed_tests_plot.Plot.share.txt
def share(self, **shares: bool | str) -> Plot: """ Control sharing of axis limits and ticks across subplots. Keywords correspond to variables defined in the plot, and values can be boolean (to share across all subplots), or one of "row" or "col" (to share more selectively ac...
plot.Plot.share
file-level
non_external
seaborn
58
seaborn/_core/plot.py
def theme(self, config: Mapping[str, Any], /) -> Plot: """ Control the appearance of elements in the plot. .. note:: The API for customizing plot appearance is not yet finalized. Currently, the only valid argument is a dict of matplotlib rc parameters. (...
/usr/src/app/target_test_cases/failed_tests_plot.Plot.theme.txt
def theme(self, config: Mapping[str, Any], /) -> Plot: """ Control the appearance of elements in the plot. .. note:: The API for customizing plot appearance is not yet finalized. Currently, the only valid argument is a dict of matplotlib rc parameters. (...
plot.Plot.theme
file-level
external
seaborn
59
seaborn/_core/properties.py
def _default_values(self, n: int) -> list[DashPatternWithOffset]: """Build an arbitrarily long list of unique dash styles for lines. Parameters ---------- n : int Number of unique dash specs to generate. Returns ------- dashes : list of strings o...
/usr/src/app/target_test_cases/failed_tests_properties.LineStyle._default_values.txt
def _default_values(self, n: int) -> list[DashPatternWithOffset]: """Build an arbitrarily long list of unique dash styles for lines. Parameters ---------- n : int Number of unique dash specs to generate. Returns ------- dashes : list of strings o...
properties.LineStyle._default_values
file-level
non_external
seaborn
60
seaborn/_core/properties.py
def _default_values(self, n: int) -> list[MarkerStyle]: """Build an arbitrarily long list of unique marker styles. Parameters ---------- n : int Number of unique marker specs to generate. Returns ------- markers : list of string or tuples ...
/usr/src/app/target_test_cases/failed_tests_properties.Marker._default_values.txt
def _default_values(self, n: int) -> list[MarkerStyle]: """Build an arbitrarily long list of unique marker styles. Parameters ---------- n : int Number of unique marker specs to generate. Returns ------- markers : list of string or tuples ...
properties.Marker._default_values
self-contained
external
seaborn
61
seaborn/rcmod.py
def set_context(context=None, font_scale=1, rc=None): """ Set the parameters that control the scaling of plot elements. These parameters correspond to label size, line thickness, etc. Calling this function modifies the global matplotlib `rcParams`. For more information, see the :doc:`aesthetics tut...
/usr/src/app/target_test_cases/failed_tests_rcmod.set_context.txt
def set_context(context=None, font_scale=1, rc=None): """ Set the parameters that control the scaling of plot elements. These parameters correspond to label size, line thickness, etc. Calling this function modifies the global matplotlib `rcParams`. For more information, see the :doc:`aesthetics tut...
rcmod.set_context
file-level
external
seaborn
62
seaborn/rcmod.py
def set_palette(palette, n_colors=None, desat=None, color_codes=False): """Set the matplotlib color cycle using a seaborn palette. Parameters ---------- palette : seaborn color palette | matplotlib colormap | hls | husl Palette definition. Should be something :func:`color_palette` can process. ...
/usr/src/app/target_test_cases/failed_tests_rcmod.set_palette.txt
def set_palette(palette, n_colors=None, desat=None, color_codes=False): """Set the matplotlib color cycle using a seaborn palette. Parameters ---------- palette : seaborn color palette | matplotlib colormap | hls | husl Palette definition. Should be something :func:`color_palette` can process. ...
rcmod.set_palette
repository-level
external
seaborn
63
seaborn/rcmod.py
def set_style(style=None, rc=None): """ Set the parameters that control the general style of the plots. The style parameters control properties like the color of the background and whether a grid is enabled by default. This is accomplished using the matplotlib rcParams system. The options are ...
/usr/src/app/target_test_cases/failed_tests_rcmod.set_style.txt
def set_style(style=None, rc=None): """ Set the parameters that control the general style of the plots. The style parameters control properties like the color of the background and whether a grid is enabled by default. This is accomplished using the matplotlib rcParams system. The options are ...
rcmod.set_style
file-level
external
seaborn
64
seaborn/rcmod.py
def set_theme(context="notebook", style="darkgrid", palette="deep", font="sans-serif", font_scale=1, color_codes=True, rc=None): """ Set aspects of the visual theme for all matplotlib and seaborn plots. This function changes the global defaults for all plots using the matplotlib rcParams ...
/usr/src/app/target_test_cases/failed_tests_rcmod.set_theme.txt
def set_theme(context="notebook", style="darkgrid", palette="deep", font="sans-serif", font_scale=1, color_codes=True, rc=None): """ Set aspects of the visual theme for all matplotlib and seaborn plots. This function changes the global defaults for all plots using the matplotlib rcParams ...
rcmod.set_theme
file-level
external
seaborn
65
seaborn/regression.py
def residplot( data=None, *, x=None, y=None, x_partial=None, y_partial=None, lowess=False, order=1, robust=False, dropna=True, label=None, color=None, scatter_kws=None, line_kws=None, ax=None ): """Plot the residuals of a linear regression. This function will regress y on x (possibly as a robus...
/usr/src/app/target_test_cases/failed_tests_regression.residplot.txt
def residplot( data=None, *, x=None, y=None, x_partial=None, y_partial=None, lowess=False, order=1, robust=False, dropna=True, label=None, color=None, scatter_kws=None, line_kws=None, ax=None ): """Plot the residuals of a linear regression. This function will regress y on x (possibly as a robus...
regression.residplot
file-level
external
seaborn
66
seaborn/_core/rules.py
def variable_type( vector: Series, boolean_type: Literal["numeric", "categorical", "boolean"] = "numeric", strict_boolean: bool = False, ) -> VarType: """ Determine whether a vector contains numeric, categorical, or datetime data. This function differs from the pandas typing API in a few ways: ...
/usr/src/app/target_test_cases/failed_tests_rules.variable_type.txt
def variable_type( vector: Series, boolean_type: Literal["numeric", "categorical", "boolean"] = "numeric", strict_boolean: bool = False, ) -> VarType: """ Determine whether a vector contains numeric, categorical, or datetime data. This function differs from the pandas typing API in a few ways: ...
rules.variable_type
file-level
external
seaborn
67
seaborn/_core/scales.py
def tick( self, locator: Locator | None = None, *, at: Sequence[float] | None = None, upto: int | None = None, count: int | None = None, every: float | None = None, between: tuple[float, float] | None = None, minor: int | None = None, ) -> Continuo...
/usr/src/app/target_test_cases/failed_tests_scales.Continuous.tick.txt
def tick( self, locator: Locator | None = None, *, at: Sequence[float] | None = None, upto: int | None = None, count: int | None = None, every: float | None = None, between: tuple[float, float] | None = None, minor: int | None = None, ) -> Continuo...
scales.Continuous.tick
file-level
external
seaborn
68
seaborn/_core/scales.py
def label( self, formatter: Formatter | None = None, *, concise: bool = False, ) -> Temporal: """ Configure the appearance of tick labels for the scale's axis or legend. .. note:: This API is under construction and will be enhanced over time. ...
/usr/src/app/target_test_cases/failed_tests_scales.Temporal.label.txt
def label( self, formatter: Formatter | None = None, *, concise: bool = False, ) -> Temporal: """ Configure the appearance of tick labels for the scale's axis or legend. .. note:: This API is under construction and will be enhanced over time. ...
scales.Temporal.label
file-level
external
seaborn
69
seaborn/_core/scales.py
def tick( self, locator: Locator | None = None, *, upto: int | None = None, ) -> Temporal: """ Configure the selection of ticks for the scale's axis or legend. .. note:: This API is under construction and will be enhanced over time. Parameters ...
/usr/src/app/target_test_cases/failed_tests_scales.Temporal.tick.txt
def tick( self, locator: Locator | None = None, *, upto: int | None = None, ) -> Temporal: """ Configure the selection of ticks for the scale's axis or legend. .. note:: This API is under construction and will be enhanced over time. Parameters ...
scales.Temporal.tick
file-level
external
seaborn
70
seaborn/utils.py
def ci_to_errsize(cis, heights): """Convert intervals to error arguments relative to plot heights. Parameters ---------- cis : 2 x n sequence sequence of confidence interval limits heights : n sequence sequence of plot heights Returns ------- errsize : 2 x n array ...
/usr/src/app/target_test_cases/failed_tests_utils.ci_to_errsize.txt
def ci_to_errsize(cis, heights): """Convert intervals to error arguments relative to plot heights. Parameters ---------- cis : 2 x n sequence sequence of confidence interval limits heights : n sequence sequence of plot heights Returns ------- errsize : 2 x n array ...
utils.ci_to_errsize
self-contained
external
seaborn
71
seaborn/utils.py
def despine(fig=None, ax=None, top=True, right=True, left=False, bottom=False, offset=None, trim=False): """Remove the top and right spines from plot(s). fig : matplotlib figure, optional Figure to despine all axes of, defaults to the current figure. ax : matplotlib axes, optional ...
/usr/src/app/target_test_cases/failed_tests_utils.despine.txt
def despine(fig=None, ax=None, top=True, right=True, left=False, bottom=False, offset=None, trim=False): """Remove the top and right spines from plot(s). fig : matplotlib figure, optional Figure to despine all axes of, defaults to the current figure. ax : matplotlib axes, optional ...
utils.despine
file-level
external
seaborn
72
seaborn/utils.py
def get_color_cycle(): """Return the list of colors in the current matplotlib color cycle Parameters ---------- None Returns ------- colors : list List of matplotlib colors in the current cycle, or dark gray if the current color cycle is empty. """
/usr/src/app/target_test_cases/failed_tests_utils.get_color_cycle.txt
def get_color_cycle(): """Return the list of colors in the current matplotlib color cycle Parameters ---------- None Returns ------- colors : list List of matplotlib colors in the current cycle, or dark gray if the current color cycle is empty. """ cycler = mpl.rcPa...
utils.get_color_cycle
self-contained
external
seaborn
73
seaborn/utils.py
def move_legend(obj, loc, **kwargs): """ Recreate a plot's legend at a new location. The name is a slight misnomer. Matplotlib legends do not expose public control over their position parameters. So this function creates a new legend, copying over the data from the original object, which is then re...
/usr/src/app/target_test_cases/failed_tests_utils.move_legend.txt
def move_legend(obj, loc, **kwargs): """ Recreate a plot's legend at a new location. The name is a slight misnomer. Matplotlib legends do not expose public control over their position parameters. So this function creates a new legend, copying over the data from the original object, which is then re...
utils.move_legend
repository-level
external
seaborn
74
seaborn/utils.py
def remove_na(vector): """Helper method for removing null values from data vectors. Parameters ---------- vector : vector object Must implement boolean masking with [] subscript syntax. Returns ------- clean_clean : same type as ``vector`` Vector of data with null values re...
/usr/src/app/target_test_cases/failed_tests_utils.remove_na.txt
def remove_na(vector): """Helper method for removing null values from data vectors. Parameters ---------- vector : vector object Must implement boolean masking with [] subscript syntax. Returns ------- clean_clean : same type as ``vector`` Vector of data with null values re...
utils.remove_na
self-contained
external
seaborn
75
seaborn/utils.py
def saturate(color): """Return a fully saturated color with the same hue. Parameters ---------- color : matplotlib color hex, rgb-tuple, or html color name Returns ------- new_color : rgb tuple saturated color code in RGB tuple representation """
/usr/src/app/target_test_cases/failed_tests_utils.saturate.txt
def saturate(color): """Return a fully saturated color with the same hue. Parameters ---------- color : matplotlib color hex, rgb-tuple, or html color name Returns ------- new_color : rgb tuple saturated color code in RGB tuple representation """ return set_hls_val...
utils.saturate
file-level
non_external
seaborn
76
seaborn/utils.py
def set_hls_values(color, h=None, l=None, s=None): # noqa """Independently manipulate the h, l, or s channels of a color. Parameters ---------- color : matplotlib color hex, rgb-tuple, or html color name h, l, s : floats between 0 and 1, or None new values for each channel in hls s...
/usr/src/app/target_test_cases/failed_tests_utils.set_hls_values.txt
def set_hls_values(color, h=None, l=None, s=None): # noqa """Independently manipulate the h, l, or s channels of a color. Parameters ---------- color : matplotlib color hex, rgb-tuple, or html color name h, l, s : floats between 0 and 1, or None new values for each channel in hls s...
utils.set_hls_values
self-contained
external
seaborn
77
seaborn/utils.py
def to_utf8(obj): """Return a string representing a Python object. Strings (i.e. type ``str``) are returned unchanged. Byte strings (i.e. type ``bytes``) are returned as UTF-8-decoded strings. For other objects, the method ``__str__()`` is called, and the result is returned as a string. Para...
/usr/src/app/target_test_cases/failed_tests_utils.to_utf8.txt
def to_utf8(obj): """Return a string representing a Python object. Strings (i.e. type ``str``) are returned unchanged. Byte strings (i.e. type ``bytes``) are returned as UTF-8-decoded strings. For other objects, the method ``__str__()`` is called, and the result is returned as a string. Para...
utils.to_utf8
self-contained
non_external
scikit-learn
0
sklearn/linear_model/_bayes.py
def fit(self, X, y): """Fit the model according to the given training data and parameters. Iterative procedure to maximize the evidence Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where `n_samples` is the number of samp...
/usr/src/app/target_test_cases/failed_tests_ARDRegression.fit.txt
def fit(self, X, y): """Fit the model according to the given training data and parameters. Iterative procedure to maximize the evidence Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where `n_samples` is the number of samp...
ARDRegression.fit
repository-level
external
scikit-learn
1
sklearn/linear_model/_bayes.py
def predict(self, X, return_std=False): """Predict using the linear model. In addition to the mean of the predictive distribution, also its standard deviation can be returned. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) ...
/usr/src/app/target_test_cases/failed_tests_ARDRegression.predict.txt
def predict(self, X, return_std=False): """Predict using the linear model. In addition to the mean of the predictive distribution, also its standard deviation can be returned. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) ...
ARDRegression.predict
repository-level
external
scikit-learn
2
sklearn/ensemble/_weight_boosting.py
def decision_function(self, X): """Compute the decision function of ``X``. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, CSR, COO, DOK, or LIL. COO, DOK, and LIL ar...
/usr/src/app/target_test_cases/failed_tests_AdaBoostClassifier.decision_function.txt
def decision_function(self, X): """Compute the decision function of ``X``. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, CSR, COO, DOK, or LIL. COO, DOK, and LIL ar...
AdaBoostClassifier.decision_function
repository-level
external
scikit-learn
3
sklearn/kernel_approximation.py
def fit(self, X, y=None): """Only validates estimator's parameters. This method allows to: (i) validate the estimator's parameters and (ii) be consistent with the scikit-learn transformer API. Parameters ---------- X : array-like, shape (n_samples, n_features) ...
/usr/src/app/target_test_cases/failed_tests_AdditiveChi2Sampler.fit.txt
def fit(self, X, y=None): """Only validates estimator's parameters. This method allows to: (i) validate the estimator's parameters and (ii) be consistent with the scikit-learn transformer API. Parameters ---------- X : array-like, shape (n_samples, n_features) ...
AdditiveChi2Sampler.fit
repository-level
non_external
scikit-learn
4
sklearn/kernel_approximation.py
def transform(self, X): """Apply approximate feature map to X. Parameters ---------- X : {array-like, sparse matrix}, shape (n_samples, n_features) Training data, where `n_samples` is the number of samples and `n_features` is the number of features. ...
/usr/src/app/target_test_cases/failed_tests_AdditiveChi2Sampler.transform.txt
def transform(self, X): """Apply approximate feature map to X. Parameters ---------- X : {array-like, sparse matrix}, shape (n_samples, n_features) Training data, where `n_samples` is the number of samples and `n_features` is the number of features. ...
AdditiveChi2Sampler.transform
repository-level
external
scikit-learn
5
sklearn/cluster/_affinity_propagation.py
def fit(self, X, y=None): """Fit the clustering from features, or affinity matrix. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features), or \ array-like of shape (n_samples, n_samples) Training instances to cluster, or si...
/usr/src/app/target_test_cases/failed_tests_AffinityPropagation.fit.txt
def fit(self, X, y=None): """Fit the clustering from features, or affinity matrix. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features), or \ array-like of shape (n_samples, n_samples) Training instances to cluster, or si...
AffinityPropagation.fit
repository-level
external
scikit-learn
6
sklearn/cluster/_affinity_propagation.py
def predict(self, X): """Predict the closest cluster each sample in X belongs to. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) New data to predict. If a sparse matrix is provided, it will be converted into a sparse ``...
/usr/src/app/target_test_cases/failed_tests_AffinityPropagation.predict.txt
def predict(self, X): """Predict the closest cluster each sample in X belongs to. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) New data to predict. If a sparse matrix is provided, it will be converted into a sparse ``...
AffinityPropagation.predict
repository-level
external
scikit-learn
7
sklearn/ensemble/_bagging.py
def predict_log_proba(self, X): """Predict class log-probabilities for X. The predicted class log-probabilities of an input sample is computed as the log of the mean predicted class probabilities of the base estimators in the ensemble. Parameters ---------- ...
/usr/src/app/target_test_cases/failed_tests_BaggingClassifier.predict_log_proba.txt
def predict_log_proba(self, X): """Predict class log-probabilities for X. The predicted class log-probabilities of an input sample is computed as the log of the mean predicted class probabilities of the base estimators in the ensemble. Parameters ---------- ...
BaggingClassifier.predict_log_proba
repository-level
external
scikit-learn
8
sklearn/ensemble/_bagging.py
def predict_proba(self, X): """Predict class probabilities for X. The predicted class probabilities of an input sample is computed as the mean predicted class probabilities of the base estimators in the ensemble. If base estimators do not implement a ``predict_proba`` method...
/usr/src/app/target_test_cases/failed_tests_BaggingClassifier.predict_proba.txt
def predict_proba(self, X): """Predict class probabilities for X. The predicted class probabilities of an input sample is computed as the mean predicted class probabilities of the base estimators in the ensemble. If base estimators do not implement a ``predict_proba`` method...
BaggingClassifier.predict_proba
repository-level
non_external
scikit-learn
9
sklearn/linear_model/_bayes.py
def fit(self, X, y, sample_weight=None): """Fit the model. Parameters ---------- X : ndarray of shape (n_samples, n_features) Training data. y : ndarray of shape (n_samples,) Target values. Will be cast to X's dtype if necessary. sample_weigh...
/usr/src/app/target_test_cases/failed_tests_BayesianRidge.fit.txt
def fit(self, X, y, sample_weight=None): """Fit the model. Parameters ---------- X : ndarray of shape (n_samples, n_features) Training data. y : ndarray of shape (n_samples,) Target values. Will be cast to X's dtype if necessary. sample_weigh...
BayesianRidge.fit
repository-level
external
scikit-learn
10
sklearn/linear_model/_bayes.py
def predict(self, X, return_std=False): """Predict using the linear model. In addition to the mean of the predictive distribution, also its standard deviation can be returned. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) ...
/usr/src/app/target_test_cases/failed_tests_BayesianRidge.predict.txt
def predict(self, X, return_std=False): """Predict using the linear model. In addition to the mean of the predictive distribution, also its standard deviation can be returned. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) ...
BayesianRidge.predict
file-level
external
scikit-learn
11
sklearn/neural_network/_rbm.py
def fit(self, X, y=None): """Fit the model to the data X. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training data. y : array-like of shape (n_samples,) or (n_samples, n_outputs), default=None Target values...
/usr/src/app/target_test_cases/failed_tests_BernoulliRBM.fit.txt
def fit(self, X, y=None): """Fit the model to the data X. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training data. y : array-like of shape (n_samples,) or (n_samples, n_outputs), default=None Target values...
BernoulliRBM.fit
repository-level
external
scikit-learn
12
sklearn/neural_network/_rbm.py
def partial_fit(self, X, y=None): """Fit the model to the partial segment of the data X. Parameters ---------- X : ndarray of shape (n_samples, n_features) Training data. y : array-like of shape (n_samples,) or (n_samples, n_outputs), default=None Ta...
/usr/src/app/target_test_cases/failed_tests_BernoulliRBM.partial_fit.txt
def partial_fit(self, X, y=None): """Fit the model to the partial segment of the data X. Parameters ---------- X : ndarray of shape (n_samples, n_features) Training data. y : array-like of shape (n_samples,) or (n_samples, n_outputs), default=None Ta...
BernoulliRBM.partial_fit
repository-level
external
scikit-learn
13
sklearn/neural_network/_rbm.py
def score_samples(self, X): """Compute the pseudo-likelihood of X. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Values of the visible layer. Must be all-boolean (not checked). Returns ------- pseudo_likel...
/usr/src/app/target_test_cases/failed_tests_BernoulliRBM.score_samples.txt
def score_samples(self, X): """Compute the pseudo-likelihood of X. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Values of the visible layer. Must be all-boolean (not checked). Returns ------- pseudo_likel...
BernoulliRBM.score_samples
repository-level
external
scikit-learn
14
sklearn/cluster/_bisect_k_means.py
def fit(self, X, y=None, sample_weight=None): """Compute bisecting k-means clustering. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training instances to cluster. .. note:: The data will be converted to C ordering, ...
/usr/src/app/target_test_cases/failed_tests_BisectingKMeans.fit.txt
def fit(self, X, y=None, sample_weight=None): """Compute bisecting k-means clustering. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training instances to cluster. .. note:: The data will be converted to C ordering, ...
BisectingKMeans.fit
repository-level
external
scikit-learn
15
sklearn/calibration.py
def fit(self, X, y, sample_weight=None, **fit_params): """Fit the calibrated model. Parameters ---------- X : array-like of shape (n_samples, n_features) Training data. y : array-like of shape (n_samples,) Target values. sample_weight : arra...
/usr/src/app/target_test_cases/failed_tests_CalibratedClassifierCV.fit.txt
def fit(self, X, y, sample_weight=None, **fit_params): """Fit the calibrated model. Parameters ---------- X : array-like of shape (n_samples, n_features) Training data. y : array-like of shape (n_samples,) Target values. sample_weight : arra...
CalibratedClassifierCV.fit
repository-level
external
scikit-learn
16
sklearn/calibration.py
def predict_proba(self, X): """Calibrated probabilities of classification. This function returns calibrated probabilities of classification according to each class on an array of test vectors X. Parameters ---------- X : array-like of shape (n_samples, n_features) ...
/usr/src/app/target_test_cases/failed_tests_CalibratedClassifierCV.predict_proba.txt
def predict_proba(self, X): """Calibrated probabilities of classification. This function returns calibrated probabilities of classification according to each class on an array of test vectors X. Parameters ---------- X : array-like of shape (n_samples, n_features) ...
CalibratedClassifierCV.predict_proba
repository-level
external
scikit-learn
17
sklearn/calibration.py
def plot(self, *, ax=None, name=None, ref_line=True, **kwargs): """Plot visualization. Extra keyword arguments will be passed to :func:`matplotlib.pyplot.plot`. Parameters ---------- ax : Matplotlib Axes, default=None Axes object to plot on. If `None`, a...
/usr/src/app/target_test_cases/failed_tests_CalibrationDisplay.plot.txt
def plot(self, *, ax=None, name=None, ref_line=True, **kwargs): """Plot visualization. Extra keyword arguments will be passed to :func:`matplotlib.pyplot.plot`. Parameters ---------- ax : Matplotlib Axes, default=None Axes object to plot on. If `None`, a...
CalibrationDisplay.plot
file-level
non_external
scikit-learn
18
sklearn/utils/_mocking.py
def decision_function(self, X): """Confidence score. Parameters ---------- X : array-like of shape (n_samples, n_features) The input data. Returns ------- decision : ndarray of shape (n_samples,) if n_classes == 2\ else (n_samples...
/usr/src/app/target_test_cases/failed_tests_CheckingClassifier.decision_function.txt
def decision_function(self, X): """Confidence score. Parameters ---------- X : array-like of shape (n_samples, n_features) The input data. Returns ------- decision : ndarray of shape (n_samples,) if n_classes == 2\ else (n_samples...
CheckingClassifier.decision_function
repository-level
non_external
scikit-learn
19
sklearn/utils/_mocking.py
def fit(self, X, y, sample_weight=None, **fit_params): """Fit classifier. Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where `n_samples` is the number of samples and `n_features` is the number of features. y ...
/usr/src/app/target_test_cases/failed_tests_CheckingClassifier.fit.txt
def fit(self, X, y, sample_weight=None, **fit_params): """Fit classifier. Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where `n_samples` is the number of samples and `n_features` is the number of features. y ...
CheckingClassifier.fit
repository-level
external
scikit-learn
20
sklearn/utils/_mocking.py
def predict_proba(self, X): """Predict probabilities for each class. Here, the dummy classifier will provide a probability of 1 for the first class of `classes_` and 0 otherwise. Parameters ---------- X : array-like of shape (n_samples, n_features) The i...
/usr/src/app/target_test_cases/failed_tests_CheckingClassifier.predict_proba.txt
def predict_proba(self, X): """Predict probabilities for each class. Here, the dummy classifier will provide a probability of 1 for the first class of `classes_` and 0 otherwise. Parameters ---------- X : array-like of shape (n_samples, n_features) The i...
CheckingClassifier.predict_proba
repository-level
external
scikit-learn
21
sklearn/utils/_mocking.py
def score(self, X=None, Y=None): """Fake score. Parameters ---------- X : array-like of shape (n_samples, n_features) Input data, where `n_samples` is the number of samples and `n_features` is the number of features. Y : array-like of shape (n_sample...
/usr/src/app/target_test_cases/failed_tests_CheckingClassifier.score.txt
def score(self, X=None, Y=None): """Fake score. Parameters ---------- X : array-like of shape (n_samples, n_features) Input data, where `n_samples` is the number of samples and `n_features` is the number of features. Y : array-like of shape (n_sample...
CheckingClassifier.score
file-level
non_external