11 2013 档案

摘要:层次聚类关键方法#coding:UTF-8#Hierarchical clustering 层次聚类from E_distance import Euclidean_distancefrom yezi import yeziclass bicluster: def __init__(self, vec, left=None,right=None,distance=0.0,id=None): self.left = left self.right = right #每次聚类都是一对数据,left保存其中一个数据,right保存另一个 self.v... 阅读全文
posted @ 2013-11-24 23:12 Key_Ky 阅读(17647) 评论(2) 推荐(2) 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;using System.IO;namespace WindowsFormsApplication3{ public partial class Fo... 阅读全文
posted @ 2013-11-18 22:45 Key_Ky 阅读(409) 评论(0) 推荐(0) 编辑
摘要:#include "stdafx.h"#include "stdlib.h"#include "stdio.h"#include #include #define MaxSize 1000using namespace std;typedef struct node{ int num; node * lchild; node * rchild;};struct chain{ node * Node; chain * next;}*head;typedef struct Stack{ int data[MaxSize]; int top 阅读全文
posted @ 2013-11-17 17:11 Key_Ky 阅读(1108) 评论(0) 推荐(0) 编辑
摘要:进退法例子,遇到具体问题还得修改,以后最速下降梯度法的梯度方向是变化的,这是其中一个要考虑的改变。进退法具体算法:实现代码:#include "StdAfx.h"#include #include #include #define N 2using namespace std;float testFunction(float z[N]){ float f; f = z[0] * z[0] + z[1] * z[1] - 8 * z[0] - 12 * z[1] + 52; //函数 return(f);}void main(){ float x[N],s[N],f[N].. 阅读全文
posted @ 2013-11-17 10:13 Key_Ky 阅读(1603) 评论(0) 推荐(0) 编辑
摘要:#coding: UTF-8import pearson_distancefrom pearson_distance import pearson_distancefrom math import sqrtimport random def print_matchs(matchs) : for i in range(len(matchs)) : print i , '---->', for item in matchs[i] : print item, print print '-'*20 def kme... 阅读全文
posted @ 2013-11-16 12:24 Key_Ky 阅读(2249) 评论(2) 推荐(0) 编辑
摘要:C++中struct rankPoint{ float sim;};extern "C" __declspec(dllexport) int getRank(rankPoint prank[20000]){ for(int i = 0; i < 20000; i++) prank[i].sim = 0; for(int i = 0; i < 7; i++) prank[i].sim = i; return 0;}C#中using System;using System.Collections.Generic;using System.Linq;usi... 阅读全文
posted @ 2013-11-03 16:29 Key_Ky 阅读(2033) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示