コード例 #1
0
    def learner(self,
                method=None,
                k=2,
                thresold=0.001,
                r=0.5,
                alpha=0.1,
                lam=10,
                param='-t 2'):
        self.method = method

        if self.__type == 'unsupervise':
            clustermanager = Clustermanager()
            self.model = clustermanager.methodschoose(method, self.data, k)

        elif self.__type == 'regression':
            regressionmanager = Regressionmanager()
            self.model = regressionmanager.methodschoose(
                method, self.data, self.data, thresold, r, alpha, lam)

        elif self.__type == 'supervise':
            classifymanager = Classifymanager()
            self.model = classifymanager.methodschoose(method, self.data, k,
                                                       param)

        elif self.__type == 'others':
            others = Othersmanager()
            self.model = others.methodschoose(method, param)
コード例 #2
0
ファイル: main.py プロジェクト: pm429015/SmartML
    def learner(self, method = None, k=2, thresold=0.001, r=0.5, alpha=0.1, lam=10, param='-t 2'):
        self.method = method

        if self.__type == 'unsupervise':
            clustermanager = Clustermanager()
            self.model = clustermanager.methodschoose(method, self.data, k)

        elif self.__type == 'regression':
            regressionmanager = Regressionmanager()
            self.model = regressionmanager.methodschoose(method, self.data, self.data, thresold, r, alpha, lam)

        elif self.__type == 'supervise':
            classifymanager = Classifymanager()
            self.model = classifymanager.methodschoose(method, self.data, k, param)

        elif self.__type == 'others':
            others = Othersmanager()
            self.model = others.methodschoose(method, param)
コード例 #3
0
    def tester(self, testpoint):

        if self.__type == 'regression':
            regressionmanager = Regressionmanager()
            result = regressionmanager.testing(self.method, self.model,
                                               testpoint)

        elif self.__type == 'supervise':
            classifymanager = Classifymanager()
            result = classifymanager.testing(self.method, self.model,
                                             testpoint)

        elif self.__type == 'others':
            others = Othersmanager()
            result = others.testing(self.method, self.model, testpoint)

        print result
        return result
コード例 #4
0
ファイル: main.py プロジェクト: pm429015/SmartML
    def tester(self, testpoint):

        if self.__type == 'regression':
            regressionmanager = Regressionmanager()
            result = regressionmanager.testing(self.method, self.model, testpoint)

        elif self.__type == 'supervise':
            classifymanager = Classifymanager()
            result = classifymanager.testing(self.method, self.model, testpoint)

        elif self.__type == 'others':
            others = Othersmanager()
            result = others.testing(self.method, self.model, testpoint)

        print result
        return result


        #if __name__ == "__main__":
        #my = Main('./iris_proc.data', ',', 'supervise')
        #my.loadfile()