所以我在Polymer Project Designer中建立了一个小人物:http://www.polymer-project.org/tools/designer/preview.html#ca22c086297bb41ee6e0
并希望在我本地计算机上的另一个HTML文件中使用它.我完全不知道如何做到这一点,我已经寻找教程视频并尝试整合通过github生成的代码(https://gist.githubusercontent.com/Superraptor/ca22c086297bb41ee6e0/raw/8543946b7e21a8fd2f1a8022e155622306fc549f/designer.html),但是无济于事.我真的可以使用这个帮助!
非常感谢!
编辑:
这是我的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
<!-- These are the links I added -->
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
</head>
<body>
<!-- This is the element I added -->
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_input {
padding: 10px; …Run Code Online (Sandbox Code Playgroud) 所以我正在运行一个KNN来创建集群.从每个集群,我想获得集群的medoid.
我使用小数距离度量来计算距离:
其中d是维数,第一个数据点的坐标是x ^ i,第二个数据点的坐标是y ^ i,f是0到1之间的任意数
然后我会将medoid计算为:
其中S是数据点的集合,δ是上面使用的距离度量的绝对值.
我在网上看起来没有用,试图找到medoid的实现(即使有其他距离指标,但大多数事情特别是k-means或k-medoid,[我认为]与我想要的相对不同.
从本质上讲,这归结为我无法将数学转化为有效的编程.任何帮助或指示正确的方向将非常感谢!这是我到目前为止的简短列表: