# -*- coding: utf-8 -*-
"""
Created on 2017/4/5 9:52 2017
@author: Randolph.Lee
"""
from __future__ import division
from pybrain.structure import *
from Evaluation_metrics import *
from Threshold_function import get_threshold
from pybrain.datasets import SupervisedDataSet
from pybrain.supervised.trainers import BackpropTrainer
import scipy.io as scio
import numpy as np
class MLBP:
def __init__(self, hidden_neuron, alpha=0.05, epochs=100, in_type=2, out_type=2, cost=0.1, min_max=None):
"""
:param hidden_neuron: Number of hidden neurons used in the network
:param alpha: Learning rate for updating weights and biases, default=0.05
:param epochs: Maximum number of training epochs, default=100
:param in_type: The type of activation function used for the hidden neurons, 1 for 'logsig', 2 for 'tansig'
:param out_type: The type of activation function used for the output neurons, 1 for 'logsig', 2 for 'tansig'
:param cost: Cost parameter used for regularization, default=0.1
:param min_max: min_max for data standardization
"""
self.hidden_neuron = hidden_neuron
self.alpha = alpha
self.epochs = epochs
self.in_type = in_type
self.out_type = out_type
self.cost = cost
self.min_max = min_max
self.output = None
self.hamming_loss = 0.0
self.ranking_loss = 0.0
Multi-label learning for BP
最新推荐文章于 2023-12-11 17:04:28 发布