您好,欢迎访问一九零五行业门户网

我怎么样识破罗永浩的(锤子手机)业绩做假地?!--用C#与数据挖掘

//教 罗永浩的工程师,如何在业绩--销量(预售量)上面做假(才能不被群众识破)。 换个说法是:从算法(和数据挖掘)角度讲,怎样的业绩(销量)才是正常的……而怎样的数据形态,就是在业绩上做假…… using system; using system.collections.generic; us
//教 罗永浩的工程师,如何在业绩--销量(预售量)上面做假(才能不被群众识破)。
换个说法是:从算法(和数据挖掘)角度讲,怎样的业绩(销量)才是正常的……而怎样的数据形态,就是在业绩上做假……
using system;
using system.collections.generic;
using system.componentmodel;
using system.data;
using system.drawing;
using system.drawing.drawing2d;
using system.linq;
using system.text;
using system.threading.tasks;
using system.windows.forms;
namespace winfa1luoyonghao02
{//
public partial class form1 : form
{//
public form1()
{
initializecomponent();
}
//
protected override void onpaint(painteventargs e)
{//protected override void onpaint(painteventargs e
graphics g = e.graphics;
this.width = 1224;// 1024;// 600; // 800;
this.height = 700; // 800; //1024; // 800;
pen pnblue = new pen(color.blue);
pen png = new pen(color.green);
pen pnblack = new pen(color.black);
pen pnr = new pen(color.red);
int starx = 0;
int starxy = 0;
int endx = 1100;
int endy = 600;
int highy = 700;
//画 x轴
point pt01x = new point(100, endy-100);
point pt02x = new point(endx, endy-100);
g.drawline(pnblue, pt01x, pt02x);
font font01 = new font(宋体, 10f);
brush brush01 = brushes.blue;
for (int i = 0; i {
if (0 == (i % 50) ) {
point pt001x = new point(100 + i, endy - 100);
string istr = i.tostring();
g.drawstring(istr, font01, brush01, pt001x);
} //if11
}//for11
string str1 = x坐标为时间轴;
font font = new font(宋体, 30f);
brush brush = brushes.red;
pointf point = new pointf(100 +800, 100+400);
//横着写还是竖着写呢?
system.drawing.stringformat sf = new system.drawing.stringformat();
//还是竖着写吧
sf.formatflags = stringformatflags.directionvertical;
g.drawstring(str1, font, brush, point); //, sf);
//画 y轴
point pt11y = new point(100, 100);
point pt12y = new point(100, endy-100);
g.drawline(pnblue, pt11y, pt12y);
font01 = new font(宋体, 10f);
brush01 = brushes.blue;
for (int i = 0; i {
if (0 == (i % 20))
{
point pt001x = new point(100-30 , endy - (100 +i) );
string istr = i.tostring();
g.drawstring(istr, font01, brush01, pt001x);
} //if11
}//for11
str1 = y轴-业绩(销量);
font = new font(宋体, 30f);
brush = brushes.red;
point = new pointf(100, 100);
//横着写还是竖着写呢?
sf = new system.drawing.stringformat();
//还是竖着写吧
sf.formatflags = stringformatflags.directionvertical;
g.drawstring(str1, font, brush, point, sf);
//模拟真实算法;
int truey = 0;
point pt1 = new point(100 + 0, endy - (truey + 100));
point pt2 = pt1;
int truexlast = 0;
int trueylast = 0;
int gz = 2;// 5;// 10;
for (int i = 0; i {
int truex = i ;
random rd = new random(guid.newguid().gethashcode());
int buyy = rd.next(0, 10);
point pt3;
if (buyy > 8) // 8/10的时间用户不买, 2/10的用户买,用随机数模仿 客户购买习惯
{
truey += gz;
pt2 = new point(100+truexlast, endy - truey - 100);
g.drawline(pnblack, pt1, pt2); //从 ptt1上次点, 画到 上次的 x点不变,y轴点 变化(蜡烛图 画蜡烛)
//ptt2 = new point(100 + truex , endy - truey - 100);
}
else { pt2 = new point(100+truexlast, endy - truey - 100);
}
pt3 = new point(100 + truex, endy - truey - 100);
g.drawline(pnblack, pt2, pt3); //从 上支蜡烛的终点,画到 下支蜡烛的起点
pt1 = pt3;
truexlast = truex;
trueylast = truey;
}
string str12 = 模拟真实(正常)销售率的销售线;
font = new font(宋体, 20f);
brush = brushes.red;
point = new pointf(truexlast, trueylast +100+100+ 150);
//横着写还是竖着写呢?
system.drawing.stringformat sf12 = new system.drawing.stringformat();
//还是横着写吧
sf.formatflags = stringformatflags.directionvertical;
g.drawstring(str12, font, brush, point); //, sf);
//高销售率算法
truey = 0;
pt1 = new point(100 + 0, endy - (truey + 100));
pt2 = pt1;
for (int i = 0; i {//for22
int truex = i ;
random rd = new random(guid.newguid().gethashcode());
int buyy = rd.next(0, 900);
point pt3;
if (buyy {
truey += gz;
pt2 = new point(100 + truexlast, endy - truey - 100);
g.drawline(pnr, pt1, pt2); //从 ptt1上次点, 画到 上次的 x点不变,y轴点 变化(蜡烛图 画蜡烛)
}
else
{
pt2 = new point(100 + truexlast, endy - truey - 100);
}
pt3 = new point(100 + truex, endy - truey - 100);
g.drawline(pnblack, pt2, pt3); //从 上支蜡烛的终点,画到 下支蜡烛的起点
pt1 = pt3;
truexlast = truex;
trueylast = truey;
}//for22
str12 = 黑色为模拟正常的高销售率的销售线(业绩);
font = new font(宋体, 20f);
brush = brushes.red;
point = new pointf(truexlast-100, trueylast-100);
//横着写还是竖着写呢?
sf12 = new system.drawing.stringformat();
//还是横着写吧
sf.formatflags = stringformatflags.directionvertical;
g.drawstring(str12, font, brush, point); //, sf);
//
//------------------------------------------------------------------------------
//罗永浩算法
truexlast = 0;
trueylast = 0;
truey = 0;
pt1 = new point(100 + 0, endy - (truey + 100));
pt2 = pt1;
for (int i = 0; i {//for22
int truex = i;
random rd = new random(guid.newguid().gethashcode());
int buyy = rd.next(0, 900);
point pt3;
if (buyy {
truey += 3* gz;
pt2 = new point(100 + truexlast, endy - truey - 100);
g.drawline(pnr, pt1, pt2); //从 ptt1上次点, 画到 上次的 x点不变,y轴点 变化(蜡烛图 画蜡烛)
}
else
{
pt2 = new point(100 + truexlast, endy - truey - 100);
}
pt3 = new point(100 + truex, endy - truey - 100);
g.drawline(png, pt2, pt3); //从 上支蜡烛的终点,画到 下支蜡烛的起点
pt1 = pt3;
truexlast = truex;
trueylast = truey;
}//for22
str12 = 蓝色为“罗永浩”销售曲线:;
font = new font(宋体, 20f);
brush = brushes.red;
point = new pointf(800, 400-100); //(truexlast, trueylast - 100);
//横着写还是竖着写呢?
sf12 = new system.drawing.stringformat();
//还是横着写吧
sf.formatflags = stringformatflags.directionvertical;
g.drawstring(str12, font, brush, point); //, sf);
//===========================================================
//------------------------------------------------------------------------------
//改进罗永浩算法!!
truexlast = 0;
trueylast = 0;
truey = 0;
pt1 = new point(100 + 0, endy - (truey + 100));
pt2 = pt1;
for (int i = 0; i {//for22
int truex = i;
random rd = new random(guid.newguid().gethashcode());
int buyy = rd.next(0, 900);
point pt3;
if (buyy {
random rd01 = new random(guid.newguid().gethashcode());
int buyy01 = rd01.next(1,5);
truey += buyy01 * gz;
pt2 = new point(100 + truexlast, endy - truey - 100);
g.drawline(pnr, pt1, pt2); //从 ptt1上次点, 画到 上次的 x点不变,y轴点 变化(蜡烛图 画蜡烛)
}
else
{
pt2 = new point(100 + truexlast, endy - truey - 100);
}
pt3 = new point(100 + truex, endy - truey - 100);
g.drawline(pnblue, pt2, pt3); //从 上支蜡烛的终点,画到 下支蜡烛的起点
pt1 = pt3;
truexlast = truex;
trueylast = truey;
}//for22
str12 = 绿色为“罗永浩”(放大3倍)销售曲线:;
font = new font(宋体, 20f);
brush = brushes.red;
point = new pointf(300-100, 400 - 100); //(truexlast, trueylast - 100);
sf12 = new system.drawing.stringformat();
sf.formatflags = stringformatflags.directionvertical; //横着写
g.drawstring(str12, font, brush, point); //, sf);
//===========================================================
//
} //protected override void onpaint(painteventargs e
//
}//public partial class form1 : form
}//namespace winfa1luoyonghao02
其它类似信息

推荐信息