is it possible to plot $(- \infty, x]$ for any arbitrary $x$ on wolfram online? is it possible provide commands?
I am trying to understand the concept of Vapnik-Chervonenkis dimension.
is it possible to plot $(- \infty, x]$ for any arbitrary $x$ on wolfram online? is it possible provide commands?
I am trying to understand the concept of Vapnik-Chervonenkis dimension.
From https://www.cs.cornell.edu/courses/cs683/2008sp/lecture%20notes/683notes_0428.pdf, which is linked on the MathWorld link in a comment by the OP, I inferred that what was desired was the illustration of the following concept. I will us the interval $(-\infty, r]$ instead of the OP's notation so as not to conflict with the notation in the definitions:
A set system $(x, S)$ consists of a set $x$ in the definition along with a collection of subsets of $x$. A subset...$A ⊆ x$ is shattered by $S$ if each subset of $A$ can be expressed as the intersection of $A$ with a subset in $S$.
VC-dimension of a set system is the cardinality of the largest subset of $A$ that can be shattered.
1D: There isn't much detail in the OP. If the set $x$ is the set of real numbers and $S$ is the collection of intervals $(-\infty, r]$, then the intervals may be represented by
HalfLine
.
Update: Here's a way to visualize the concept with NumberLinePlot
and "plot $(-\infty,r]$":
SeedRandom[0];
Block[{r, s, A},
A = RandomReal[{-2, 2}, 3];
r = Mean[A];
s = Interval[{-Infinity, r}];
NumberLinePlot[{s, A}, PlotLegends -> {"s", "A"}]
]
A 3-element $A$ cannot be shattered since the only subsets that may be obtained are the empty set, $\{\,x_1\,\}$, $\{\,x_1,x_2\,\}$, and $\{\,x_1,x_2,x_3\,\}$. (The VC dimension is $1$, I believe.)
2D: If $x$ is the real plane and $S$ consists of half-planes
$\{\,(a,b) \mathrel{|} a < r\,\}$,
then InfiniteLine
and
HalfPlane
may be appropriate.
There are several ways you can plot a function over an infinite domain, by coming up with a function that compresses that domain to a finite interval.
For example, plotting Sin[x] in the interval (−∞,5] by scaling the domain with x |-> 5*2 x/(x + 1)
(-1 maps to −∞, 0 maps to 0, 1 maps to 5)
f[x_] := Sin[x]
Plot[f[5* 2 x/(x + 1)], {x, -1, 1}, Ticks -> {{{-1, "-\[Infinity]"}, {1, "5"}}, Automatic}]
Maybe this
x=5;
Plot[Sin[t], t ∈ ImplicitRegion[-∞ < t <= x, t]]
Manipulate[
Plot[Sin[t], t ∈ ImplicitRegion[-∞ < t <= x, t],
PerformanceGoal -> "Quality"], {{x, 5}, -50, 10}]