How many $n$-variables threshold functions are there? Given a weight vector $w\in\mathbb R^n$, the corresponding threshold function $t_w:\{-1,1\}^n\to\{-1,1\}$ is defined as:
$$t_w(x)=sign(x\cdot w) = 
\begin{cases}
1 & \text{if } \sum_{i=1}^nw_i\cdot x_i>0\\
-1 & \text{otherwise }
\end{cases}
$$
I'm interested in the size of the threshold functions class, that is:
$$|T_n|=|\{t_w:w\in\mathbb R^n\}|$$
Clearly, $T_n\subset F_n$, where $F_n$ is the set of all $n$-variables binary functions, and thus $|T_n|\le 2^{2^n}$. Additionally, it is obvious that $|T_n|\ge2^n$ by taking all possible coalitions, and performing majority vote over the selected coalition (i.e. uniform weights over a subset of coordinates).


What is the actual size of $T_n$? is it doubly exponential in $n$?

We can assume that no $w$'s which are partitionable are allowed, i.e. for every $S\subseteq N:\sum_{i\in S}w_i\neq \sum_{i\in N\setminus S} w_i$, so the sign function always return a legal $\pm 1$ answer.
 A: I can give somewhat better bounds on $|T_n|$, namely that $T_n \in 2^{\Omega(n \log n)}$ and $T_n \in 2^{O(n^2)}$.
If you have a permutation $\pi$ of $\{1, \dots, n\}$ and some $\epsilon < 1/(2n)$, there are $n!$ distinct threshold functions whose coefficients are of the form $(1 + \epsilon^{\pi(1)}, \dots, 1 + \epsilon^{\pi(n)})$.  So there are $2^{\Omega(n \log n)}$ elements in $T_n$.
If $f$ is a threshold function, we can choose a vector of weights $w$ such that $w^T v \geq 1$ whenever $f(v) = 1$ and $w^T v \leq -1$ whenever $f(v) = -1$.  This forms a system of $2^n$ linear inequalities (one for each $v$) in $n$ variables (the $n$ entries of $w$).  You can check that the feasible region of this polytope is linefree.
It follows that, whenever $f$ is a threshold function, there is an extreme-point solution to the system of linear inequalities defining the set of feasible weight vectors---that is, one formed by choosing $n$ linearly independent inequalities, enforcing equality, and working out $w$ from them.
We can therefore map the threshold functions injectively into the product of (the set of linearly independent choices of $n$ points from $\{-1,1\}^n$) with (the set {-1,1}^n of possible right-hand sides).
There are ${2^n \choose n}$ ways to choose $n$ points from $\{-1,1\}^n$, not all of which result in linearly independent point sets.  There are $2^n$ ways to choose the right-hand sides.  Therefore there are at most ${2^n \choose n} 2^n \in 2^{O(n^2)}$ threshold functions on $\{-1,1\}^n$.
I'd bet that $2^{\Theta(n^2)}$ is the right answer here.
A: This has been answered in the literature, see e.g.
A.A. Irmatov (1993): On the number of threshold functions
https://www.degruyter.com/view/j/dma.1993.3.issue-4/dma-1993-0407/dma-1993-0407.xml
The result is, for sufficiently large $n$,  indeed $2^{n^2 (1 + {\cal O} (1/ \ln n) ) }$ . 
