欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

如何从T-SNE或Umap中找到你想要的点?

发布时间:2023/12/20 编程问答 64 豆豆
生活随笔 收集整理的这篇文章主要介绍了 如何从T-SNE或Umap中找到你想要的点? 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

1.找到对应的json文件

2.打开网址

Examples - Apache ECharts

3.输入代码

$.get(ROOT_PATH + '/data/asset/data/life-expectancy.json', function (data) {var itemStyle = {opacity: 0.8};// Schema:var schema = [{ name: 'x', index: 0, text: '图中位置x' },{ name: 'y', index: 1, text: '图中位置y' },{ name: '经纬度', index: 2, text: '经纬度' },{ name: '基站index', index: 3, text: '基站index' }];option = {baseOption: {title: [{textAlign: 'center',left: '63%',top: '55%',textStyle: {fontSize: 100}},{text: '基站时间序列特征提取',left: 'center',top: 10,textStyle: {fontWeight: 'normal',fontSize: 20}}],tooltip: {padding: 5,borderWidth: 1,formatter: function (obj) {var value = obj.value;// prettier-ignorereturn schema[3].text + ':' + value[3] + '<br>'+ schema[1].text + ':' + value[1] + '<br>'+ schema[0].text + ':' + value[0] + '<br>'+ schema[2].text + ':' + value[2] + '<br>';}},grid: {top: 100,containLabel: true,left: 30,right: '110'},xAxis: {type: 'log',name: '人均收入',max: 100000,min: 300,nameGap: 25,nameLocation: 'middle',nameTextStyle: {fontSize: 18},splitLine: {show: false},axisLabel: {formatter: '{value} $'}},yAxis: {type: 'value',name: '平均寿命',max: 100,nameTextStyle: {fontSize: 18},splitLine: {show: false},axisLabel: {formatter: '{value} 岁'}},series: [{type: 'scatter',itemStyle: itemStyle,data: data.series[0],}],},options: []};for (var n = 0; n < data.timeline.length; n++) {option.options.push({series: {name: data.timeline[n],type: 'scatter',itemStyle: itemStyle,data: data.series[n],}});}myChart.setOption(option); });

4.打开json文件,替换掉代码中的data数据

5.在网页上运行代码

总结

以上是生活随笔为你收集整理的如何从T-SNE或Umap中找到你想要的点?的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。