1
$\begingroup$

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.

$\endgroup$
10
  • 3
    $\begingroup$ No. No finite system can handle plotting an infinite quantity. You will have to provide more details to even try to answer your question. $\endgroup$ – MarcoB Dec 6 '20 at 20:25
  • 1
    $\begingroup$ I plotted over $[0, \infty)^2$ here: mathematica.stackexchange.com/a/222911/4999 -- is that what you're after? $\endgroup$ – Michael E2 Dec 6 '20 at 20:35
  • 2
    $\begingroup$ I don't see how this question is specific to wolfram-cloud. The solution should be the same on any platform. (That's why I removed the tag.) $\endgroup$ – Michael E2 Dec 6 '20 at 20:38
  • 4
    $\begingroup$ It would be more helpful if you included a concrete example of what you wanted to plot. $\endgroup$ – Michael E2 Dec 6 '20 at 21:05
  • 1
    $\begingroup$ would you please provide both of them as an answer? @MichaelE2 $\endgroup$ – M K Dec 6 '20 at 22:27
2
$\begingroup$

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"}]
 ]

enter image description here

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.

$\endgroup$
4
$\begingroup$

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}]

Plot

$\endgroup$
2
$\begingroup$

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}]

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.