function [X,Y] = makeSet(Ni,N)

% Ni: number of points in inner circle.
% N:  total number of points.

% make the inner set
for i=1:Ni
    % choose a random unit vector
    v = randUnitVec;
    X(i,:) = v * rand;
end

% make the outer set
for i = Ni+1:N
    v = randUnitVec;
    X(i,:) = (2+rand) * v;
end

% put the labelled outer data in the labelled-data region
Xtemp = X(2,:);
X(2,:) = X(Ni+1,:);
X(Ni+1,:) = Xtemp;
Y = ones(2,1) * 0.5;
Y(1) = 0;
Y(2) = 1;


function v = randUnitVec
v = rand(1,2);
v = (v * 2) - 1;
%v = v ./ norm(v);
v = v./(sum(v.^2)).^0.5;

