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

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

WBOY
发布: 2016-06-07 16:06:33
原创
1455 人浏览过

//教 罗永浩的工程师,如何在业绩--销量(预售量)上面做假(才能不被群众识破)。 换个说法是:从算法(和数据挖掘)角度讲,怎样的业绩(销量)才是正常的……而怎样的数据形态,就是在业绩上做假…… using System; using System.Collections.Generic; us

//教 罗永浩的工程师,如何在业绩--销量(预售量)上面做假(才能不被群众识破)。

换个说法是:从算法(和数据挖掘)角度讲,怎样的业绩(销量)才是正常的……而怎样的数据形态,就是在业绩上做假……


使用系统;
使用 System.Collections.Generic;
使用 System.ComponentModel;
使用 System.Data;
使用 System.Drawing;
使用 System.Drawing.Drawing2D;
使用 System.Linq;
使用 System.Text;
使用 System.Threading.Tasks;
使用 System.Windows.Forms;

命名空间 WinFA1LuoYongHao02
{//
公共部分类 Form1 : Form
{//
公共 Form1()
{
初始化组件();
}

//


protected override void OnPaint(PaintEventArgs e)
{//受保护的重写 void OnPaint(PaintEventArgs e
图形 g = e.Graphics;
this.Width = 1224;// 1024;// 600; // 800;
这个.高度 = 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轴
点 pt01x = 新点(100, endy-100);
点 pt02x = new Point(endx, endy-100);
g.DrawLine(pnBlue, pt01x, pt02x);

Font font01 = new Font("宋体", 10f);
画笔 Brush01 = Brushes.Blue;
for (int i = 0; i {
if (0 == (i % 50) ) {
点 pt001x = 新点(100 + i, endy - 100);
string istr = i.ToString();
g.DrawString(istr, font01, Brush01, pt001x);
} //if11
}//for11

string str1 = "X坐标为时间轴";
Font font = new Font("宋体", 30f);
画笔刷 = Brushes.Red;
PointF 点 = new PointF(100 +800, 100+400);
//横着写还是竖着写呢?
System.Drawing.StringFormat sf = new System.Drawing.StringFormat();
//还是竖着写吧
sf.FormatFlags = StringFormatFlags.DirectionVertical;
g.DrawString(str1, 字体, 画笔, 点); //, sf);


//画y轴
点 pt11y = 新点(100, 100);
点 pt12y = 新点(100, endy-100);
g.DrawLine(pnBlue, pt11y, pt12y);

font01 = new Font("宋体", 10f);
Brush01 = Brushes.Blue;
for (int i = 0; i {
if (0 == (i % 20))
{
点 pt001x = 新点(100-30 , endy - (100 +i) );
string istr = i.ToString();
g.DrawString(istr, font01, Brush01, pt001x);
} //if11
}//for11


str1 = "y轴-业绩(销量)";
font = new Font("宋体", 30f);
画笔 = Brushes.Red;
点 = 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 < 799; i+=gz)
{
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 < 799; i += gz)
{//for22
int trueX = i ;
Random rd = new Random(Guid.NewGuid().GetHashCode());
int buyy = rd.Next(0, 900);
Point pt3;
if (buyy <300) // 6/9的时间用户不买, 3/9的用户买,用随机数模仿 客户购买习惯
{
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 < 799; i += gz)
{//for22
int trueX = i;
Random rd = new Random(Guid.NewGuid().GetHashCode());
int buyy = rd.Next(0, 900);
Point pt3;
if (buyy < 100) // 8/9的时间用户不买, 1/9的用户买,用随机数模仿 客户购买习惯
{
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 < 799; i += gz)
{//for22
int trueX = i;
Random rd = new Random(Guid.NewGuid().GetHashCode());
int buyy = rd.Next(0, 900);
Point pt3;
if (buyy < 100) // 8/9的时间用户不买, 1/9的用户买,用随机数模仿 客户购买习惯
{
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


来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板