Пример #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
    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
    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()