Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with data ambiguity in TEC-006

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Today, I will talk to you about how to carry out TEC-006 data fuzzy processing, which may not be well understood by many people. In order to let everyone know more, Xiaobian summarizes the following contents for everyone. I hope everyone can gain something according to this article.

Data in the user layer to do fuzzy processing, continuous data range, no overlap, think of a solution, through the range of the beginning of the position sort by binary search to obtain fuzzy value interval;

The data conversion format is as follows:

eg.1

Below 50 (=50,=70,=90,=110,=130,=150,=200)

eg.2

Within a month (0-30 days)

Within two months (31-60 days)

Within 3 months (61-90 days)

Within half a year (91-180 days)

Within one year (181 days-365 days)

More than one year (365 days)

demo:

class VlCode {

const CONSTRUCTION_AREA=[50,70,90,110,130,150,200];

const FINAL_PRICE=[100,150,200,250,300,400,500,800,1000];

const LOAN_AMOUNT=[30,50,100,150,200,250,300,400,500];

const LOAN_DATE=[30,31,60,61,90,91,180,181,365];

const LOAN_DATE_CEIL=[

'-1'=>"within a month",

'1'=>"within two months",

'3'=>"within three months",

'5'=>"within half a year",

'7'=>"within one year",

'9'=>"More than one year"

];

/**

Description: Get Range Value Escape

@date: April 9, 2018 10:00:44 AM

@$arr range value,@$target reference value

@author lwy

*/

static public function getRanges($arr,$target,$ceil=''){

if(empty($target)||$target=0&&$target>=@$arr[$pre]){

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report